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
|
||||||
makeXMLButton()
|
if sigil and sigil ~= nil then
|
||||||
|
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,30 +69,35 @@ 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()
|
||||||
self.UI.setXmlTable({
|
if sigil and sigil ~= nil then
|
||||||
{
|
makeXMLButton()
|
||||||
tag = "Button",
|
else
|
||||||
attributes = {
|
self.UI.setXmlTable({
|
||||||
height = 450,
|
{
|
||||||
width = 1400,
|
tag = "Button",
|
||||||
rotation = "0 0 180",
|
attributes = {
|
||||||
scale = "0.1 0.1 1",
|
height = 450,
|
||||||
position = "0 -55 -22",
|
width = 1400,
|
||||||
padding = "50 50 50 50",
|
rotation = "0 0 180",
|
||||||
font = "font_teutonic-arkham",
|
scale = "0.1 0.1 1",
|
||||||
fontSize = 300,
|
position = "0 -55 -22",
|
||||||
onClick = "chooseSigil",
|
padding = "50 50 50 50",
|
||||||
color = "#77674DE6",
|
font = "font_teutonic-arkham",
|
||||||
textColor = "White"
|
fontSize = 300,
|
||||||
},
|
onClick = "chooseSigil",
|
||||||
value = "Choose Sigil"
|
color = "#77674DE6",
|
||||||
|
textColor = "White"
|
||||||
|
},
|
||||||
|
value = "Choose Sigil"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
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