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 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 sealedToken? string GUID of the sealed token to be resolved instead of drawing a token from the bag
ChaosBagApi.drawChaosToken = function(mat, drawAdditional, tokenType, cardSealedToken)
return Global.call("drawChaosToken", {mat = mat, drawAdditional = drawAdditional, tokenType = tokenType, sealedToken = guidToBeResolved})
---@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, guidToBeResolved)
return Global.call("drawChaosToken", {mat = mat, drawAdditional = drawAdditional, tokenType = tokenType, guidToBeResolved = guidToBeResolved})
end
-- 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
tokenOffset[1] = tokenOffset[1] + (0.17 * #chaosTokens)
if params.sealedToken then -- resolve a sealed token from a card
token = getObjectFromGUID(params.sealedToken)
local token
if params.guidToBeResolved then -- resolve a sealed token from a card
token = getObjectFromGUID(params.guidToBeResolved)
token.setPositionSmooth(params.mat.positionToWorld(tokenOffset))
local guid = token.getGUID()
local tokenType = token.getName()

View File

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

View File

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