mirror of
https://github.com/MathiasLui/CSGO-Projects.git
synced 2025-05-06 22:01:18 +00:00

* Reset zoom is now handled by window so one can reset even when image is not visible * Hiding and showing markers now works * Re-add Viewbox which fixes displaying issues, introduces a bit of lag
139 lines
10 KiB
XML
139 lines
10 KiB
XML
<Window x:Class="Damage_Calculator.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:Damage_Calculator"
|
|
mc:Ignorable="d"
|
|
Title="CS:GO Damage Calculator" Height="566" Width="877" MinHeight="700" MinWidth="700"
|
|
Style="{DynamicResource CustomWindowStyle}"
|
|
WindowStartupLocation="CenterScreen" Icon="27.ico"
|
|
WindowState="Maximized"
|
|
MouseMove="Window_MouseMove"
|
|
KeyDown="Window_KeyDown"
|
|
KeyUp="Window_KeyUp"
|
|
PreviewMouseDown="Window_PreviewMouseDown">
|
|
<Grid>
|
|
<Menu>
|
|
<MenuItem Header="View">
|
|
<MenuItem x:Name="mnuShowBombSites" StaysOpenOnClick="True" Header="Show bomb sites" IsCheckable="True" IsChecked="True" Checked="visibilityMenu_CheckChanged" Unchecked="visibilityMenu_CheckChanged" />
|
|
<MenuItem x:Name="mnuShowSpawnAreas" StaysOpenOnClick="True" Header="Show spawn areas" IsCheckable="True" IsChecked="True" Checked="visibilityMenu_CheckChanged" Unchecked="visibilityMenu_CheckChanged" />
|
|
<MenuItem x:Name="mnuShowStandardSpawns" StaysOpenOnClick="True" Header="Show standard spawns" IsCheckable="True" IsChecked="True" Checked="visibilityMenu_CheckChanged" Unchecked="visibilityMenu_CheckChanged" />
|
|
<MenuItem x:Name="mnuShow2v2Spawns" StaysOpenOnClick="True" Header="Show 2v2 spawns" IsCheckable="True" IsChecked="True" Checked="visibilityMenu_CheckChanged" Unchecked="visibilityMenu_CheckChanged" />
|
|
<MenuItem x:Name="mnuShowHostageSpawns" StaysOpenOnClick="True" Header="Show hostage spawns" IsCheckable="True" IsChecked="True" Checked="visibilityMenu_CheckChanged" Unchecked="visibilityMenu_CheckChanged" />
|
|
<MenuItem x:Name="mnuAllowNonPrioritySpawns" StaysOpenOnClick="True" Header="Allow non-priority spawns" IsCheckable="True" IsChecked="True" Checked="visibilityMenu_CheckChanged" Unchecked="visibilityMenu_CheckChanged" />
|
|
<MenuItem x:Name="mnuShowDrawnMarkers" StaysOpenOnClick="True" Header="Show drawn markers" IsCheckable="True" IsChecked="True" Checked="visibilityMenu_CheckChanged" Unchecked="visibilityMenu_CheckChanged" />
|
|
<Separator />
|
|
<MenuItem Header="Themes">
|
|
<MenuItem Header="Dark" Uid="0" Click="changeTheme_Click" />
|
|
<MenuItem Header="Flashbang" Uid="1" Click="changeTheme_Click" />
|
|
</MenuItem>
|
|
</MenuItem>
|
|
<MenuItem Header="Help">
|
|
<MenuItem x:Name="mnuAbout" Header="About..." Uid="0" Click="mnuAbout_Click" />
|
|
<MenuItem x:Name="mnuHelp" Header="Help..." Uid="0" Click="mnuHelp_Click" />
|
|
</MenuItem>
|
|
</Menu>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="80" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="160" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left" Grid.Column="1" Margin="0,0,0,5">
|
|
<TextBlock FontWeight="Bold" Text="Mode:" />
|
|
<RadioButton x:Name="radioModeShooting" Content="Shooting" IsChecked="True" Checked="radioModeShooting_Checked" />
|
|
<RadioButton x:Name="radioModeBomb" Content="Bomb" Checked="radioModeBomb_Checked"/>
|
|
</StackPanel>
|
|
<StackPanel x:Name="topStackPanel" Orientation="Horizontal" HorizontalAlignment="Center" Grid.ColumnSpan="2" VerticalAlignment="Center">
|
|
<TextBlock Text="Map:" VerticalAlignment="Center" FontWeight="Bold" />
|
|
<ComboBox x:Name="comboBoxMaps" Margin="10,0,0,0" Height="25" Width="200" VerticalAlignment="Top" SelectionChanged="comboBoxMaps_SelectionChanged" />
|
|
</StackPanel>
|
|
<StackPanel Margin="0,0,10,5" VerticalAlignment="Bottom" HorizontalAlignment="Right" Grid.Column="1">
|
|
<TextBlock FontWeight="Bold" Text="Distance:" />
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock x:Name="txtEasterEggMetres" Text="Metres:" />
|
|
<TextBlock x:Name="textDistanceMetres" Text="0" Margin="10,0,0,0" Foreground="IndianRed" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="Inches/Units:" />
|
|
<TextBlock x:Name="textDistanceUnits" Text="0" Margin="10,0,0,0" Foreground="IndianRed" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<Rectangle x:Name="rectTop" VerticalAlignment="Top" Grid.Row="1" Height="1" Fill="White" Grid.ColumnSpan="2" />
|
|
<Rectangle x:Name="rectSide" HorizontalAlignment="Left" Width="1" Grid.Row="1" Grid.Column="1" Fill="White" />
|
|
<StackPanel x:Name="leftStackPanel" Margin="10,20,0,0" Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
|
<StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="Armor:" FontSize="14" FontWeight="Bold" />
|
|
<StackPanel x:Name="stackArmorSeparated">
|
|
<CheckBox x:Name="chkHelmet" Content="Helmet" Checked="settings_Updated" Unchecked="settings_Updated" />
|
|
<CheckBox x:Name="chkKevlar" Content="Body armor" Checked="settings_Updated" Unchecked="settings_Updated" />
|
|
</StackPanel>
|
|
<CheckBox x:Name="chkArmorAny" Visibility="Collapsed" Content="Yes" Checked="settings_Updated" Unchecked="settings_Updated" />
|
|
</StackPanel>
|
|
<StackPanel x:Name="stackAreaHit" Margin="0,20,0,0">
|
|
<TextBlock Text="Area hit:" FontSize="14" FontWeight="Bold" />
|
|
<RadioButton x:Name="radioHead" Content="Head" Checked="settings_Updated" />
|
|
<RadioButton x:Name="radioChestArms" Content="Chest/Arms" IsChecked="True" Checked="settings_Updated" />
|
|
<RadioButton x:Name="radioStomach" Content="Stomach" Checked="settings_Updated" />
|
|
<RadioButton x:Name="radioLegs" Content="Legs" Checked="settings_Updated" />
|
|
</StackPanel>
|
|
<StackPanel x:Name="stackWeaponUsed" Margin="0,20,0,0">
|
|
<TextBlock Text="Weapon used:" FontSize="14" FontWeight="Bold" />
|
|
<ComboBox x:Name="comboWeapons" MinWidth="100" MaxWidth="200" HorizontalAlignment="Left" SelectionChanged="comboWeapons_SelectionChanged" />
|
|
</StackPanel>
|
|
<StackPanel Margin="0,20,0,0">
|
|
<TextBlock Text="Resulting damage:" FontSize="14" FontWeight="Bold" />
|
|
<TextBlock x:Name="txtResult" Text="0" Foreground="IndianRed" FontSize="18" />
|
|
<TextBlock x:Name="txtResultArmor" Text="0" Foreground="CadetBlue" FontSize="14" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<GroupBox Header="Info" VerticalAlignment="Bottom" Grid.Row="1" Margin="10,0,0,10">
|
|
<StackPanel>
|
|
<StackPanel>
|
|
<CheckBox x:Name="chkHasMapFile" Content="Has map file" IsEnabled="False" />
|
|
<CheckBox x:Name="chkHasNavFile" Content="Has nav file" IsEnabled="False" />
|
|
<StackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
|
<TextBlock Text="Max bomb damage:" />
|
|
<TextBlock Margin="5,0,0,0" x:Name="txtBombMaxDamage" Text="0" Foreground="IndianRed" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="Bomb radius:" />
|
|
<TextBlock Margin="5,0,0,0" x:Name="txtBombRadius" Text="0" Foreground="IndianRed" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel Margin="0,10,0,0">
|
|
<TextBlock Text="Cursor position:" />
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="X:" />
|
|
<TextBlock x:Name="txtCursorX" Text="0" Margin="10,0,0,0" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="Y:" />
|
|
<TextBlock x:Name="txtCursorY" Text="0" Margin="10,0,0,0" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
<local:ZoomBorder x:Name="rightZoomBorder" Grid.Row="1" Grid.Column="1" Margin="10" ClipToBounds="True" SizeChanged="rightZoomBorder_SizeChanged">
|
|
<Viewbox>
|
|
<Grid>
|
|
<Image x:Name="mapImage" MouseLeftButtonUp="mapImage_MouseLeftButtonUp" HorizontalAlignment="Center" VerticalAlignment="Center" MouseRightButtonUp="mapImage_MouseRightButtonUp" LayoutUpdated="mapImage_LayoutUpdated" />
|
|
<Canvas x:Name="pointsCanvas" Width="{Binding ActualWidth, ElementName=mapImage, Mode=OneWay}" Height="{Binding ActualHeight, ElementName=mapImage, Mode=OneWay}" />
|
|
</Grid>
|
|
</Viewbox>
|
|
</local:ZoomBorder>
|
|
</Grid>
|
|
<Grid x:Name="gridLoading" Background="#B2000000" Visibility="Collapsed">
|
|
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
<TextBlock Text="Loading maps and weapon stats..." HorizontalAlignment="Center" FontSize="18" />
|
|
<TextBlock Text="(This can take up to a few minutes if this is the first start or the if weapon stats got updated recently.)" HorizontalAlignment="Center" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|