UI done for now
This commit is contained in:
parent
df9cff8f38
commit
d4beeeb95d
@ -615,9 +615,15 @@ end
|
||||
|
||||
local PlayerMatAPI = require("playermat/PlaymatApi")
|
||||
function onClick_applySettings()
|
||||
printToAll("---------------------", "White")
|
||||
printToAll("Applying settings...", "White")
|
||||
local printed = false
|
||||
|
||||
for id, state in pairs(optionPanel) do
|
||||
if not printed then
|
||||
printToAll("---------------------", "White")
|
||||
printToAll("Applying settings...", "White")
|
||||
printed = true
|
||||
end
|
||||
|
||||
if state then print(id) end
|
||||
|
||||
-- option 1: Snap tags
|
||||
@ -627,6 +633,12 @@ function onClick_applySettings()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if not printed then
|
||||
printToAll("---------------------", "White")
|
||||
printToAll("Not settings selected!", "White")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function onClick_toggleUi(_, title)
|
||||
|
@ -1,31 +1,29 @@
|
||||
<!-- Default formatting -->
|
||||
<Defaults>
|
||||
<!-- general Stuff -->
|
||||
<Text color="white" fontSize="16"/>
|
||||
<Button tooltipPosition="Left" color="black"/>
|
||||
<Text color="white" fontSize="18"/>
|
||||
<Button tooltipPosition="Left" color="clear"/>
|
||||
<VerticalLayout color="black" visibility="Admin"/>
|
||||
|
||||
<!-- Window title and buttons -->
|
||||
<!-- Window -->
|
||||
<HorizontalLayout class="headerLayout" height="75" padding="5"/>
|
||||
<Button class="headerButton" minWidth="50" preferredWidth="50" flexibleWidth="0" color="clear"/>
|
||||
<Text class="headerText" minWidth="200" flexibleWidth="100" fontSize="32"/>
|
||||
|
||||
<!-- Window layouting -->
|
||||
<VerticalLayout color="black" visibility="Admin" outlineSize="1 1" outline="#303030"/>
|
||||
<Text class="headerText" minWidth="200" flexibleWidth="100" fontSize="32" font="font_birmingham"/>
|
||||
</Defaults>
|
||||
|
||||
<!-- Buttons in the bottom right of the screen -->
|
||||
<VerticalLayout rectAlignment="LowerRight" width="40" height="240" offsetXY="-1 70">
|
||||
<Button color="#000000" icon="cthulhu" tooltip="Campaigns" onClick="onClick_toggleUi(Campaigns)"/>
|
||||
<Button color="#000000" icon="dark-cult" tooltip="Standalone Scenarios" onClick="onClick_toggleUi(Standalone Scenarios)"/>
|
||||
<Button color="#000000" icon="yog-sothoth" tooltip="Extras" onClick="onClick_toggleUi(Extras)"/>
|
||||
<Button color="#000000" icon="elder-sign" tooltip="Investigators" onClick="onClick_toggleUi(Investigators)"/>
|
||||
<Button color="#000000" icon="devourer" tooltip="Community Content" onClick="onClick_toggleUi(Community Content)"/>
|
||||
<Button color="#000000" icon="option-gear" tooltip="Option Panel" onClick="onClick_toggleUi(Option Panel)"/>
|
||||
<VerticalLayout color="clear" rectAlignment="LowerRight" width="40" height="240" offsetXY="-1 60" spacing="2">
|
||||
<Button icon="cthulhu" tooltip="Campaigns" onClick="onClick_toggleUi(Campaigns)"/>
|
||||
<Button icon="dark-cult" tooltip="Standalone Scenarios" onClick="onClick_toggleUi(Standalone Scenarios)"/>
|
||||
<Button icon="yog-sothoth" tooltip="Extras" onClick="onClick_toggleUi(Extras)"/>
|
||||
<Button icon="elder-sign" tooltip="Investigators" onClick="onClick_toggleUi(Investigators)"/>
|
||||
<Button icon="devourer" tooltip="Community Content" onClick="onClick_toggleUi(Community Content)"/>
|
||||
<Button icon="option-gear" tooltip="Option Panel" onClick="onClick_toggleUi(Option Panel)"/>
|
||||
<!--<Button icon="download" tooltip="ArkhamDB Deck Importer" onClick="onClick_toggleUi(Deck Importer)"/> -->
|
||||
</VerticalLayout>
|
||||
|
||||
<!-- Basic UI that will be replaced based on title -->
|
||||
<VerticalLayout id="load_ui" active="false" width="800" height="780">
|
||||
<VerticalLayout id="load_ui" active="false" width="700" height="780" outlineSize="1 1" outline="#303030">
|
||||
<HorizontalLayout class="headerLayout">
|
||||
<Button class="headerButton" icon="refresh" tooltip="Refresh List" tooltipPosition="Right" onClick="onClick_refreshList"/>
|
||||
<Text id="title" class="headerText">Loadable Items</Text>
|
||||
|
@ -1,66 +1,97 @@
|
||||
<!-- Default formatting -->
|
||||
<Defaults>
|
||||
<!-- general Stuff -->
|
||||
<Text font="font_birmingham" color="white" fontSize="16"/>
|
||||
<Button font="font_birmingham" tooltipPosition="Left" color="black"/>
|
||||
<Toggle font="font_birmingham" textColor="#AAAAAA" fontSize="17" isOn="False"/>
|
||||
<Text color="white" alignment="MiddleLeft"/>
|
||||
<Toggle font="font_birmingham" textColor="white" fontSize="18" isOn="False" textAlignment="UpperLeft"/>
|
||||
|
||||
<!-- Window title and buttons -->
|
||||
<HorizontalLayout class="headerLayout" height="75" padding="5"/>
|
||||
<Button class="headerButton" minWidth="50" preferredWidth="50" flexibleWidth="0" color="clear"/>
|
||||
<Text class="headerText" minWidth="200" flexibleWidth="100" fontSize="32"/>
|
||||
<VerticalLayout class="window" active="false" color="black" visibility="Admin" outlineSize="1 1" outline="grey" allowDragging="true" returnToOriginalPositionWhenReleased="false" width="400" height="800"/>
|
||||
<VerticalLayout class="group" outlineSize="1 1" outline="grey" color="#222222" padding="10" spacing="5"/>
|
||||
<VerticalLayout class="group-content" color="#444444" padding="5" spacing="5"/>
|
||||
|
||||
<!-- Window layouting -->
|
||||
<VerticalLayout color="black" visibility="Admin" outlineSize="1 1" outline="#303030"/>
|
||||
<VerticalLayout class="window" active="false" width="800" height="780"/>
|
||||
<Text class="group-header" fontSize="20" font="font_uglyqua"/>
|
||||
<Text class="description" fontSize="14"/>
|
||||
|
||||
<Row class="tblRow" preferredHeight="75"/>
|
||||
<Button class="bottomButtons" hoverClass="hover" pressClass="press" selectClass="select" color="#888888" minHeight="35" fontSize="24" font="font_birmingham"/>
|
||||
<Button class="hover" color="grey"/>
|
||||
<Button class="press" color="white"/>
|
||||
<Button class="select" color="white"/>
|
||||
</Defaults>
|
||||
|
||||
<!-- Option Panel -->
|
||||
<VerticalLayout id="optionPanel" class="window">
|
||||
<HorizontalLayout class="headerLayout">
|
||||
<Button class="headerButton" icon="refresh" tooltip="Default Settings" tooltipPosition="Right" onClick="onClick_defaultSettings"/>
|
||||
<Text class="headerText">Option Panel</Text>
|
||||
<Button class="headerButton" icon="close" tooltip="Close" onClick="onClick_toggleUi(Hidden)"/>
|
||||
</HorizontalLayout>
|
||||
<VerticalScrollView color="transparent" minHeight="100" flexibleHeight="100">
|
||||
<TableLayout padding="20" cellPadding="10" cellSpacing="10">
|
||||
<Row class="tblRow">
|
||||
<Cell>
|
||||
<Toggle id="toggle1" onValueChanged="onClick_toggleOption(1)">Playermats: Snap tags for 'Assets'</Toggle>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Toggle id="toggle2" onValueChanged="onClick_toggleOption(2)">Toggle Text 2</Toggle>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row class="tblRow">
|
||||
<Cell>
|
||||
<Toggle id="toggle3" onValueChanged="onClick_toggleOption(3)">Toggle Text 3</Toggle>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Toggle id="toggle4" onValueChanged="onClick_toggleOption(4)">Toggle Text 4</Toggle>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row class="tblRow">
|
||||
<Cell>
|
||||
<Toggle id="toggle5" onValueChanged="onClick_toggleOption(5)">Toggle Text 5</Toggle>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Toggle id="toggle6" onValueChanged="onClick_toggleOption(6)">Toggle Text 6</Toggle>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row class="tblRow">
|
||||
<Cell>
|
||||
<Toggle id="toggle7" onValueChanged="onClick_toggleOption(7)">Toggle Text 7</Toggle>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Toggle id="toggle8" onValueChanged="onClick_toggleOption(8)">Toggle Text 8</Toggle>
|
||||
</Cell>
|
||||
</Row>
|
||||
</TableLayout>
|
||||
</VerticalScrollView>
|
||||
<Panel color="rgb(0,0,0)" minHeight="50" preferredHeight="50" flexibleHeight="0">
|
||||
<Button onClick="onClick_applySettings" color="#888888" fontSize="25">Apply Settings</Button>
|
||||
<VerticalLayout id="optionPanel" class="window" spacing="10">
|
||||
<Panel minHeight="45" padding="15 15 0 0">
|
||||
<Text font="font_birmingham" fontSize="35">Option Panel</Text>
|
||||
</Panel>
|
||||
<VerticalLayout>
|
||||
<!-- Group 1 -->
|
||||
<VerticalLayout class="group">
|
||||
<Panel minHeight="30">
|
||||
<Text class="group-header">PLAYERMATS</Text>
|
||||
</Panel>
|
||||
|
||||
<!-- Option 1 -->
|
||||
<VerticalLayout class="group-content">
|
||||
<Toggle id="toggle1" onValueChanged="onClick_toggleOption(1)">Enable snap tags</Toggle>
|
||||
<Text class="description">Only cards with the tag "Asset" will snap (official cards are supported by default). Disable this if you are having issues with custom content.</Text>
|
||||
</VerticalLayout>
|
||||
|
||||
<!-- Option 2 -->
|
||||
<VerticalLayout class="group-content">
|
||||
<Toggle id="toggle2" onValueChanged="onClick_toggleOption(2)">Toggle Text 2</Toggle>
|
||||
<Text class="description">Description for Option 2</Text>
|
||||
</VerticalLayout>
|
||||
|
||||
<!-- Option 3 -->
|
||||
<VerticalLayout class="group-content">
|
||||
<Toggle id="toggle3" onValueChanged="onClick_toggleOption(3)">Toggle Text 3</Toggle>
|
||||
<Text class="description">Description for Option 3</Text>
|
||||
</VerticalLayout>
|
||||
</VerticalLayout>
|
||||
|
||||
<!-- Group 2 -->
|
||||
<VerticalLayout class="group">
|
||||
<Panel minHeight="30">
|
||||
<Text class="group-header">Group 2</Text>
|
||||
</Panel>
|
||||
<!-- Option 4 -->
|
||||
<VerticalLayout class="group-content">
|
||||
<Toggle id="toggle4" onValueChanged="onClick_toggleOption(4)">Toggle Text 4</Toggle>
|
||||
<Text class="description">Description for Option 4</Text>
|
||||
</VerticalLayout>
|
||||
|
||||
<!-- Option 5 -->
|
||||
<VerticalLayout class="group-content">
|
||||
<Toggle id="toggle5" onValueChanged="onClick_toggleOption(5)">Toggle Text 5</Toggle>
|
||||
<Text class="description">Description for Option 5</Text>
|
||||
</VerticalLayout>
|
||||
|
||||
<!-- Option 6 -->
|
||||
<VerticalLayout class="group-content">
|
||||
<Toggle id="toggle6" onValueChanged="onClick_toggleOption(6)">Toggle Text 6</Toggle>
|
||||
<Text class="description">Description for Option 6</Text>
|
||||
</VerticalLayout>
|
||||
</VerticalLayout>
|
||||
|
||||
<!-- Group 3 -->
|
||||
<VerticalLayout class="group">
|
||||
<Panel minHeight="30">
|
||||
<Text class="group-header">Group 3</Text>
|
||||
</Panel>
|
||||
<!-- Option 7 -->
|
||||
<VerticalLayout class="group-content">
|
||||
<Toggle id="toggle7" onValueChanged="onClick_toggleOption(7)">Toggle Text 7</Toggle>
|
||||
<Text class="description">Description for Option 7</Text>
|
||||
</VerticalLayout>
|
||||
|
||||
<!-- Option 8 -->
|
||||
<VerticalLayout class="group-content">
|
||||
<Toggle id="toggle8" onValueChanged="onClick_toggleOption(8)">Toggle Text 8</Toggle>
|
||||
<Text class="description">Description for Option 8</Text>
|
||||
</VerticalLayout>
|
||||
</VerticalLayout>
|
||||
</VerticalLayout>
|
||||
<HorizontalLayout minHeight="70" padding="5" spacing="5">
|
||||
<Button class="bottomButtons" onClick="onClick_defaultSettings">Load defaults</Button>
|
||||
<Button class="bottomButtons" onClick="onClick_applySettings">Apply</Button>
|
||||
<Button class="bottomButtons" onClick="onClick_toggleUi(Hidden)">Cancel</Button>
|
||||
</HorizontalLayout>
|
||||
</VerticalLayout>
|
Loading…
x
Reference in New Issue
Block a user