-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
101 lines (86 loc) · 6.07 KB
/
Copy pathMainWindow.xaml
File metadata and controls
101 lines (86 loc) · 6.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<Window x:Class="TTRPG_manager.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TTRPG_manager"
mc:Ignorable="d"
Title="MainWindow"
d:DesignHeight="1080"
d:DesignWidth="1920"
ResizeMode="CanResize"
>
<Window.Resources>
<local:ScaleConverter x:Key="ScaleConverter"/>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.005}"/>
</Style>
<Style TargetType="Button">
<Setter Property="FontSize" Value="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.006}"/>
</Style>
<Style TargetType="ComboBox">
<Setter Property="FontSize" Value="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.005}"/>
</Style>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.006}"/>
</Style>
<Style TargetType="Label">
<Setter Property="FontSize" Value="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.013}"/>
</Style>
</Window.Resources>
<Grid>
<Grid.Background>
<ImageBrush x:Name="background" Stretch="UniformToFill"/>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<!-- This row takes up 1/30th of the height -->
<RowDefinition Height="29*" />
<!-- The rest of the space -->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<!-- Takes up the full width -->
</Grid.ColumnDefinitions>
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="0">
<!-- Label to display the current turn -->
<Label x:Name="lblTurnStatus" Margin="0" FontWeight="Bold" FontStyle="Italic">
Turn: 0
</Label>
<!-- Button to declare an ambush -->
<Button x:Name="btnAmbush" Content="Ambush!" Margin="0" Click="btnAmbush_Click"/>
<!-- Button to go to the next turn -->
<Button x:Name="btnNextTurn" Content="Next Turn" Margin="0" Click="btnNextTurn_Click"/>
<!-- Button to end combat -->
<Button x:Name="btnEndCombat" Content="End Combat" Margin="0" Click="btnEndCombat_Click"/>
</StackPanel>
<StackPanel x:Name="mainPanel" Orientation="Horizontal" Background="White" Grid.Column="0" Grid.Row="0">
<Button Click="SettingsButton_Click" FontSize="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.01}">Settings</Button>
<Button Click="EditMode_Click" FontSize="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.01}">Edit Mode</Button>
<Button Click="StartServer_Click" FontSize="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.01}">Start Server</Button>
<Button Click="ChangeImageButton_Click" FontSize="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.01}">Change Image</Button>
<ComboBox x:Name="partyComboBox" Width="{Binding buttonWidth}" ItemsSource="{Binding Parties}" DisplayMemberPath="Name"
SelectedIndex="{Binding selectedPartyIndex, Mode=TwoWay}"
SelectionChanged="PartyComboBox_SelectionChanged"
FontSize="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.01}"></ComboBox>
<TextBox Background="Transparent" x:Name="txtIpAddress" BorderThickness="0" IsReadOnly="True" HorizontalAlignment="Right" Margin="10,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.01}"/>
</StackPanel>
<StackPanel Grid.Row="1" x:Name="CharacterPanels" Orientation="Horizontal" HorizontalAlignment="Left">
</StackPanel>
<Image x:Name="MainImage" Grid.Row="1" HorizontalAlignment="Right" SizeChanged="MainImage_SizeChanged"></Image>
<StackPanel Grid.Row="1" x:Name="EnemyPanels" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom">
</StackPanel>
<Button x:Name="AddEnemyButton" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="AddEnemyButton_Click" Content=" + "></Button>
<Canvas Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Canvas x:Name="animCanvas">
<Polygon x:Name="ImageBorder"></Polygon>
<Image x:Name="animatedImage"/>
<Polygon x:Name="leftCover"></Polygon>
<Polygon x:Name="rightCover"></Polygon>
</Canvas>
</Canvas>
<Canvas Grid.Row="1" x:Name="StickerCanvas" Width="{Binding Width}" Height="{Binding Height}">
<!-- Other UI elements can go here -->
</Canvas>
</Grid>
</Window>