Skip to content

Commit 938012a

Browse files
committed
Stylizing Flags dock
1 parent e1841c8 commit 938012a

2 files changed

Lines changed: 46 additions & 18 deletions

File tree

ZXBStudio/DebuggingTools/Flags/Controls/ZXFlagsView.axaml

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,48 @@
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
66
x:Class="ZXBasicStudio.DebuggingTools.Flags.Controls.ZXFlagsView">
7-
<Grid ColumnDefinitions="*,*" RowDefinitions="*,*">
8-
<Border BorderThickness="0,0,1,0" BorderBrush="#000" Background="#303030">
9-
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Total</TextBlock>
10-
</Border>
11-
<Border Grid.Column="1" BorderThickness="1,0,0,0" BorderBrush="#000" Background="#303030">
12-
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Step</TextBlock>
13-
</Border>
14-
<Border Grid.Row="1" Background="#606060" BorderThickness="0,0,1,0" BorderBrush="#000">
15-
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="2" Name="flag1">--</TextBlock>
16-
</Border>
17-
<Border Grid.Row="1" Grid.Column="1" Background="#606060" BorderThickness="1,0,0,0" BorderBrush="#000">
18-
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="2" Grid.Column="1" Name="flag2">--</TextBlock>
19-
</Border>
20-
</Grid>
7+
<Panel Background="#FF606060">
8+
<Grid ColumnDefinitions="*,*,*,*,*,*,*,*" RowDefinitions="*,*" DataContext="{Binding ZXFlagsView, Mode=TwoWay}">
9+
<TextBlock Grid.Row="0" Grid.Column="0" ToolTip.Tip="S - Sign flag: Set if the 2-complement value is negative (copy of MSB)">S</TextBlock>
10+
<TextBlock Grid.Row="0" Grid.Column="1" ToolTip.Tip="Z - Zero flag: Set if the value is zero">Z</TextBlock>
11+
<TextBlock Grid.Row="0" Grid.Column="2" ToolTip.Tip="F5 - undocumented: Copy of bit 5">-</TextBlock>
12+
<TextBlock Grid.Row="0" Grid.Column="3" ToolTip.Tip="H - Half Carry: Carry from bit 3 to bit 4">H</TextBlock>
13+
<TextBlock Grid.Row="0" Grid.Column="4" ToolTip.Tip="F3 - undocumented: Copy of bit 3">-</TextBlock>
14+
<TextBlock Grid.Row="0" Grid.Column="5" ToolTip.Tip="P/V - Parity or Overflow: Parity set if even number of bits set. Overflow set if the 2-complement result does not fit in the register">V</TextBlock>
15+
<TextBlock Grid.Row="0" Grid.Column="6" ToolTip.Tip="N - Subtract: Set if the last operation was a subtraction">N</TextBlock>
16+
<TextBlock Grid.Row="0" Grid.Column="7" ToolTip.Tip="C - Carry: Set if the result did not fit in the register">C</TextBlock>
17+
<Border Grid.Column="0" Grid.Row="1" BorderBrush="Black" BorderThickness="1,1,0,0"
18+
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
19+
<TextBlock Text="{Binding Bit7Value,Mode=TwoWay}" Name="Bit7"/>
20+
</Border>
21+
<Border Grid.Column="1" Grid.Row="1" BorderBrush="Black" BorderThickness="1,1,0,0"
22+
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
23+
<TextBlock Text="{Binding Bit6Value,Mode=TwoWay}" Name="Bit6" />
24+
</Border>
25+
<Border Grid.Column="2" Grid.Row="1" BorderBrush="Black" BorderThickness="1,1,0,0"
26+
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
27+
<TextBlock Text="{Binding Bit5Value}" Name="Bit5" />
28+
</Border>
29+
<Border Grid.Column="3" Grid.Row="1" BorderBrush="Black" BorderThickness="1,1,0,0"
30+
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
31+
<TextBlock Text="{Binding bit4Value}" Name="Bit4" />
32+
</Border>
33+
<Border Grid.Column="4" Grid.Row="1" BorderBrush="Black" BorderThickness="1,1,0,0"
34+
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
35+
<TextBlock Text="{Binding bit3Value}" Name="Bit3" />
36+
</Border>
37+
<Border Grid.Column="5" Grid.Row="1" BorderBrush="Black" BorderThickness="1,1,0,0"
38+
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
39+
<TextBlock Text="{Binding bit2Value}" Name="Bit2" />
40+
</Border>
41+
<Border Grid.Column="6" Grid.Row="1" BorderBrush="Black" BorderThickness="1,1,0,0"
42+
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
43+
<TextBlock Text="{Binding bit1Value}" Name="Bit1" />
44+
</Border>
45+
<Border Grid.Column="7" Grid.Row="1" BorderBrush="Black" BorderThickness="1,1,0,0"
46+
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
47+
<TextBlock Text="{Binding bit0Value}" Name="Bit0" />
48+
</Border>
49+
</Grid>
50+
</Panel>
2151
</UserControl>

ZXBStudio/DebuggingTools/Flags/Controls/ZXFlagsView.axaml.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ public ZXFlagsView()
1313

1414
public void Update()
1515
{
16-
flag1.Text = "HH";
17-
flag2.Text = "HH";
16+
1817
}
1918

2019
public void Clear()
2120
{
22-
flag1.Text = "**";
23-
flag2.Text = "**";
21+
2422
}
2523
}
2624
}

0 commit comments

Comments
 (0)