small updates

This commit is contained in:
dscarpac 2024-02-14 13:01:08 -06:00
parent 2ee32e58f5
commit 73fa890eb2
3 changed files with 35 additions and 23 deletions

View File

@ -16,10 +16,6 @@ function onLoad(savedData)
self.addContextMenuItem("Clear Helper", deleteButtons) self.addContextMenuItem("Clear Helper", deleteButtons)
end end
else else
self.UI.hide("active_bless")
self.UI.hide("inactive_bless")
self.UI.hide("inactive_curse")
self.UI.hide("active_curse")
self.addContextMenuItem("Enable Helper", createButtons) self.addContextMenuItem("Enable Helper", createButtons)
end end
end end
@ -40,6 +36,8 @@ end
function createButtons() function createButtons()
self.clearContextMenu() self.clearContextMenu()
self.addContextMenuItem("Clear Helper", deleteButtons) self.addContextMenuItem("Clear Helper", deleteButtons)
self.UI.setAttribute("inactives", "active", true)
self.UI.setAttribute("actives", "active", true)
currentState = "Empty" currentState = "Empty"
loopId = Wait.time(countBlessCurse, 1, -1) loopId = Wait.time(countBlessCurse, 1, -1)
end end
@ -59,7 +57,7 @@ function resolveBless()
end end
function countBlessCurse() function countBlessCurse()
-- count tokens in the bag and show appropriate button -- count tokens in the bag and show appropriate buttons
numInBag = { Bless = 0, Curse = 0 } numInBag = { Bless = 0, Curse = 0 }
local chaosBag = chaosBagApi.findChaosBag() local chaosBag = chaosBagApi.findChaosBag()
local tokens = {} local tokens = {}

View File

@ -1,27 +1,41 @@
<Panel <Panel
position="0 -50 -22" position="0 -50 -22"
rotation="0 0 180" rotation="0 0 180"
height="900" width="1400" height="900" width="1400"
scale="0.1 0.1 1" active="true"> scale="0.1 0.1 1">
<TableLayout cellSpacing="80" cellBackgroundColor="rgba(1,1,1,0)"> <TableLayout id="actives" active="false" cellSpacing="80" cellBackgroundColor="rgba(1,1,1,0)">
<Row><Cell> <Row>
<Cell>
<Button id="active_bless" padding="50 50 50 50" icon="bless" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="White" <Button id="active_bless" padding="50 50 50 50" icon="bless" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="White"
onClick="resolveBless" color="#9D702CE6" iconAlignment="Right">Resolve</Button></Cell></Row> onClick="resolveBless" color="#9D702CE6" iconAlignment="Right">Resolve</Button>
<Row><Cell> </Cell>
</Row>
<Row>
<Cell>
<Button id="active_curse" padding="50 50 50 50" icon="curse" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="White" <Button id="active_curse" padding="50 50 50 50" icon="curse" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="White"
onClick="resolveCurse" color="#37232FE6" iconAlignment="Right">Resolve</Button></Cell></Row></TableLayout> onClick="resolveCurse" color="#37232FE6" iconAlignment="Right">Resolve</Button>
</Cell>
</Row>
</TableLayout>
</Panel> </Panel>
<Panel <Panel
position="0 -50 -22" position="0 -50 -22"
rotation="0 0 180" rotation="0 0 180"
height="900" width="1400" height="900" width="1400"
scale="0.1 0.1 1" active="true"> scale="0.1 0.1 1">
<TableLayout cellSpacing="80" cellBackgroundColor="rgba(1,1,1,0)"> <TableLayout id="inactives" active="false" cellSpacing="80" cellBackgroundColor="rgba(1,1,1,0)">
<Row><Cell> <Row>
<Cell>
<Button id="inactive_bless" padding="50 50 50 50" icon="bless" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="#A0A0A0" <Button id="inactive_bless" padding="50 50 50 50" icon="bless" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="#A0A0A0"
color="#5C5C5CE6" iconAlignment="Right">Resolve</Button></Cell></Row> color="#5C5C5CE6" iconAlignment="Right">Resolve</Button>
<Row><Cell> </Cell>
</Row>
<Row>
<Cell>
<Button id="inactive_curse" padding="50 50 50 50" icon="curse" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="#A0A0A0" <Button id="inactive_curse" padding="50 50 50 50" icon="curse" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="#A0A0A0"
color="#353535E6" iconAlignment="Right">Resolve</Button></Cell></Row></TableLayout> color="#353535E6" iconAlignment="Right">Resolve</Button>
</Cell>
</Row>
</TableLayout>
</Panel> </Panel>