Quantcast
MultiBar Scale - WoWInterface
Thread Tools Display Modes
07-29-18, 08:01 AM   #1
7strm
A Murloc Raider
Join Date: Aug 2016
Posts: 9
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?
  Reply With Quote
07-29-18, 08:32 AM   #2
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 122
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.

Last edited by siweia : 07-29-18 at 08:35 AM.
  Reply With Quote
07-29-18, 09:20 AM   #3
7strm
A Murloc Raider
Join Date: Aug 2016
Posts: 9
Yeah already tried to hook into their SetScale too, forgot to mention sorry. It produces the same error. Or does this work for you?
  Reply With Quote
07-29-18, 09:56 AM   #4
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 122
Originally Posted by 7strm View Post
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.
  Reply With Quote
07-29-18, 10:07 AM   #5
7strm
A Murloc Raider
Join Date: Aug 2016
Posts: 9
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.
  Reply With Quote
07-29-18, 12:54 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,746
http://www.wowinterface.com/forums/s...ad.php?t=56445
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
07-29-18, 01:26 PM   #7
7strm
A Murloc Raider
Join Date: Aug 2016
Posts: 9
Ah nice, thank you! Evidently didn't search properly, sorry guys.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » MultiBar Scale

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