WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   nUI: Suggestion Box (https://www.wowinterface.com/forums/forumdisplay.php?f=91)
-   -   Hide action page arrows (https://www.wowinterface.com/forums/showthread.php?t=42082)

schmitty 12-11-11 10:33 PM

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

spiel2001 12-12-11 07:22 PM

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 );



schmitty 12-12-11 11:31 PM

Thanks Scott,

That did the trick :D

schmitty 12-21-11 11:26 AM

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


spiel2001 12-21-11 05:46 PM

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.

schmitty 12-23-11 01:12 AM

Ahh, ok. Fair enough.


All times are GMT -6. The time now is 04:12 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI