WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   MultiBar Scale (https://www.wowinterface.com/forums/showthread.php?t=56469)

7strm 07-29-18 08:01 AM

MultiBar Scale
 
It seems that with 8.0 the scale of the MultiBar (actionbars at the right edge) is adjusted depending on how much vertical real estate there is below the minimap.

My minimap is in the bottom right corner, which apparently would result in a (weakly) negative scale, because i get the following error
Code:

18x MultiBarRight:SetScale(): Scale must be > 0
[C]: ?
[C]: in function `SetScale'
FrameXML\MultiActionBars.lua:85: in function `MultiActionBar_Update'
FrameXML\InterfaceOptionsPanels.lua:1184: in function `InterfaceOptions_UpdateMultiActionBars'
[string "*:OnLoad"]:4: in function `setFunc'
FrameXML\InterfaceOptionsPanels.lua:1154: in function <FrameXML\InterfaceOptionsPanels.lua:1147>

Any ideas how to stop them from trying to set a negative scale?

siweia 07-29-18 08:32 AM

Code:

hooksecurefunc(MultiBarRight, "SetScale", function(self, scale)
        if scale < 1 then self:SetScale(1) end
end)

hooksecurefunc(MultiBarLeft, "SetScale", function(self, scale)
        if scale < 1 then self:SetScale(1) end
end)

With the code, the multibars would only scale themselves by the value of your UIScale.

7strm 07-29-18 09:20 AM

Yeah already tried to hook into their SetScale too, forgot to mention sorry. It produces the same error. Or does this work for you?

siweia 07-29-18 09:56 AM

Quote:

Originally Posted by 7strm (Post 329145)
Yeah already tried to hook into their SetScale too, forgot to mention sorry. It produces the same error. Or does this work for you?

I never get that error.

7strm 07-29-18 10:07 AM

Code:

MinimapCluster:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT")

hooksecurefunc(MultiBarRight, "SetScale", function(self, scale)
    if scale < 1 then self:SetScale(1) end
end)

hooksecurefunc(MultiBarLeft, "SetScale", function(self, scale)
    if scale < 1 then self:SetScale(1) end
end)

Disabled everything except this, and it produces the error.

Seerah 07-29-18 12:54 PM

http://www.wowinterface.com/forums/s...ad.php?t=56445

7strm 07-29-18 01:26 PM

Ah nice, thank you! Evidently didn't search properly, sorry guys.


All times are GMT -6. The time now is 11:44 AM.

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