removed downloading change

This commit is contained in:
Chr1Z93 2023-06-26 16:41:13 +02:00
parent c78ddec973
commit 7f46c9fd63
3 changed files with 71 additions and 9 deletions

View File

@ -1 +1 @@
{"acknowledgedUpgradeVersions":[],"optionPanel":{"playAreaSnapTags":true,"showAttachmentHelper":false,"showChaosBagManager":false,"showCleanUpHelper":false,"showCustomPlaymatImages":false,"showCYOA":false,"showDisplacementTool":false,"showDrawButton":false,"showHandHelper":[],"showSearchAssistant":[],"showTitleSplash":true,"showTokenArranger":false,"useClueClickers":false,"useSnapTags":true}}
{"acknowledgedUpgradeVersions":[],"optionPanel":{"cardLanguage":3,"playAreaSnapTags":true,"showAttachmentHelper":false,"showChaosBagManager":false,"showCleanUpHelper":false,"showCustomPlaymatImages":false,"showCYOA":false,"showDisplacementTool":false,"showDrawButton":false,"showHandHelper":[],"showSearchAssistant":[],"showTitleSplash":true,"showTokenArranger":false,"useClueClickers":false,"useSnapTags":true}}

View File

@ -46,6 +46,27 @@ local SOURCE_REPO = 'https://raw.githubusercontent.com/chr1z93/loadable-objects/
local library, requestObj, modMeta, notificationVisible
local acknowledgedUpgradeVersions = {}
-- language selection
local LANGUAGE_CODES = {
"zh_CN", -- 简体中文
"zh_TW", -- 繁體中文
"de", -- Deutsch
"en", -- English
"es", -- Español
"fr", -- Français
"it" -- Italiano
}
local LANGUAGE_NAMES = {
"简体中文",
"繁體中文",
"Deutsch",
"English",
"Español",
"Français",
"Italiano"
}
---------------------------------------------------------
-- data for tokens
---------------------------------------------------------
@ -838,15 +859,23 @@ function onClick_toggleOption(_, id)
applyOptionPanelChange(id, state)
end
-- called by the language selection dropdown
function languageSelected(_, selectedIndex, id)
optionPanel[id] = tonumber(selectedIndex)
end
-- sets the option panel to the correct state (corresponding to 'optionPanel')
function updateOptionPanelState()
for id, enabled in pairs(optionPanel) do
if (type(enabled) == "boolean" and enabled)
or (type(enabled) == "string" and enabled)
or (type(enabled) == "table" and #enabled ~= 0) then
self.UI.setAttribute(id, "isOn", true)
UI.setAttribute(id, "isOn", true)
-- hard-coded updating of the language selection dropdown
elseif id == "cardLanguage" and type(enabled) == "number" then
UI.setAttribute(id, "value", enabled)
else
self.UI.setAttribute(id, "isOn", "False")
UI.setAttribute(id, "isOn", "False")
end
end
end

View File

@ -6,6 +6,8 @@
<Toggle isOn="False"
rectAlignment="MiddleRight" />
<Dropdown rectAlignment="MiddleCenter" />
<Cell dontUseTableCellBackground="true"
outlineSize="0 1"
outline="grey" />
@ -26,7 +28,7 @@
<Row class="group-header"
preferredHeight="54" />
<Cell class="group-header"
columnSpan="2"
columnSpan="3"
color="#222222" />
<Panel class="group-header"
padding="5 0 0 0" />
@ -38,9 +40,16 @@
<Row class="option-text"
preferredHeight="70"/>
<Cell class="option-text"
color="#333333"/>
color="#333333"
columnSpan="2"/>
<Cell class="option-button"
color="#333333"/>
<Cell class="option-dropdowntext"
color="#333333"
columnSpan="1"/>
<Cell class="option-dropdown"
color="#333333"
columnSpan="2"/>
<VerticalLayout class="text-column"
padding="10 0 0 0"
spacing="5"/>
@ -87,9 +96,9 @@
<Row>
<Cell>
<VerticalScrollView horizontalScrollbarVisibility="AutohideAndExpandViewport">
<TableLayout columnWidths="0 75"
<TableLayout columnWidths="0 100 75"
autoCalculateHeight="1"
cellPadding="10 0 5 5">
cellPadding="10 5 5 5">
<!-- Group: general settings -->
<Row class="group-header">
@ -101,6 +110,30 @@
</Cell>
</Row>
<!-- Option: card language -->
<Row class="option-text">
<Cell class="option-dropdowntext">
<VerticalLayout class="text-column">
<Text class="option-header">Card language</Text>
<Text class="description">Downloading a supported campaign or importing a deck will use this language for the cards.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-dropdown">
<Panel padding="0 17 13 13">
<Dropdown id="cardLanguage"
onValueChanged="languageSelected(selectedIndex)">
<Option>简体中文</Option>
<Option>繁體中文</Option>
<Option>Deutsch</Option>
<Option>English</Option>
<Option>Español</Option>
<Option>Français</Option>
<Option>Italiano</Option>
</Dropdown>
</Panel>
</Cell>
</Row>
<!-- Option: play area snap tags -->
<Row class="option-text">
<Cell class="option-text">
@ -171,7 +204,7 @@
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Use clickable clue-counters</Text>
<Text class="option-header">Use clickable clue counters</Text>
<Text class="description">Instead of automatically counting clues in the respective area on your playermat, this displays a clickable counter for clues.</Text>
</VerticalLayout>
</Cell>
@ -185,7 +218,7 @@
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Use clickable resource counters</Text>
<Text class="option-header">Use clickable resource tokens</Text>
<Text class="description">This enables spawning of clickable resource tokens for player cards.</Text>
</VerticalLayout>
</Cell>