Skip to content

Commit

Permalink
Merge branch 'master' into rayshud-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
CriticalFlaw authored Oct 11, 2024
2 parents a7f5863 + e5424b8 commit 2f3ef9e
Show file tree
Hide file tree
Showing 13 changed files with 195 additions and 114 deletions.
106 changes: 53 additions & 53 deletions src/TF2HUD.Editor/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,61 @@
</configSections>
<userSettings>
<HUDEditor.Properties.Settings>
<setting name="hud_selected" serializeAs="String">
<value />
</setting>
<setting name="hud_directory" serializeAs="String">
<value />
</setting>
<setting name="user_language" serializeAs="String">
<value>en-US</value>
</setting>
<setting name="app_update_auto" serializeAs="String">
<value>True</value>
</setting>
<setting name="app_xhair_persist" serializeAs="String">
<value>False</value>
</setting>
<setting name="app_xhair_enabled" serializeAs="String">
<value>False</value>
</setting>
<setting name="app_xhair_style" serializeAs="String">
<value>$</value>
</setting>
<setting name="app_xhair_color" serializeAs="String">
<value />
</setting>
<setting name="app_xhair_size" serializeAs="String">
<value>0</value>
</setting>
<setting name="app_default_bg" serializeAs="String">
<value>https://user-images.githubusercontent.com/6818236/220803776-12f85855-a409-4555-8f76-e3877d04bab9.png</value>
</setting>
</HUDEditor.Properties.Settings>
<setting name="hud_selected" serializeAs="String">
<value />
</setting>
<setting name="hud_directory" serializeAs="String">
<value />
</setting>
<setting name="user_language" serializeAs="String">
<value>en-US</value>
</setting>
<setting name="app_update_auto" serializeAs="String">
<value>False</value>
</setting>
<setting name="app_xhair_persist" serializeAs="String">
<value>False</value>
</setting>
<setting name="app_xhair_enabled" serializeAs="String">
<value>False</value>
</setting>
<setting name="app_xhair_style" serializeAs="String">
<value>$</value>
</setting>
<setting name="app_xhair_color" serializeAs="String">
<value />
</setting>
<setting name="app_xhair_size" serializeAs="String">
<value>0</value>
</setting>
<setting name="app_default_bg" serializeAs="String">
<value>https://user-images.githubusercontent.com/6818236/220803776-12f85855-a409-4555-8f76-e3877d04bab9.png</value>
</setting>
</HUDEditor.Properties.Settings>
</userSettings>
<applicationSettings>
<HUDEditor.Properties.Settings>
<setting name="app_docs" serializeAs="String">
<value>https://criticalflaw.ca/TF2HUD.Editor/</value>
</setting>
<setting name="json_file" serializeAs="String">
<value>https://raw.githubusercontent.com/CriticalFlaw/TF2HUD.Editor/master/src/TF2HUD.Editor/JSON/{0}</value>
</setting>
<setting name="json_list" serializeAs="String">
<value>https://api.github.com/repos/CriticalFlaw/TF2HUD.Editor/contents/src/TF2HUD.Editor/JSON</value>
</setting>
<setting name="app_tracker" serializeAs="String">
<value>https://github.com/CriticalFlaw/TF2HUD.Editor/issues</value>
</setting>
<setting name="app_update" serializeAs="String">
<value>https://github.com/CriticalFlaw/TF2HUD.Editor/releases/latest</value>
</setting>
<setting name="mastercomfig_vpk" serializeAs="String">
<value>https://github.com/mastercomfig/mastercomfig/releases/download/9.5.2/mastercomfig-transparent-viewmodels-addon.vpk</value>
</setting>
<setting name="tf2_hud_crosshairs_zip" serializeAs="String">
<value>https://github.com/Hypnootize/TF2-HUD-Crosshairs/archive/refs/heads/master.zip</value>
</setting>
</HUDEditor.Properties.Settings>
<setting name="app_docs" serializeAs="String">
<value>https://criticalflaw.ca/TF2HUD.Editor/</value>
</setting>
<setting name="json_file" serializeAs="String">
<value>https://raw.githubusercontent.com/CriticalFlaw/TF2HUD.Editor/master/src/TF2HUD.Editor/JSON/{0}</value>
</setting>
<setting name="json_list" serializeAs="String">
<value>https://api.github.com/repos/CriticalFlaw/TF2HUD.Editor/contents/src/TF2HUD.Editor/JSON</value>
</setting>
<setting name="app_tracker" serializeAs="String">
<value>https://github.com/CriticalFlaw/TF2HUD.Editor/issues</value>
</setting>
<setting name="app_update" serializeAs="String">
<value>https://github.com/CriticalFlaw/TF2HUD.Editor/releases/latest</value>
</setting>
<setting name="mastercomfig_vpk" serializeAs="String">
<value>https://github.com/mastercomfig/mastercomfig/releases/download/9.5.2/mastercomfig-transparent-viewmodels-addon.vpk</value>
</setting>
<setting name="tf2_hud_crosshairs_zip" serializeAs="String">
<value>https://github.com/Hypnootize/TF2-HUD-Crosshairs/archive/refs/heads/master.zip</value>
</setting>
</HUDEditor.Properties.Settings>
</applicationSettings>
</configuration>
25 changes: 7 additions & 18 deletions src/TF2HUD.Editor/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<Setter Property="FormatString" Value="N0" />
<Setter Property="Increment" Value="1" />
<Setter Property="Width" Value="125" />
<Setter Property="AllowTextInput" Value="False" />
<Setter Property="AllowTextInput" Value="True" />
</Style>

<Style x:Key="CrosshairLabel" TargetType="Label">
Expand Down Expand Up @@ -166,28 +166,17 @@
</Style>

<Style x:Key="SettingButton" TargetType="Button" BasedOn="{StaticResource HudButton}">
<Setter Property="Width" Value="400" />
<Setter Property="Width" Value="263" />
<Setter Property="Margin" Value="10,10,0,20"/>
</Style>

<Style x:Key="ToggleButton" TargetType="ToggleButton">
<Style x:Key="SettingCheckBox" TargetType="CheckBox">
<Setter Property="FontFamily" Value="../Resources/Fonts/TF2Build.ttf #TF2 Build" />
<Setter Property="FontSize" Value="16px" />
<Setter Property="FontSize" Value="18px" />
<Setter Property="Foreground" Value="#EBE2CA" />
<Setter Property="Background" Value="#776B5F" />
<Setter Property="Margin" Value="5" />
<Setter Property="Width" Value="400" />
<Setter Property="Margin" Value="10,0,0,0"/>
<Setter Property="Width" Value="700" />
<Setter Property="Height" Value="40" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#934739" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="#2B2724" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Foreground" Value="#2B2724" />
</Trigger>
</Style.Triggers>
</Style>

<Style x:Key="LinkButton" TargetType="Button">
Expand Down
17 changes: 12 additions & 5 deletions src/TF2HUD.Editor/HUDEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<Company>CriticalFlaw</Company>
<Copyright>CriticalFlaw</Copyright>
<PackageProjectUrl>http://criticalflaw.ca/TF2HUD.Editor/</PackageProjectUrl>
<AssemblyVersion>3.3.0</AssemblyVersion>
<FileVersion>3.3.0</FileVersion>
<Version>3.3.0</Version>
<AssemblyVersion>3.4.0</AssemblyVersion>
<FileVersion>3.4.0</FileVersion>
<Version>3.4.0</Version>
<RepositoryUrl>https://github.com/CriticalFlaw/TF2HUD.Editor</RepositoryUrl>
<PackageIcon>logo.png</PackageIcon>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand Down Expand Up @@ -55,11 +55,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="CountryFlag.Wpf" Version="1.0.0" />
<PackageReference Include="Crews.Utility.TgaSharp" Version="1.0.0" />
<PackageReference Include="DotNetProjects.Extended.Wpf.Toolkit" Version="5.0.115" />
<PackageReference Include="log4net" Version="2.0.17" />
<PackageReference Include="log4net" Version="3.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Octokit" Version="13.0.1" />
<PackageReference Include="WPFLocalizeExtension" Version="3.10.0" />
Expand Down Expand Up @@ -111,6 +111,13 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="RD /S /Q &quot;$(TargetDir)ar&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)cs&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)cs-CZ&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)da&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)de&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)es&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)fr&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)hu&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)it&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)ja-JP&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)ko&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)nl&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)pl&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)pt&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)ro&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)ru&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)sk&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)th&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)tr&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)sv&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)zh&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)zh-Hans&quot;&#xD;&#xA;RD /S /Q &quot;$(TargetDir)zh-tw&quot;" />
</Target>
Expand Down
91 changes: 76 additions & 15 deletions src/TF2HUD.Editor/JSON/budhud.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"0 1 2 3",
"0 1 2 3",
"4 5 6 6",
"4 7 7 7"
"7 7 8 8"
],
"Links": {
"GitHub": "https://github.com/rbjaxter/budhud",
Expand Down Expand Up @@ -128,6 +128,13 @@
"Type": "Checkbox",
"Value": "false",
"FileName": "bh_game_hidecontracker.res"
},
{
"Name": "bh_speedometer",
"Label": "Speedometer",
"Type": "Checkbox",
"Value": "false",
"FileName": "bh_speedometer.res"
}
],
"Health and Ammo": [
Expand Down Expand Up @@ -367,28 +374,61 @@
}
}
],
"Crosshair (Hypnotize's Unified Crosshair Pack)": [
"Engineer Customizations": [
{
"Name": "bh_toggle_xhair_enable",
"Label": "Toggle Crosshair",
"Name": "bh_building_display_h",
"Label": "Building Display\nHorizontal Pos.",
"Type": "IntegerUpDown",
"Value": "0",
"Minimum": "0",
"Maximum": "1000",
"Increment": "1",
"Width": 140,
"ToolTip": "Increase the number to move the display to the right.",
"Files": {
"_budhud/scripts/hudlayout.res": {
"bh_BuildPin": {
"xpos": "$value"
}
}
}
},
{
"Name": "bh_building_display_v",
"Label": "Building Display\nVertical Pos.",
"Type": "IntegerUpDown",
"Value": "105",
"Minimum": "0",
"Maximum": "1000",
"Increment": "1",
"Width": 140,
"ToolTip": "Increase the number to move the display down.",
"Files": {
"_budhud/scripts/hudlayout.res": {
"bh_BuildPin": {
"ypos": "$value"
}
}
}
},
{
"Name": "bh_metal_position",
"Label": "Metal Count Under XHair",
"Type": "Checkbox",
"ToolTip": "Toggle crosshair feature.",
"Value": "false",
"Files": {
"#customization/_enabled/bh_crosshairs.res": {
"hud_crosshair_1": {
"visible": {
"true": "1",
"false": "0"
},
"enabled": {
"true": "1",
"false": "0"
"_budhud/scripts/hudlayout.res": {
"CHudAccountPanel": {
"ypos": {
"true": "c-3",
"false": "c110"
}
}
}
}
},
}
],
"Crosshair (Hypnotize's Unified Crosshair Pack)": [
{
"Name": "bh_val_xhair_style",
"Label": "Style",
Expand Down Expand Up @@ -451,6 +491,27 @@
}
}
}
},
{
"Name": "bh_toggle_xhair_enable",
"Label": "Show Crosshair",
"Type": "Checkbox",
"ToolTip": "Toggle crosshair feature.",
"Value": "false",
"Files": {
"#customization/_enabled/bh_crosshairs.res": {
"hud_crosshair_1": {
"visible": {
"true": "1",
"false": "0"
},
"enabled": {
"true": "1",
"false": "0"
}
}
}
}
}
]
}
Expand Down
4 changes: 3 additions & 1 deletion src/TF2HUD.Editor/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
ResizeMode="CanResizeWithGrip"
FontFamily="../Resources/Fonts/TF2Secondary.ttf #TF2 Secondary"
FontSize="20px">

Expand All @@ -23,6 +23,8 @@
<Grid>
<Image Source="../Resources/Images/favicon.ico" Height="20" HorizontalAlignment="Left" Margin="5"/>
<TextBlock Text="{lex:Loc ui_title}" VerticalAlignment="Center" Margin="30,0,0,0" Foreground="#EBE2CA" FontFamily="../Resources/Fonts/TF2Build.ttf #TF2 Build" FontSize="16px" />
<Button Content="_" HorizontalAlignment="Right" Margin="0,0,60,0" Width="30" Height="30" Click="Minimize_Click" FontFamily="../Resources/Fonts/TF2Build.ttf #TF2 Build" />
<Button Content="&#9744;" HorizontalAlignment="Right" Margin="0,0,30,0" Width="30" Height="30" Click="Maximize_Click" FontFamily="../Resources/Fonts/TF2Build.ttf #TF2 Build" />
<Button Content="X" HorizontalAlignment="Right" Width="30" Height="30" Click="CloseButton_Click" FontFamily="../Resources/Fonts/TF2Build.ttf #TF2 Build" />
</Grid>
</Border>
Expand Down
16 changes: 12 additions & 4 deletions src/TF2HUD.Editor/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ public MainWindow()

// Check for tf/custom directory
SetupDirectory();

#if !DEBUG

// Check for updates
UpdateAppSchema(true);
#endif
if (Settings.Default.app_update_auto == true) UpdateAppSchema(true);
}

private void MainWindowViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
Expand Down Expand Up @@ -236,5 +234,15 @@ private void CloseButton_Click(object sender, RoutedEventArgs e)
{
Close();
}

private void Minimize_Click(object sender, RoutedEventArgs e)
{
this.WindowState = WindowState.Minimized;
}

private void Maximize_Click(object sender, RoutedEventArgs e)
{
this.WindowState = this.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
}
}
}
Loading

0 comments on commit 2f3ef9e

Please sign in to comment.