WoWInterface

WoWInterface (http://www.wowinterface.com/forums/index.php)
-   nUI: Technical Support (http://www.wowinterface.com/forums/forumdisplay.php?f=92)
-   -   Modding PvP icon (http://www.wowinterface.com/forums/showthread.php?t=42243)

reddrumjay 12-29-11 05:37 PM

Modding PvP icon
 
Scott, where in the code can I find the placement of the PvP icon at the top of the minimap? It slightly overlaps the action bar, and I click it all the time during PvP combat. It is driving me nuts. I want to move it down and over to the side.

spiel2001 12-29-11 06:03 PM

Look for this code block in [ Interface > AddOns > nUI > Integration > nUI_Minimap.lua ]

Code:

        MiniMapBattlefieldFrame:SetParent( Minimap );
        MiniMapBattlefieldFrame:SetScale( 0.8 );
        MiniMapBattlefieldFrame:ClearAllPoints();
        MiniMapBattlefieldFrame:RegisterForDrag();
        MiniMapBattlefieldFrame:SetScript( "OnDragStart", nil );
        MiniMapBattlefieldFrame:SetScript( "OnDragStop", nil );
        MiniMapBattlefieldFrame:SetPoint( "BOTTOMRIGHT", MiniMapWorldMapButton, "TOPLEFT", 2, -12 );
        MiniMapBattlefieldFrame:SetFrameStrata( Minimap:GetFrameStrata() );
        MiniMapBattlefieldFrame:SetFrameLevel( Minimap:GetFrameLevel()+5 );

        MiniMapLFGFrame:SetParent( Minimap );
        MiniMapLFGFrame:SetScale( 0.8 );
        MiniMapLFGFrame:ClearAllPoints();
        MiniMapLFGFrame:RegisterForDrag();
        MiniMapLFGFrame:SetScript( "OnDragStart", nil );
        MiniMapLFGFrame:SetScript( "OnDragStop", nil );
        MiniMapLFGFrame:SetPoint( "BOTTOM", Minimap, "TOP", 0, -10 );
        MiniMapLFGFrame:SetFrameStrata( Minimap:GetFrameStrata() );
        MiniMapLFGFrame:SetFrameLevel( Minimap:GetFrameLevel()+5 );



reddrumjay 01-11-12 01:39 AM

OK... so I went one step further and made it draggable. MUCH easier than trying to figure out what numbers to put in. Posting here so I can find it easily to replace code in future patches: :)

Code:

MiniMapBattlefieldFrame:SetParent( Minimap );
MiniMapBattlefieldFrame:SetScale( 0.8 );
MiniMapBattlefieldFrame:ClearAllPoints();

MiniMapBattlefieldFrame:SetMovable(true)
MiniMapBattlefieldFrame:EnableMouse(true)
MiniMapBattlefieldFrame:RegisterForDrag("LeftButton");
MiniMapBattlefieldFrame:SetScript( "OnDragStart", frame.StartMoving );
MiniMapBattlefieldFrame:SetScript( "OnDragStop", frame.StopMovingOrSizing );

MiniMapBattlefieldFrame:SetPoint( "BOTTOMRIGHT", MiniMapWorldMapButton, "TOPLEFT", 2, -12 );
MiniMapBattlefieldFrame:SetFrameStrata( Minimap:GetFrameStrata() );
MiniMapBattlefieldFrame:SetFrameLevel( Minimap:GetFrameLevel()+5 );


reddrumjay 01-16-12 05:06 PM

ok, my click and drag is a quick fix but not too elegant since if you drop it behind the minimap it is gone.

Is there a quick/easy way to make it so it is not clickable while in combat? that would fix my problem of having it pop up and block my entire field of vision if I mis-click it.

spiel2001 01-16-12 06:10 PM

Yeah... don't click the bottom of your buttons (I'm kidding ~smile~) or, if I wanted to be an extra smartalec I'd say learn to use keybinds ~evil grin~

That said and all teasing aside, I would say just modify the position of the button a little so it doesn't overlap with the buttons you're trying to mouse-click. Just edit this line and change the highlighted values (blue to move it left/right or purple to move it up/down)

Code:

MiniMapBattlefieldFrame:SetPoint( "BOTTOMRIGHT", MiniMapWorldMapButton, "TOPLEFT", 2, -12 );



reddrumjay 01-16-12 07:54 PM

Quote:

Originally Posted by spiel2001 (Post 251139)
if I wanted to be an extra smartalec I'd say learn to use keybinds ~evil grin~

IDK what the deal is - I guess I'm too damn old - but I've never been able to adjust to full-on keybinds.

/sigh

spiel2001 01-17-12 05:22 PM

Unless you significantly eclipse my 53 years, I'm afraid I'm gonna have to deny your request to apply the age debuff.

~grin~

reddrumjay 01-25-12 12:01 AM

Oh, so you're gonna pop the +10 Years trink to try to pwn me??

Hax

spiel2001 01-25-12 05:48 PM

Like a boss!

:D


All times are GMT -6. The time now is 01:23 PM.

vBulletin © 2014, Jelsoft Enterprises Ltd
©2012 ZAM Network LLC