Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-15-09, 06:32 PM   #1
jarasai
A Defias Bandit
Join Date: Apr 2009
Posts: 2
UnitPanel Movement

Hello!

I've been playing around with nUI for a few days and am enjoying it. I've been trying to move around some layout pieces, and have been quite successful, but the UnitPanels are a bit of tricky business.

Unlike a lot of the other layout items, the panel itself seems to be hardcoded as anchored in nUI_UnitPanel to the Dashboard, so it can't seemingly be reanchored to the nUI_TopBar. I know it seems very vogue to put frames there, but I tend to stick them in the normal Blizz spot and grid goes in the middle.

I tried to reanchor the Solo panel, at least, by sticking an anchor in , but it didn't move. Maybe I did it wrong?

anchor = {
anchor_pt = "BOTTOMLEFT",
relative_to = "nuI_TopBars",
relative_pt = "TOPLEFT",
xOfs = 0,
yOfs = 0,
},

In the upmost panel level of nUI_UnitPanelSolo.lua.

Is there some elaborate stuff to override? It looks like the apply_anchor function in UnitPanel checks to see if an anchor is present, but there are things like local background = CreateFrame( "Frame", "nUI_UnitPanelBackground", nUI_Dashboard.Anchor ) that explicitly refer to the Dashboard through this thing, rather than the anchor of some set parent panel.

I'm kinda toying around with nUI_UnitPanel, but my old CS training on inelegantly altering things because I'm not seeing abstraction gives me a little twitch, so I thought I'd ask about it.

I might try sticking in like a middle class nUI_DefaultUnitPanel with the anchor options and some other stuff defined, so tons of anchor and panel options don't have to be redefined every whim I have.. It also seems like a good solution to having some layouts have Dashboard anchoring and some being free to go elsewhere.

This is really my first foray into LUA and should read up before I try such things... but they were some ideas I had. I'm interested to hear if there are any thoughts on relocating said UnitPanel.

Thanks,
Jason
 
 

WoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Customization » nUI: Customizing Layouts » UnitPanel Movement

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