Added an assertion with an detailed error message to debug an error in the action button code.

This commit is contained in:
Hendrik Leppkes
2009-02-26 15:16:03 +01:00
parent 1f8d66d4fa
commit cf06d4d754
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -265,6 +265,7 @@ end
function Button:RefreshStateAction(state)
local state = tonumber(state or self:GetAttribute("state")) or 0
local action = self.stateactions[state]
assert(action, ("No valid action for state %d on button %d of Bar %d"):format(state, self.rid, self.parent.id))
self:SetAttribute("action-"..state, action)
if action > 120 and action <= 126 then
+1 -1
View File
@@ -380,7 +380,7 @@ function Bar:ControlFadeOut()
fade = min(max(fade, 0), 100) / 100
self:SetAlpha(fade)
else
self:SetAlpha(self.config.fadeoutalpha)
self:SetAlpha(self.config.fadeoutalpha or 0)
end
self.faded = true
end