more changes
This commit is contained in:
parent
c35d0cd7c0
commit
f957ea2511
@ -27,15 +27,17 @@ function updateSave()
|
||||
end
|
||||
|
||||
function onLoad(savedData)
|
||||
syncDisplayWithOptionPanel()
|
||||
if savedData and savedData ~= "" then
|
||||
local loadedData = JSON.decode(savedData)
|
||||
isHelperEnabled = loadedData.isHelperEnabled
|
||||
sigil = loadedData.sigil
|
||||
if sigil and sigil ~= nil then
|
||||
makeXMLButton()
|
||||
end
|
||||
self.clearContextMenu()
|
||||
self.addContextMenuItem("Clear Helper", toggleHelper)
|
||||
end
|
||||
syncDisplayWithOptionPanel()
|
||||
end
|
||||
|
||||
function makeXMLButton()
|
||||
@ -67,10 +69,14 @@ function makeXMLButton()
|
||||
}
|
||||
}
|
||||
)
|
||||
updateSave()
|
||||
end
|
||||
|
||||
-- Create XML button to prompt choosing a sigil; acts as this card's helper
|
||||
function initialize()
|
||||
if sigil and sigil ~= nil then
|
||||
makeXMLButton()
|
||||
else
|
||||
self.UI.setXmlTable({
|
||||
{
|
||||
tag = "Button",
|
||||
@ -92,6 +98,7 @@ function initialize()
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
-- Create dialog window to choose sigil and create sigil-drawing button
|
||||
function chooseSigil(player)
|
||||
@ -112,11 +119,13 @@ function chooseSigil(player)
|
||||
makeXMLButton()
|
||||
end
|
||||
)
|
||||
updateSave()
|
||||
end
|
||||
|
||||
function shutOff()
|
||||
self.UI.setXml("")
|
||||
sigil = nil
|
||||
updateSave()
|
||||
end
|
||||
|
||||
function resolveSigil()
|
||||
|
Loading…
Reference in New Issue
Block a user