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