Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-10-19, 04:12 AM   #1
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
manage default Blizzard UI

Hi all,

a friend of mine which plays with plain Blizzard UI have asked me if I can arrange it better without too many addons.

So I started working on it mainly removing elements and using some custom textures.

Everyting is almost done but I have some iussue I am not able to solve.

I starting creating a frame:

Lua Code:
  1. local frame = CreateFrame("Frame")
  2. frame:RegisterEvent("ADDON_LOADED")
  3. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  4. frame:SetScript("OnEvent", function(self, event, arg1)
  5.  
  6. -- [...]
  7.  
  8.     if event == "PLAYER_ENTERING_WORLD" then
  9.  
  10.     -- here I begin to remove / hide or setalpha(0) various part of UI ...


1) I am trying to remove the PVPIcon from the Player, Target (and optionally party) but it seems to me that this icon as an "immutable" flag and don't want to disappears

I have used:
Lua Code:
  1. PartyMemberFrame1PVPIcon:SetAlpha(0)
  2. PartyMemberFrame2PVPIcon:SetAlpha(0)
  3. PartyMemberFrame3PVPIcon:SetAlpha(0)
  4. PartyMemberFrame4PVPIcon:SetAlpha(0)
  5. FocusFrameTextureFramePVPIcon:SetAlpha(0)
  6. TargetFrameTextureFramePVPIcon:SetAlpha(0)
  7. PlayerPVPIcon:SetAlpha(0)
  8. PlayerPVPTimerText:SetAlpha(0)

Also used from the chat with something like:
/run PlayerPVPIcon:SetAlpha(0)

Seems to not work. (I have tried also with :Hide() ) The icon remain there
The frame name is right (I got it with /fstack).

(only the PlayerPVPTimerText:SetAlpha(0) seems to work)

2) Second iussue is:
I am not able to:

Lua Code:
  1. MultiBarRight:SetScale(0.7)
  2. MultiBarLeft:SetScale(0.7)

... even if this works nicely from console:
/run MultiBarLeft:SetScale(0.7)

But this works ONLY IF the bar is visible and enable / disable it from ESC --> Interface --> ActionBars make the scale back to default of 1.


If I use something found on this forum:
https://www.wowinterface.com/forums/...ad.php?t=56469

Lua Code:
  1. hooksecurefunc(MultiBarRight, "SetScale", function(self, scale)
  2.     self:SetScale(0.7)
  3. end)
  4.  
  5. hooksecurefunc(MultiBarLeft, "SetScale", function(self, scale)
  6.     self:SetScale(0.7)
  7. end)


The bars are properly scaled but they produce errors in doing this:

Lua Code:
  1. 5x C stack overflow
  2. [C]: in function `SetScale'
  3. gmTweaks\core.lua:499: in function <gmTweaks\core.lua:498>
  4. [C]: in function `SetScale'
  5. gmTweaks\core.lua:499: in function <gmTweaks\core.lua:498>
  6. [C]: in function `SetScale'
  7. gmTweaks\core.lua:499: in function <gmTweaks\core.lua:498>
  8. [C]: in function `SetScale'
  9. gmTweaks\core.lua:499: in function <gmTweaks\core.lua:498>
  10. [C]: in function `SetScale'
  11. gmTweaks\core.lua:499: in function <gmTweaks\core.lua:498>
  12. [C]: in function `SetScale'
  13. gmTweaks\core.lua:499: in function <gmTweaks\core.lua:498>
  14. ...
  15. gmTweaks\core.lua:499: in function <gmTweaks\core.lua:498>
  16. [C]: in function `SetScale'
  17. gmTweaks\core.lua:499: in function <gmTweaks\core.lua:498>
  18. [C]: in function `SetScale'
  19. gmTweaks\core.lua:499: in function <gmTweaks\core.lua:498>
  20. [C]: in function `SetScale'
  21. FrameXML\MultiActionBars.lua:85: in function `MultiActionBar_Update'
  22. FrameXML\InterfaceOptionsPanels.lua:1184: in function `InterfaceOptions_UpdateMultiActionBars'
  23. [string "*:OnLoad"]:4: in function `setFunc'
  24. FrameXML\InterfaceOptionsPanels.lua:1154: in function <FrameXML\InterfaceOptionsPanels.lua:1147>
  25.  
  26. Locals:
  27. (*temporary) = MultiBarRight {
  28.  0 = <userdata>
  29.  SetScale = <function> defined =[C]:-1
  30.  slideOut = <unnamed> {
  31.  }
  32. }
  33. (*temporary) = 0.700000
  34. (*temporary) = <function> defined =[C]:-1
  35. (*temporary) = MultiBarRight {
  36.  0 = <userdata>
  37.  SetScale = <function> defined =[C]:-1
  38.  slideOut = <unnamed> {
  39.  }
  40. }
  41. (*temporary) = 0.700000
  42.  = <function> defined =[C]:-1
  43.  = <function> defined @gmTweaks\core.lua:498

In the forum thread Seerah pointed out the problem could be better analyzed here:
https://www.wowinterface.com/forums/...ad.php?t=56445

But unfortunately I was unable to understand the solution
Can someone please explain it simpler

Thanks all.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » manage default Blizzard UI


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