This is a test script to help me learn how to set up a GUI for my myprices script.
What it SHOULD do is open a 3 tab window , set the checkbox to ON and then react when it's ticked on and off.
What it's doing is opening the window , NOT ticking the checkbox and always reporting that the checkbox is un-ticked regardless..
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<ISUI>
<template name='My.window.TitleBar'>
<Border>1</Border>
<x>3</x>
<BorderColor>FF000033</BorderColor>
<Width>r6</Width>
<Height>26</Height>
<Texture Template='EQ2.window.TitleBar.Texture' />
<Children>
<Text Name='Title' template='EQ2.window.TitleBar.title' />
<Button Name='Minimize' template='EQ2.window.TitleBar.Minimize'>
</Button>
<Button Name='Maximize' template='EQ2.window.TitleBar.Maximize'>
</Button>
<commandbutton name='Custom Close Button' Template='EQ2.Window.TitleBar.Close'>
<Command>Script[myprices]:End</Command>
</commandbutton>
</Children>
</template>
<template name='My.window'>
<Border>1</Border>
<Resizable>1</Resizable>
<CloseButton />
<MinimizeButton />
<MaximizeButton />
<TitleBar template='My.window.TitleBar' />
<OffsetTitleBarHeight />
<Client template='EQ2.window.Client' />
<StorePosition>1</StorePosition>
</template>
<!-- Main Window -->
<Window Name='MyPrices' template='My.window'>
<X>5%</X>
<Y>20%</Y>
<Width>430</Width>
<Height>420</Height>
<Client Template='EQ2.Window.Client'>
<Y>20</Y>
</Client>
<StorePosition>1</StorePosition>
<Title>MyPrices Broker system</Title>
<TitleBar Template='EQ2.Window.TitleBar'>
<X>0</X>
<Y>0</Y>
<Width>100%</Width>
<Height>20</Height>
<Children>
<Text Name='Title' Template='EQ2.Window.TitleBar.Title' />
<Button Name='Minimize' Template='EQ2.Window.TitleBar.Minimize'>
<X>r35</X>
<Width>14</Width>
<Height>14</Height>
</Button>
<commandbutton name='Custom Close Button' Template='EQ2.Window.TitleBar.Close'>
<X>r17</X>
<Width>14</Width>
<Height>14</Height>
<Command>Script[myprices]:End</Command>
</commandbutton>
</Children>
</TitleBar>
<Children>
<Tabcontrol Name='GUITabs' Template='EQ2.Tabcontrol'>
<X>1%</X>
<Y>1%</Y>
<Height>98%</Height>
<Width>98%</Width>
<Tabs>
<Tab Name='Main'>
<Text name='ConfigSell Text' Template='EQ2.text'>
<X>5%</X>
<Y>10</Y>
<Width>80%</Width>
<Height>20</Height>
<Alignment>Left</Alignment>
<Font>
<Color>FFFFFFE5</Color>
</Font>
<Text>MyPrices Options:</Text>
</Text>
<checkbox Name='MatchLowPrice' Template='EQ2.checkbox'>
<X>5%</X>
<Y>50</Y>
<Width>20%</Width>
<Height>20</Height>
<Text>Auto-Match Lower Prices?</Text>
<OnLoad>
UIElement[MatchLowPrice@Main@GUITabs@MyPrices]:SetChecked
</OnLoad>
<OnLeftClick>
if ${UIElement[MatchLowPrice@Main@GUITabs@MyPrices].Checked}
{
echo Set MatchLowPrices true
}
else
{
echo Set MatchLowPrices false
}
</OnLeftClick>
</checkbox>
<checkbox Name='MatchHighPrice' Template='EQ2.checkbox'>
<X>15%</X>
<Y>50</Y>
<Width>20%</Width>
<Height>20</Height>
<Text>Auto-Match Higher Prices?</Text>
<OnLoad>
UIElement[MatchHighPrice@Main@GUITabs@MyPrices]:SetChecked
</OnLoad>
<OnLeftClick>
if ${UIElement[MatchHighPrice@Main@GUITabs@MyPrices].Checked}
{
echo Set MatchHighPrices true
}
else
{
echo Set MatchHighPrices false
}
</OnLeftClick>
</checkbox>
</Tab>
<Tab Name='Sell'>
</Tab>
<Tab Name='Buy'>
</Tab>
</Tabs>
</Tabcontrol>
</Children>
</Window>
</ISUI>