Quantcast Would using oUF to just replace a player's nameplate be overkill? - WoWInterface
Thread Tools Display Modes
04-30-18, 09:35 PM   #1
Eungavi
A Wyrmkin Dreamwalker
Join Date: Nov 2017
Posts: 56
Would using oUF to just replace a player's nameplate be overkill?

I honestly don't like how the player's default nameplate works and thus decided to replace it.

1. Would it be an overkill to use an oUF just to replace player's nameplate?

2. Afaik, spawning a unitframe with oUF would disable/hide default ones. The question is how could I prevent it from being disabled/hidden since I'm only willing to replace the player's nameplate, not unitframe.
  Reply With Quote
05-01-18, 12:39 AM   #2
neverg
A Frostmaul Preserver
 
neverg's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 263
It will only hide the frames you spawn.
So if you only implement the nameplates it will only skin that.
Don't think it is overkill at all. oUF is quite light to be honest but as with everything depends on what you do with it.
__________________
My oUF Layout: oUF Lumen
  Reply With Quote
05-01-18, 07:52 AM   #3
Eungavi
A Wyrmkin Dreamwalker
Join Date: Nov 2017
Posts: 56
Originally Posted by neverg View Post
It will only hide the frames you spawn.
So if you only implement the nameplates it will only skin that.
Don't think it is overkill at all. oUF is quite light to be honest but as with everything depends on what you do with it.
The problem is I'm planning to create an unitframe-like one instead of spawning a nameplate

At least it's good to hear that it's not an overkill

Last edited by Eungavi : 05-01-18 at 07:54 AM.
  Reply With Quote
05-01-18, 08:35 AM   #4
runamonk
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 22
Careful..it's addictive. I started out with oUF just to replace my player and target units and ended up implementing all units and then actual nameplates as well lol.
  Reply With Quote
05-01-18, 01:59 PM   #5
Eungavi
A Wyrmkin Dreamwalker
Join Date: Nov 2017
Posts: 56
Originally Posted by runamonk View Post
Careful..it's addictive. I started out with oUF just to replace my player and target units and ended up implementing all units and then actual nameplates as well lol.
Too bad...

I'm already addicted to it D:

My core UI has all unitframes implemented by oUF.

This will be a separate addon that can be used standalone just to replace player's default resource bar
  Reply With Quote
05-01-18, 02:22 PM   #6
runamonk
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 22
I did two addons with oUF as well. One for nameplates (and personal bar) and one for all the units.
  Reply With Quote
05-14-18, 04:17 AM   #7
Eungavi
A Wyrmkin Dreamwalker
Join Date: Nov 2017
Posts: 56
Okay... so back to the origin!

Would it be possible to create an unitframe without hiding the default ones?

Afaik, :Spawn function would disable blizzard's default unitframe for a selected unit.

Any helps please?!
  Reply With Quote
05-15-18, 01:16 AM   #8
runamonk
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 22
In looking at the spawn function in oUF it does not appear there is a way to override the functionality.


You could modify the spawn function yourself and add an override to it? Maybe this is something they can add to the new version for BfA as well.


Lua Code:
  1. function oUF:Spawn(unit, overrideName)
  2.     argcheck(unit, 2, 'string')
  3.     if(not style) then return error('Unable to create frame. No styles have been registered.') end
  4.  
  5.     unit = unit:lower()
  6.  
  7.     local name = overrideName or generateName(unit)
  8.     local object = CreateFrame('Button', name, oUF_PetBattleFrameHider, 'SecureUnitButtonTemplate')
  9.     Private.UpdateUnits(object, unit)
  10.  
  11.     self:DisableBlizzard(unit)
  12.     walkObject(object, unit)
  13.  
  14.     object:SetAttribute('unit', unit)
  15.     RegisterUnitWatch(object)
  16.  
  17.     return object
  18. end

Last edited by runamonk : 05-15-18 at 01:42 AM.
  Reply With Quote
05-15-18, 08:06 AM   #9
Eungavi
A Wyrmkin Dreamwalker
Join Date: Nov 2017
Posts: 56
Yeah, I thought of adding one extra parameter to Spawn function, but I quit doing it as I don't want to modify lua file whenver there's an update :/

Lua Code:
  1. function oUF:Spawn(unit, overrideName, showBlizzard)
  2.     argcheck(unit, 2, 'string')
  3.     if(not style) then return error('Unable to create frame. No styles have been registered.') end
  4.  
  5.     unit = unit:lower()
  6.  
  7.     local name = overrideName or generateName(unit)
  8.     local object = CreateFrame('Button', name, oUF_PetBattleFrameHider, 'SecureUnitButtonTemplate')
  9.     Private.UpdateUnits(object, unit)
  10.  
  11.     -- maybe something like this
  12.     if not showBlizzard then
  13.         self:DisableBlizzard(unit)
  14.     end
  15.    
  16.     walkObject(object, unit)
  17.  
  18.     object:SetAttribute('unit', unit)
  19.     RegisterUnitWatch(object)
  20.  
  21.     return object
  22. end
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Would using oUF to just replace a player's nameplate be overkill?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off