final changes

This commit is contained in:
dscarpac 2024-02-15 16:22:58 -06:00
parent ff184cb175
commit 335695a09f
4 changed files with 36 additions and 27 deletions

View File

@ -70,9 +70,9 @@ do
---@param mat tts__Object Playermat that triggered this ---@param mat tts__Object Playermat that triggered this
---@param drawAdditional boolean Controls whether additional tokens should be drawn ---@param drawAdditional boolean Controls whether additional tokens should be drawn
---@param tokenType? string Name of token (e.g. "Bless") to be drawn from the bag ---@param tokenType? string Name of token (e.g. "Bless") to be drawn from the bag
---@param sealedToken? string GUID of the sealed token to be resolved instead of drawing a token from the bag ---@param guidToBeResolved? string GUID of the sealed token to be resolved instead of drawing a token from the bag
ChaosBagApi.drawChaosToken = function(mat, drawAdditional, tokenType, cardSealedToken) ChaosBagApi.drawChaosToken = function(mat, drawAdditional, tokenType, guidToBeResolved)
return Global.call("drawChaosToken", {mat = mat, drawAdditional = drawAdditional, tokenType = tokenType, sealedToken = guidToBeResolved}) return Global.call("drawChaosToken", {mat = mat, drawAdditional = drawAdditional, tokenType = tokenType, guidToBeResolved = guidToBeResolved})
end end
-- returns a Table List of chaos token ids in the current chaos bag -- returns a Table List of chaos token ids in the current chaos bag

View File

@ -302,9 +302,11 @@ function drawChaosToken(params)
-- add the token to the list, compute new position based on list length -- add the token to the list, compute new position based on list length
tokenOffset[1] = tokenOffset[1] + (0.17 * #chaosTokens) tokenOffset[1] = tokenOffset[1] + (0.17 * #chaosTokens)
if params.sealedToken then -- resolve a sealed token from a card local token
token = getObjectFromGUID(params.sealedToken)
if params.guidToBeResolved then -- resolve a sealed token from a card
token = getObjectFromGUID(params.guidToBeResolved)
token.setPositionSmooth(params.mat.positionToWorld(tokenOffset)) token.setPositionSmooth(params.mat.positionToWorld(tokenOffset))
local guid = token.getGUID() local guid = token.getGUID()
local tokenType = token.getName() local tokenType = token.getName()

View File

@ -109,7 +109,7 @@ function generateContextMenu()
firstTokenType = tokenType firstTokenType = tokenType
break break
end end
self.addContextMenuItem("Resolve " .. firstTokenType .. " token", resolveSealed) self.addContextMenuItem("Resolve " .. firstTokenType, resolveSealed)
end end
-- conditional release option -- conditional release option

View File

@ -1,41 +1,48 @@
<Panel <Defaults>
position="0 -55 -22" <Button padding="50 50 50 50"
rotation="0 0 180" font="font_teutonic-arkham"
height="900" width="1400" fontSize="300"
scale="0.1 0.1 1"> iconWidth="400"
<TableLayout id="actives" active="false" cellSpacing="80" cellBackgroundColor="rgba(1,1,1,0)"> iconAlignment="Right"/>
<Panel position="0 -55 -22"
rotation="0 0 180"
height="900" width="1400"
scale="0.1 0.1 1"/>
<TableLayout active="false"
cellSpacing="80"
cellBackgroundColor="rgba(1,1,1,0)"/>
</Defaults>
<Panel>
<TableLayout id="actives">
<Row> <Row>
<Cell> <Cell>
<Button id="Bless" padding="50 50 50 50" icon="bless" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="White" <Button id="Bless" icon="bless" textColor="White"
onClick="resolveToken" color="#9D702CE6" iconAlignment="Right">Resolve</Button> onClick="resolveToken" color="#9D702CE6" iconAlignment="Right">Resolve</Button>
</Cell> </Cell>
</Row> </Row>
<Row> <Row>
<Cell> <Cell>
<Button id="Curse" padding="50 50 50 50" icon="curse" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="White" <Button id="Curse" icon="curse" textColor="White"
onClick="resolveToken" color="#633A84E6" iconAlignment="Right">Resolve</Button> onClick="resolveToken" color="#633A84E6">Resolve</Button>
</Cell> </Cell>
</Row> </Row>
</TableLayout> </TableLayout>
</Panel> </Panel>
<Panel <Panel>
position="0 -55 -22" <TableLayout id="inactives">
rotation="0 0 180"
height="900" width="1400"
scale="0.1 0.1 1">
<TableLayout id="inactives" active="false" cellSpacing="80" cellBackgroundColor="rgba(1,1,1,0)">
<Row> <Row>
<Cell> <Cell>
<Button id="inactiveBless" padding="50 50 50 50" icon="bless" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="#A0A0A0" <Button id="inactiveBless" icon="bless" textColor="#A0A0A0"
onClick="errorMessage" color="#353535E6" iconAlignment="Right">Resolve</Button> onClick="errorMessage" color="#353535E6">Resolve</Button>
</Cell> </Cell>
</Row> </Row>
<Row> <Row>
<Cell> <Cell>
<Button id="inactiveCurse" padding="50 50 50 50" icon="curse" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="#A0A0A0" <Button id="inactiveCurse" icon="curse" textColor="#A0A0A0"
onClick="errorMessage" color="#353535E6" iconAlignment="Right">Resolve</Button> onClick="errorMessage" color="#353535E6">Resolve</Button>
</Cell> </Cell>
</Row> </Row>
</TableLayout> </TableLayout>
</Panel> </Panel>