Hi,
thanks so much for your answer.
I have tried your code and it doesn't give any errors when the player enters world ...and the bars are at 0.8 ...
Lua Code:
5: hooksecurefunc(MultiBarRight, "SetScale", function(self, scale)
6: if scale ~= 0.8 then self:SetScale(0.8) end
7: end)
9: hooksecurefunc(MultiBarLeft, "SetScale", function(self, scale)
10: if scale ~= 0.8 then self:SetScale(0.8) end
11:end)
But when I finish the quest BeachHead (which is vehicle exit) I got:
Lua Code:
1x [ADDON_ACTION_BLOCKED] AddOn 'gmActionBars' tried to call the protected function 'UNKNOWN()'.
!BugGrabber\BugGrabber.lua:519: in function <!BugGrabber\BugGrabber.lua:519>
[C]: ?
[C]: in function `SetScale'
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
[C]: in function `SetScale'
FrameXML\MultiActionBars.lua:85: in function `MultiActionBar_Update'
FrameXML\ActionBarController.lua:169: in function `ValidateActionBarTransition'
FrameXML\ActionBarController.lua:137: in function `ActionBarController_UpdateAll'
FrameXML\ActionBarController.lua:62: in function <FrameXML\ActionBarController.lua:51>
Locals:
InCombatSkipped
And the MultiBarRight is to 1.0 scale again (I don't use the MultiBarLeft)
The FrameXML\MultiActionBars.lua:85
Lua Code:
local scale = 1;
if ( contentHeight > availableSpace ) then
scale = availableSpace / contentHeight;
end
MultiBarRight:SetScale(scale); --> line 85
if ( showLeft ) then
MultiBarLeft:SetScale(scale);
end
I really don't understand why is not possible in an easy way to set scale to a value different from 1
P.s.
The other thing I don't understand is why if I call this code instead:
Lua Code:
hooksecurefunc(MultiBarRight, "SetScale", function(self, scale)
self:SetScale(0.8)
end)
which basically do the same thing of the code above it fired a lot of errors like:
Lua Code:
7x C stack overflow
[C]: in function `SetScale'
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
[C]: in function `SetScale'
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
[C]: in function `SetScale'
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
[C]: in function `SetScale'
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
[C]: in function `SetScale'
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
[C]: in function `SetScale'
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
...
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
[C]: in function `SetScale'
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
[C]: in function `SetScale'
gmActionBars\core.lua:6: in function <gmActionBars\core.lua:5>
[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>
Locals:
(*temporary) = MultiBarRight {
0 = <userdata>
SetScale = <function> defined =[C]:-1
slideOut = <unnamed> {
}
}
(*temporary) = 0.800000
(*temporary) = <function> defined =[C]:-1
(*temporary) = MultiBarRight {
0 = <userdata>
SetScale = <function> defined =[C]:-1
slideOut = <unnamed> {
}
}
(*temporary) = 0.800000
= <function> defined =[C]:-1
= <function> defined @gmActionBars\core.lua:5