-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
262 lines (229 loc) · 12.5 KB
/
MainWindow.xaml
File metadata and controls
262 lines (229 loc) · 12.5 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<Window x:Class="Sm64DecompLevelViewer.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:Sm64DecompLevelViewer"
mc:Ignorable="d"
Title="Randm64" Height="600" Width="1000"
Background="#1E1E1E" Foreground="#CCCCCC"
Icon="Assets/icon.jpg" Loaded="Window_Loaded">
<Window.Resources>
<!-- Dark theme colors -->
<SolidColorBrush x:Key="BackgroundBrush" Color="#1E1E1E"/>
<SolidColorBrush x:Key="PanelBrush" Color="#252526"/>
<SolidColorBrush x:Key="BorderBrush" Color="#3F3F46"/>
<SolidColorBrush x:Key="TextBrush" Color="#CCCCCC"/>
<SolidColorBrush x:Key="AccentBrush" Color="#00A2FF"/>
<SolidColorBrush x:Key="HeaderBrush" Color="#569CD6"/>
<SolidColorBrush x:Key="HoverBrush" Color="#2A2D2E"/>
<!-- ListBox style -->
<Style TargetType="ListBox">
<Setter Property="Background" Value="{StaticResource PanelBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<!-- ListBoxItem style -->
<Style TargetType="ListBoxItem">
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="Padding" Value="8,4"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource HoverBrush}"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- TextBlock style -->
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
</Style>
<!-- ComboBox style -->
<Style TargetType="ComboBox">
<Setter Property="Background" Value="{StaticResource PanelBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="Padding" Value="5,2"/>
</Style>
<!-- ComboBoxItem style -->
<Style TargetType="ComboBoxItem">
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="Background" Value="{StaticResource PanelBrush}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource HoverBrush}"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Left Panel: Level List -->
<Border Grid.Column="0" Grid.Row="0"
Background="{StaticResource PanelBrush}"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="0,0,1,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="10">
<TextBlock Text="SM64 Levels"
FontSize="16" FontWeight="Bold"
Foreground="{StaticResource HeaderBrush}"
Margin="0,0,0,5"/>
<Button x:Name="SelectFolderButton"
Content="Select SM64 Project Folder"
Click="SelectFolderButton_Click"
Padding="5,2"
Background="{StaticResource AccentBrush}"
Foreground="White"
BorderThickness="0"
Cursor="Hand"/>
</StackPanel>
<ListBox Grid.Row="1" x:Name="LevelListBox"
SelectionChanged="LevelListBox_SelectionChanged"
Margin="5">
<ListBox.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"
FontWeight="Bold"
FontSize="12"
Foreground="{StaticResource HeaderBrush}"
Margin="0,8,0,4"/>
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ListBox.GroupStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding FullName}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Border>
<!-- Right Panel: Level Details -->
<Border Grid.Column="1" Grid.Row="0"
Background="{StaticResource PanelBrush}"
Padding="15">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel x:Name="DetailsPanel">
<TextBlock Text="Level Details"
FontSize="18" FontWeight="Bold"
Foreground="{StaticResource HeaderBrush}"
Margin="0,0,0,15"/>
<TextBlock x:Name="NoSelectionText"
Text="Select a level to view details"
FontStyle="Italic"
Foreground="#888888"/>
<StackPanel x:Name="LevelDetailsPanel" Visibility="Collapsed">
<!-- Full Name -->
<TextBlock Text="Full Name:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="FullNameText" Margin="0,0,0,15"/>
<!-- Short Name -->
<TextBlock Text="Short Name:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="ShortNameText" Margin="0,0,0,15"/>
<!-- Category -->
<TextBlock Text="Category:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="CategoryText" Margin="0,0,0,15"/>
<!-- Area Count -->
<TextBlock Text="Area Count:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="AreaCountText" Margin="0,0,0,15"/>
<!-- Skybox -->
<TextBlock Text="Skybox:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="SkyboxText" Margin="0,0,0,15"/>
<!-- Texture Bin -->
<TextBlock Text="Texture Bin:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="TextureBinText" Margin="0,0,0,15"/>
<!-- Effects -->
<TextBlock Text="Effects:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="EffectsText" Margin="0,0,0,15"/>
<!-- Objects -->
<TextBlock Text="Objects:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="ObjectsText" TextWrapping="Wrap" Margin="0,0,0,15"/>
<!-- Actor Bins -->
<TextBlock Text="Actor Bins:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="ActorBinsText" TextWrapping="Wrap" Margin="0,0,0,15"/>
<!-- Common Bin -->
<TextBlock Text="Common Bin:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="CommonBinText" TextWrapping="Wrap" Margin="0,0,0,15"/>
<!-- Level Path -->
<TextBlock Text="Level Path:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock x:Name="LevelPathText" TextWrapping="Wrap" Margin="0,0,0,15"/>
<!-- Collision Data Section -->
<TextBlock Text="Collision Data"
FontSize="16" FontWeight="Bold"
Foreground="{StaticResource HeaderBrush}"
Margin="0,10,0,10"/>
<!-- Area Selector -->
<TextBlock Text="Select Area:" FontWeight="Bold" FontSize="14" Foreground="{StaticResource AccentBrush}" Margin="0,0,0,5"/>
<ComboBox x:Name="AreaComboBox"
SelectionChanged="AreaComboBox_SelectionChanged"
Margin="0,0,0,15"
Background="{StaticResource PanelBrush}"
Foreground="{StaticResource TextBrush}"/>
<!-- Collision Stats -->
<TextBlock x:Name="CollisionStatsText"
TextWrapping="Wrap"
Margin="0,0,0,15"/>
<!-- View 3D Button -->
<Button x:Name="View3DButton"
Content="Open Level Editor"
Click="View3DButton_Click"
IsEnabled="False"
Padding="10,5"
Background="{StaticResource AccentBrush}"
Foreground="White"
BorderThickness="0"
Cursor="Hand"/>
</StackPanel>
</StackPanel>
</ScrollViewer>
</Border>
<!-- Status Bar -->
<Border Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1"
Background="{StaticResource AccentBrush}"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="0,1,0,0"
Height="25">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="StatusText"
Grid.Column="0"
Text="Ready"
Foreground="White"
VerticalAlignment="Center"
Margin="10,0"/>
<TextBlock x:Name="ObjectInfoText"
Grid.Column="1"
Text=""
Foreground="White"
VerticalAlignment="Center"
Margin="10,0"
FontWeight="Bold"/>
</Grid>
</Border>
</Grid>
</Window>