repairing save function, XML animation added
This commit is contained in:
parent
1edf2c084e
commit
a312ede891
@ -16,22 +16,10 @@
|
||||
</TableLayout>
|
||||
</Panel>
|
||||
|
||||
<Panel id="Options" offsetXY="0 535" active="false">
|
||||
<Panel id="Options" offsetXY="0 535" active="false" showAnimation="Grow" hideAnimation="Shrink">
|
||||
<VerticalLayout height="300" width="500" spacing="10" childAlignment="MiddleCenter">
|
||||
<ToggleButton
|
||||
class="optionButton"
|
||||
id="optionAgenda"
|
||||
onClick="optionClick(Agenda)"
|
||||
>Doom on Agenda</ToggleButton>
|
||||
<ToggleButton
|
||||
class="optionButton"
|
||||
id="optionPlayarea"
|
||||
onClick="optionClick(Playarea)"
|
||||
>Doom in Playarea</ToggleButton>
|
||||
<ToggleButton
|
||||
class="optionButton"
|
||||
id="optionPlayermats"
|
||||
onClick="optionClick(Playermats)"
|
||||
>Doom on Playermats</ToggleButton>
|
||||
<ToggleButton class="optionButton" id="optionAgenda" onClick="optionClick(Agenda)">Doom on Agenda</ToggleButton>
|
||||
<ToggleButton class="optionButton" id="optionPlayarea" onClick="optionClick(Playarea)">Doom in Playarea</ToggleButton>
|
||||
<ToggleButton class="optionButton" id="optionPlayermats" onClick="optionClick(Playermats)">Doom on Playermats</ToggleButton>
|
||||
</VerticalLayout>
|
||||
</Panel>
|
||||
|
@ -18,9 +18,7 @@ function onLoad(savedData)
|
||||
|
||||
-- restore state for option panel
|
||||
for key, bool in pairs(options) do
|
||||
if bool then
|
||||
self.UI.setAttribute("option" .. key, "isOn", 0)
|
||||
end
|
||||
self.UI.setAttribute("option" .. key, "isOn", not bool)
|
||||
end
|
||||
end
|
||||
|
||||
@ -41,7 +39,9 @@ end
|
||||
-- called by the invisible button to change displayed value
|
||||
function addOrSubtract(_, _, isRightClick)
|
||||
local newVal = math.min(math.max(val + (isRightClick and -1 or 1), 0), 99)
|
||||
if val ~= newVal then updateVal(newVal) end
|
||||
if val ~= newVal then
|
||||
updateVal(newVal)
|
||||
end
|
||||
end
|
||||
|
||||
function updateVal(number)
|
||||
@ -55,7 +55,11 @@ function startReset()
|
||||
if options.Agenda then
|
||||
updateVal(0)
|
||||
end
|
||||
getObjectFromGUID("652ff3").call("removeDoom", options)
|
||||
-- call the "Doom-in-Play"-counter
|
||||
local DoomInPlayCounter = getObjectFromGUID("652ff3")
|
||||
if DoomInPlayCounter then
|
||||
DoomInPlayCounter.call("removeDoom", options)
|
||||
end
|
||||
end
|
||||
|
||||
-- XML UI functions
|
||||
|
Loading…
Reference in New Issue
Block a user