diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-04-20 10:02:04 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-04-20 10:02:04 +0200 |
| commit | c0a6bb6ae6db8f4de39b630a2f5e20c3f976e6a9 (patch) | |
| tree | f97941afc96ab415bbe16d63345704a0c4b9764a /ui | |
| parent | 30f1e58efb3910a41cee30ff89a1028fba97c3c1 (diff) | |
wiptests
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/chess.crow | 45 | ||||
| -rw-r--r-- | ui/chess.style | 6 | ||||
| -rw-r--r-- | ui/debug.crow | 2 | ||||
| -rw-r--r-- | ui/main.crow | 2 |
4 files changed, 30 insertions, 25 deletions
diff --git a/ui/chess.crow b/ui/chess.crow index 6050a36..a813be4 100644 --- a/ui/chess.crow +++ b/ui/chess.crow @@ -1,23 +1,28 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <HorizontalStack Height="Fit" Background="vgradient|0:Grey|0.3:Jet|0.7:Jet|1:Black" VerticalAlignment="Bottom" Margin="10"> - <CheckBox Caption="Hint" IsChecked="{²EnableHint}"/> - <Button Caption="Undo" MouseClick="onUndoClick"/> - <Button Caption="New Game" MouseClick="onNewGameClick"/> - <Button Caption="Options" MouseClick="onOptionsClick"/> - <Widget Width="Stretched" Height="1"/> - <Button Caption="Quit" MouseClick="onQuitClick"/> - <VerticalStack Style="hsStatus" > - <Label Style="labStatus" Text="State:"/> - <Label Style="labStatus2" Text="{CurrentState}" /> - </VerticalStack > - <VerticalStack Style="hsStatus" > - <Label Style="labStatus" Text="Hover:"/> - <Label Style="labStatus2" Text="{SelCell}"/> + <CheckBox Caption="Hint" IsChecked="{²EnableHint}" /> + <Menu Data="{Commands}" Height="Stretched" Width="Stretched"> + <Template> + <HorizontalStack Name="ItemsContainer" /> + </Template> + <ItemTemplate> + <Button Command="{}"> + <Label Font="{./Font}" Name="caption" Margin="3" Foreground="LightGrey" Text="{./Caption}" /> + </Button> + </ItemTemplate> + </Menu> + <VerticalStack Style="hsStatus"> + <Label Style="labStatus" Text="State:" /> + <Label Style="labStatus2" Text="{CurrentState}" /> </VerticalStack> - <VerticalStack Style="hsStatus" > - <Label Style="labStatus" Text="Current Player:"/> - <Label Style="labStatus2" Text="{CurrentPlayer}"/> + <VerticalStack Style="hsStatus"> + <Label Style="labStatus" Text="Hover:" /> + <Label Style="labStatus2" Text="{SelCell}" /> </VerticalStack> - <Image Width="30" Height="20" Path="#Crow.Icons.IconAlerte.svg" Visible="{StockfishNotFound}"/> - <Label Text="Stockfish not found" Font="droid bold, 10" Visible="{StockfishNotFound}"/> -</HorizontalStack> + <VerticalStack Style="hsStatus"> + <Label Style="labStatus" Text="Current Player:" /> + <Label Style="labStatus2" Text="{CurrentPlayer}" /> + </VerticalStack> + <Image Width="30" Height="20" Path="#Crow.Icons.IconAlerte.svg" Visible="{StockfishNotFound}" /> + <Label Text="Stockfish not found" Font="droid bold, 10" Visible="{StockfishNotFound}" /> +</HorizontalStack>
\ No newline at end of file diff --git a/ui/chess.style b/ui/chess.style index b79aa91..0c578a1 100644 --- a/ui/chess.style +++ b/ui/chess.style @@ -1,4 +1,4 @@ - + icon { Width="14"; Height="14"; @@ -7,12 +7,12 @@ icon { hsStatus { Height="Fit"; Width="100"; - Background="SeaGreen"; + Background="#2E8BB6"; Margin="3"; } labStatus { Width="Fit"; - Foreground="DarkGrey"; + Foreground="LightGrey"; Font="serif bold, 10"; Margin="0"; } diff --git a/ui/debug.crow b/ui/debug.crow index e4a8476..44669a8 100644 --- a/ui/debug.crow +++ b/ui/debug.crow @@ -44,7 +44,7 @@ </ItemTemplate> </ListBox> </Expandable> - <ColorWheel Name="cw" Width="100" Height="100"/> + <!--<ColorWheel Name="cw" Width="100" Height="100"/>--> <Slider SmallIncrement="0.01" LargeIncrement="0.1" Height="10" Minimum="0.0" Maximum="2.0" Value="{²../cw.InnerRadius}"/> <HueSelector Focusable="true" Height="15" Hue="{²../cw.Hue}"/> <Widget Width="30" Height="16" Background="{CurrentColor}"/> diff --git a/ui/main.crow b/ui/main.crow index 949ae8a..4f685ac 100644 --- a/ui/main.crow +++ b/ui/main.crow @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<Window Caption="Options" Left="10" Top="1" Width="70%" Height="Fit" CornerRadius="5" > +<Window Caption="Options" Left="10" Top="1" Width="70%" Height="Fit" CornerRadius="5" Background="0.1,0.1,0.1,0.8"> <VerticalStack Spacing="1" Margin="10" > <HorizontalStack Height="Fit" Margin="5"> <Label Text="Stockfish executable path:"/> |