Merge pull request #108 from argonui/cleanuphelper

Clean Up Helper: Settings UI
This commit is contained in:
Chr1Z 2022-12-19 20:43:46 +01:00 committed by GitHub
commit 8c49cb0141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 20 deletions

View File

@ -31,12 +31,12 @@
{
"Type": 0,
"Name": "option_on",
"URL": "http://cloud-3.steamusercontent.com/ugc/2024961953545431779/1D892EC9A38B06B8D34692642CDEEECF928DCE1C/"
"URL": "http://cloud-3.steamusercontent.com/ugc/2024962321889555728/22ABD35CBB49A001F3A5318E4AFCFB22D24FEA39/"
},
{
"Type": 0,
"Name": "option_off",
"URL": "http://cloud-3.steamusercontent.com/ugc/2024961953545431709/07AD4D32B5C29A3B9F0917924CF7010A29DC3CE4/"
"URL": "http://cloud-3.steamusercontent.com/ugc/2024962321889555661/6643E5CC9160FF4624672C255D0DF7B313DA00A5/"
}
],
"Description": "Cleans up the table for the next scenario during campaign play.\n\nThis includes moving cards and tokens into the trashcans, resetting counters and removing bless/curse tokens from the chaos bag.",
@ -68,9 +68,9 @@
"rotX": 0,
"rotY": 270,
"rotZ": 0,
"scaleX": 2,
"scaleX": 1.5,
"scaleY": 1,
"scaleZ": 2
"scaleZ": 1.5
},
"Value": 0,
"XmlUI_path": "Fan-MadeAccessories.aa8b38/CleanUpHelper.26cf4b.xml"

View File

@ -165,6 +165,7 @@ function cleanUp()
printToAll("Clean up started!", "Orange")
printToAll("Resetting counters...", "White")
ignoreCustomDataHelper()
getTrauma()
updateCounters(DAMAGE_HORROR_GUIDS, RESET_VALUES, "Damage / Horror")
updateCounters(RESOURCE_GUIDS, 5, "Resources")
@ -227,6 +228,13 @@ function resetDoomCounter()
end
end
-- gets the GUID of a custom data helper (if present) and adds it to the ignore list
function ignoreCustomDataHelper()
local playArea = getObjectFromGUID("721ba2")
local guid = playArea.getVar("custom_data_helper_guid")
if guid then table.insert(IGNORE_GUIDS, guid) end
end
-- read values for trauma from campaign log if enabled
function getTrauma()
RESET_VALUES = {

View File

@ -1,26 +1,26 @@
<!-- Default formatting -->
<Defaults>
<Text color="black" alignment="MiddleLeft"/>
<Text class="h1" fontSize="115" font="font_teutonic-arkham"/>
<Text class="h2" fontSize="80" font="font_teutonic-arkham"/>
<Text class="p" fontSize="40" alignment="UpperLeft"/>
<Text class="h1" fontSize="160" font="font_teutonic-arkham"/>
<Text class="h2" fontSize="120" font="font_teutonic-arkham"/>
<Text class="p" fontSize="60" alignment="UpperLeft"/>
<Panel rotation="0 0 180"/>
<Panel class="window" width="1000" height="1000" color="black" outline="white" outlineSize="8 8"/>
<Panel class="window" width="1500" height="1500" color="white" outline="white" outlineSize="10 10"/>
<Row dontUseTableRowBackground="true"/>
<Row class="header" color="#707070"/>
<Row class="option" preferredHeight="130" color="#9e9e9e"/>
<Row class="option" preferredHeight="200" color="#9e9e9e"/>
<!-- heights: 45 x lines + 40 -->
<!-- row heights: 70 x lines + 50 -->
<Row class="description" color="#cfcfcf"/>
<Button class="optionToggle" rectAlignment="MiddleRight" offsetXY="-20 0" colors="#FFFFFF|#dfdfdf" height="108" width="225" ignoreLayout="True" fontSize="60"/>
<Button class="optionToggle" rectAlignment="MiddleRight" offsetXY="-30 0" colors="#FFFFFF|#dfdfdf" height="160" width="288" ignoreLayout="True" fontSize="60"/>
</Defaults>
<!-- Option window -->
<Panel id="options" class="window" offsetXY="-460 0" scale="0.5 0.5" active="false" showAnimation="FadeIn" hideAnimation="FadeOut">
<TableLayout cellPadding="15 15 5 5">
<Panel id="options" class="window" offsetXY="-580 200" scale="0.5 0.5" active="false" showAnimation="FadeIn" hideAnimation="FadeOut">
<TableLayout cellPadding="25 25 15 15">
<!-- Header -->
<Row class="header">
<Cell>
@ -32,12 +32,12 @@
<Row class="option">
<Cell>
<Text class="h2">Import trauma</Text>
<Button id="importTrauma" onClick="optionButtonClick(importTrauma)" class="optionToggle" image="option_on"/>
<Button class="optionToggle" id="importTrauma" onClick="optionButtonClick(importTrauma)" image="option_on"/>
</Cell>
</Row>
<Row class="description" preferredHeight="220">
<Row class="description" preferredHeight="330">
<Cell>
<Text class="p">Controls whether trauma values should be imported from the campaign log (if possible).&#xA;Enter players in the campaign log in this order:&#xA;White, Orange, Green, Red.</Text>
<Text class="p">Enables importing trauma values from the campaign log (custom content might give wrong values!).&#xA;Enter players in the campaign log in this order:&#xA;White, Orange, Green, Red.</Text>
</Cell>
</Row>
@ -45,10 +45,10 @@
<Row class="option">
<Cell>
<Text class="h2">Tidy playermats</Text>
<Button id="tidyPlayermats" onClick="optionButtonClick(tidyPlayermats)" class="optionToggle" image="option_on"/>
<Button class="optionToggle" id="tidyPlayermats" onClick="optionButtonClick(tidyPlayermats)" image="option_on"/>
</Cell>
</Row>
<Row class="description" preferredHeight="130">
<Row class="description" preferredHeight="190">
<Cell>
<Text class="p">Controls whether the playermats should get tidied (removal of all cards and tokens).</Text>
</Cell>
@ -58,10 +58,10 @@
<Row class="option">
<Cell>
<Text class="h2">Remove drawn lines</Text>
<Button id="removeDrawnLines" onClick="optionButtonClick(removeDrawnLines)" class="optionToggle" image="option_off"/>
<Button class="optionToggle" id="removeDrawnLines" onClick="optionButtonClick(removeDrawnLines)" image="option_off"/>
</Cell>
</Row>
<Row class="description" preferredHeight="85">
<Row class="description" preferredHeight="120">
<Cell>
<Text class="p">Controls whether all drawn lines should be removed.</Text>
</Cell>