-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCharacterEditWindow.xaml
More file actions
93 lines (86 loc) · 5.96 KB
/
Copy pathCharacterEditWindow.xaml
File metadata and controls
93 lines (86 loc) · 5.96 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
<Window x:Class="TTRPG_manager.CharacterEditWindow"
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="CharacterEditWindow" Height="450" Width="800">
<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.015}"/>
</Style>
<Style TargetType="Button">
<Setter Property="FontSize" Value="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.015}"/>
<Setter Property="Margin" Value="10,5,10,5"/>
</Style>
<Style TargetType="ComboBox">
<Setter Property="FontSize" Value="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.015}"/>
</Style>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="{Binding Path=Width, RelativeSource={RelativeSource AncestorType=Window}, Converter={StaticResource ScaleConverter}, ConverterParameter=0.015}"/>
<Setter Property="Margin" Value="10,5,10,5"/>
</Style>
</Window.Resources>
<Grid Margin="10
">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="4*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="Create/Edit character attributes" VerticalAlignment="Center"/>
<!-- Name -->
<TextBlock Grid.Row="2" Grid.Column="0" Text="Name:" VerticalAlignment="Center"/>
<TextBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="1" Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}" Tag="Enter name"/>
<!-- Description -->
<TextBlock Grid.Row="3" Grid.Column="0" Text="Description:" VerticalAlignment="Center"/>
<TextBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}" Tag="Enter description" AcceptsReturn="True"/>
<!-- Age -->
<TextBlock Grid.Row="4" Grid.Column="0" Text="Age:" VerticalAlignment="Center"/>
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="1" Text="{Binding Age, UpdateSourceTrigger=PropertyChanged}" Tag="Enter age"/>
<!-- Gender -->
<TextBlock Grid.Row="2" Grid.Column="2" Text="Gender:" VerticalAlignment="Center"/>
<TextBox Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="1" Text="{Binding Gender, UpdateSourceTrigger=PropertyChanged}" Tag="Enter gender"/>
<!-- Race -->
<TextBlock Grid.Row="5" Grid.Column="0" Text="Race:" VerticalAlignment="Center"/>
<TextBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="1" Text="{Binding Race, UpdateSourceTrigger=PropertyChanged}" Tag="Enter race"/>
<!-- Title -->
<TextBlock Grid.Row="6" Grid.Column="0" Text="Title:" VerticalAlignment="Center"/>
<TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="1" Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}" Tag="Enter title"/>
<!-- MP -->
<TextBlock Grid.Row="4" Grid.Column="2" Text="Max MP:" VerticalAlignment="Center"/>
<TextBox Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="1" Text="{Binding MaxMP, UpdateSourceTrigger=PropertyChanged}" Tag="Enter max MP"/>
<!-- HP -->
<TextBlock Grid.Row="5" Grid.Column="2" Text="Max HP:" VerticalAlignment="Center"/>
<TextBox Grid.Row="5" Grid.Column="3" Grid.ColumnSpan="1" Text="{Binding MaxHP, UpdateSourceTrigger=PropertyChanged}" Tag="Enter max HP"/>
<!-- Image Path with Browse Button -->
<Image x:Name="portrait" Grid.Row="1" Grid.Column="5" Source="{Binding ImagePath, Mode=OneWay}"></Image>
<Button Grid.Row="2" Grid.Column="5" Click="OnBrowseButtonClick">Browse for Image</Button>
<TextBlock Grid.Row="0" Grid.Column="5" TextWrapping="Wrap" Grid.ColumnSpan="2" Text="Set the slider to eyesight level. Determines special animation focus"></TextBlock>
<Slider x:Name="eyeLevelSlider" Grid.Row="1" Grid.Column="6" Orientation="Vertical" Minimum="0" Maximum="1" Value="{Binding eyeLevel, Mode=TwoWay}" VerticalAlignment="Stretch"/>
<Button Grid.Row="7" Grid.Column="5" Click="SaveCloseButtonClick">Save and Close</Button>
<Button Grid.Row="7" Grid.Column="3" Click="CancelButtonClick">Cancel</Button>
<ListBox x:Name="SkillList" Grid.Row="3" Grid.Column="5" Grid.RowSpan="4" Margin="10,5,10,5" ItemsSource="{Binding Skills}" DisplayMemberPath="Name"></ListBox>
<Button Grid.Column="6" Grid.Row="3" Content=" Create " Click="CreateSkillButton_Click">
</Button>
<Button Grid.Column="6" Grid.Row="4" Content=" Edit " Click="EditSkillButton_Click"></Button>
<Button Grid.Column="6" Grid.Row="5" Content=" Delete " Click="DeleteSkillButton_Click"></Button>
<TextBlock Grid.Row="3" Grid.Column="4">Acquired Skills:</TextBlock>
</Grid>
</Window>