recentered buttons and fixed onLoad

This commit is contained in:
dscarpac 2024-02-14 18:13:42 -06:00
parent ef13768c45
commit c12235b9e1
2 changed files with 6 additions and 8 deletions

View File

@ -8,15 +8,13 @@ function onSave()
end
function onLoad(savedData)
self.addContextMenuItem("Enable Helper", createButtons)
if savedData ~= "" then
local loadedData = JSON.decode(savedData)
log(loadedData)
if loadedData.loopId then
currentState = "Empty"
loopId = Wait.time(countBlessCurse, 1, -1)
self.addContextMenuItem("Clear Helper", deleteButtons)
createButtons()
end
else
self.addContextMenuItem("Enable Helper", createButtons)
end
end
@ -30,7 +28,7 @@ function deleteButtons()
loopId = nil
end
-- Create buttons based on the button parameters
-- Create buttons and begin monitoring chaos bag for curse and bless tokens
function createButtons()
self.clearContextMenu()
self.addContextMenuItem("Clear Helper", deleteButtons)

View File

@ -1,5 +1,5 @@
<Panel
position="0 -50 -22"
position="0 -55 -22"
rotation="0 0 180"
height="900" width="1400"
scale="0.1 0.1 1">
@ -20,7 +20,7 @@
</Panel>
<Panel
position="0 -50 -22"
position="0 -55 -22"
rotation="0 0 180"
height="900" width="1400"
scale="0.1 0.1 1">