Thread Tools Display Modes
Old 12-11-11, 09:33 PM   #1
schmitty
A Cliff Giant
 
schmitty's Avatar
Join Date: May 2010
Posts: 75
Question Hide action page arrows

Hi Scott,

Great to see you back. I was wondering if it's possible to either hide the Action Page arrows (at the end of the main action bar), or iclude an option to do so. I don't really see the need for them to be shown considering all actin bars are visible anyway. Plus, I use Quartz and have the Player bar to the left and Target to the right, and me being fussy with layout, like having things aesthetically even.

Here is the code, in case you don't already know about it.

Code:
/run local t,b={"Up","Down"}for _,direction in pairs(t)do b=_G["ActionBar"..direction.."Button"]b:SetScript("OnShow",b.Hide)b:Hide()end
schmitty is offline  
Old 12-12-11, 06:22 PM   #2
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
I am not sure if setting the OnShow script might not cause a taint problem. It might be better to just reparent them to nUI.BlizUI

It's kind of an edge use-case to change it in nUI5, but I'll be sure to include an option in nUI6 and you can do a simple edit in nUI or use a macro to do it in the meantime.

The edit is very easy... open [ Interface > AddOns > nUI > Bars > nUI_ButtonBar.lua ] and locate the statement "if bar:GetName() == "nUI_ActionBar" then" at line 855 and make the following two highlighted changes...


Code:

if bar:GetName() == "nUI_ActionBar" then
  
        ActionBarUpButton:SetParent( nUI.BlizUI );
        ActionBarUpButton:SetFrameStrata( bar:GetFrameStrata() );
        ActionBarUpButton:SetFrameLevel( bar:GetFrameLevel() );
        ActionBarUpButton:SetScale( 1.5 * nUI.vScale );
        ActionBarUpButton:ClearAllPoints();
        ActionBarUpButton:SetPoint( "TOPLEFT", bar, "TOPRIGHT", -10 * nUI.hScale, 12 * nUI.vScale );
        ActionBarUpButton:Show();
    
        ActionBarDownButton:SetParent( nUI.BlizUI );
        ActionBarDownButton:SetFrameStrata( bar:GetFrameStrata() );
        ActionBarDownButton:SetFrameLevel( bar:GetFrameLevel() );
        ActionBarDownButton:SetScale( 1.5 * nUI.vScale );
        ActionBarDownButton:ClearAllPoints();
        ActionBarDownButton:SetPoint( "BOTTOMLEFT", bar, "BOTTOMRIGHT", -10 * nUI.hScale, -12 * nUI.vScale  );
        ActionBarDownButton:Show();
        
    end
That should do the trick.

If you want to use a macro, just do this...

Code:
/script ActionBarUpButton:SetParent( nUI.BlizUI ); ActionBarDownButton:SetParent( nUI.BlizUI );

__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Old 12-12-11, 10:31 PM   #3
schmitty
A Cliff Giant
 
schmitty's Avatar
Join Date: May 2010
Posts: 75
Thanks Scott,

That did the trick
__________________
____________________________________________
Schmitty


schmitty is offline  
Old 12-21-11, 10:26 AM   #4
schmitty
A Cliff Giant
 
schmitty's Avatar
Join Date: May 2010
Posts: 75
Hey Scott,

I was playing around with your suggestion and decided to try something different, so instead of changing what you suggested I changed the following

Code:
if bar:GetName() == "nUI_ActionBar" then
  
        ActionBarUpButton:SetParent( bar );
        ActionBarUpButton:SetFrameStrata( bar:GetFrameStrata() );
        ActionBarUpButton:SetFrameLevel( bar:GetFrameLevel() );
        ActionBarUpButton:SetScale( 1.5 * nUI.vScale );
        ActionBarUpButton:ClearAllPoints();
        ActionBarUpButton:SetPoint( "TOPLEFT", bar, "TOPRIGHT", -10 * nUI.hScale, 12 * nUI.vScale );
        ActionBarUpButton:Hide();
   
        ActionBarDownButton:SetParent( bar );
        ActionBarDownButton:SetFrameStrata( bar:GetFrameStrata() );
        ActionBarDownButton:SetFrameLevel( bar:GetFrameLevel() );
        ActionBarDownButton:SetScale( 1.5 * nUI.vScale );
        ActionBarDownButton:ClearAllPoints();
        ActionBarDownButton:SetPoint( "BOTTOMLEFT", bar, "BOTTOMRIGHT", -10 * nUI.hScale, -12 * nUI.vScale  );
        ActionBarDownButton:Hide();
        
    end
__________________
____________________________________________
Schmitty


schmitty is offline  
Old 12-21-11, 04:46 PM   #5
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Either way works... but I don't normally recommend changing the engine code... that's what the layout files are for... they are the "data" that drives the engine. The intent is always that you customize the UI by modifying the layout. That will absolutely be the case in nUI6.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Old 12-23-11, 12:12 AM   #6
schmitty
A Cliff Giant
 
schmitty's Avatar
Join Date: May 2010
Posts: 75
Ahh, ok. Fair enough.
__________________
____________________________________________
Schmitty


schmitty is offline  
 

Go BackWoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Support » nUI: Suggestion Box » Hide action page arrows

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