Skip to content

Commit 4486b20

Browse files
BabyhamstaBabyhamsta
authored andcommitted
-- UPDATE for 2.4.0 --
- Added new fancy startup window / animation - Massively reduced startup lag - Fixed forgotten version # update in CheckForUpdates func - Version number for check now pulls from UI so I can hopefully avoid that again - Split each XAML section off into it's own XAML file to help organize the source better - Each XAML section's CS code was split off into it's own CS as well from the Main.cs - Each section now lazy loads to help load times and speed - Managers now lazy load to help with performance and startup - Cleaned up and optimized each sections CS code after moving it into it's own file - Deleted old Welcome.xaml files (was originally going to be used for key system which won't happen in Aimmy V2 ever) - Fixed UpdateManager not handling newer versions (would update you back to older version before fix) - Updated gradient effect on menu buttons (looks nicer) - Changed aim settings button icon from Guy Walking to Target (E726->E1D2) - Added new ThemeManager to apply theme to UI elements - Added theme colors to the UI (tags/theme tags to mark items) - Added color wheel element for theme color selection - Theme color now applies to new startup animation - Added focus display selector (So you can pick displays without having to relaunch aimmy on the correct display) - Supports up to 4 different displays - Updated notice bar style, fixed it's disappear timing, and updated it to use theme - Fixed screen shots being taken even while "Collect Data While Playing" was turned off - Adjusted FOV/Detected windows to support display selector - Async fix to prevent UI freezing when grabbing PC details for about page - Updated ConfigSaver to handle new themes - Updated AntiRecoil to handle new themes - I'm sure there is more that I missed..
1 parent 5ae44a4 commit 4486b20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6940
-1848
lines changed

Aimmy2/AILogic/AIManager.cs

Lines changed: 457 additions & 173 deletions
Large diffs are not rendered by default.

Aimmy2/AILogic/PredictionManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ public static int GetSPY()
117117

118118
// public static int GetSPY()
119119
// {
120-
// //Debug.WriteLine((int)Queryable.Average(yValues.AsQueryable()));
121120
// return (int)(((Queryable.Average(yValues.AsQueryable()) * AmountCount) + WinAPICaller.GetCursorPosition().Y));
122121
// }
123122
//}

Aimmy2/Aimmy2.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@
9494
</ItemGroup>
9595

9696
<ItemGroup>
97+
<Compile Update="Other\ThemeManager.cs">
98+
<Generator>MSBuild:Compile</Generator>
99+
</Compile>
100+
<Compile Update="Properties\Settings.Designer.cs">
101+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
102+
<AutoGen>True</AutoGen>
103+
<DependentUpon>Settings.settings</DependentUpon>
104+
</Compile>
97105
<Compile Update="UILibrary\ACredit.xaml.cs">
98106
<SubType>Code</SubType>
99107
</Compile>
@@ -123,4 +131,11 @@
123131
</Compile>
124132
</ItemGroup>
125133

134+
<ItemGroup>
135+
<None Update="Properties\Settings.settings">
136+
<Generator>SettingsSingleFileGenerator</Generator>
137+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
138+
</None>
139+
</ItemGroup>
140+
126141
</Project>

Aimmy2/Aimmy2.sln

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.5.2.0
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aimmy2", "Aimmy2.csproj", "{9157E454-1437-8CA3-B2D9-D5421B227F81}"
6+
EndProject
7+
Global
8+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9+
Debug|Any CPU = Debug|Any CPU
10+
Release|Any CPU = Release|Any CPU
11+
EndGlobalSection
12+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13+
{9157E454-1437-8CA3-B2D9-D5421B227F81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14+
{9157E454-1437-8CA3-B2D9-D5421B227F81}.Debug|Any CPU.Build.0 = Debug|Any CPU
15+
{9157E454-1437-8CA3-B2D9-D5421B227F81}.Release|Any CPU.ActiveCfg = Release|Any CPU
16+
{9157E454-1437-8CA3-B2D9-D5421B227F81}.Release|Any CPU.Build.0 = Release|Any CPU
17+
EndGlobalSection
18+
GlobalSection(SolutionProperties) = preSolution
19+
HideSolutionNode = FALSE
20+
EndGlobalSection
21+
GlobalSection(ExtensibilityGlobals) = postSolution
22+
SolutionGuid = {1627A4EF-7739-4B06-9AD6-511AC9D45429}
23+
EndGlobalSection
24+
EndGlobal

Aimmy2/App.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Application x:Class="Aimmy2.App"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
StartupUri="MainWindow.xaml">
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
54
<Application.Resources>
65
<ResourceDictionary>
76
<ResourceDictionary.MergedDictionaries>
@@ -15,6 +14,8 @@
1514
<FontFamily x:Key="Atkinson Hyperlegible">pack://application:,,,/Graphics/Fonts/#Atkinson Hyperlegible</FontFamily>
1615
<FontFamily x:Key="Font Awesome 6 Brands">pack://application:,,,/Graphics/Fonts/#Font Awesome 6 Brands Regular</FontFamily>
1716

17+
<!-- Remove theme colors from here - they're now in ThemeResources.xaml -->
18+
1819
<!--#region Material Main Hues -->
1920
<SolidColorBrush x:Key="PrimaryHueLightBrush"
2021
Color="White" />

Aimmy2/App.xaml.cs

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,74 @@
1-
namespace Aimmy2
1+
using Aimmy2.Class;
2+
using Aimmy2.Theme;
3+
using Class;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Windows;
7+
8+
namespace Aimmy2
29
{
3-
/// <summary>
4-
/// Interaction logic for App.xaml
5-
/// </summary>
610
public partial class App : System.Windows.Application
711
{
12+
protected override void OnStartup(StartupEventArgs e)
13+
{
14+
// Initialize the application theme from saved settings
15+
InitializeTheme();
16+
17+
// Set shutdown mode to prevent app from closing when startup window closes
18+
ShutdownMode = ShutdownMode.OnExplicitShutdown;
19+
20+
try
21+
{
22+
// Create and show startup window
23+
var startupWindow = new StartupWindow();
24+
startupWindow.Show();
25+
26+
// Reset shutdown mode after startup window is shown
27+
ShutdownMode = ShutdownMode.OnMainWindowClose;
28+
}
29+
catch (Exception ex)
30+
{
31+
// If startup window fails, launch main window directly
32+
MessageBox.Show($"Startup animation failed: {ex.Message}\nLaunching main application...",
33+
"Aimmy AI", MessageBoxButton.OK, MessageBoxImage.Information);
34+
35+
var mainWindow = new MainWindow();
36+
MainWindow = mainWindow;
37+
mainWindow.Show();
38+
39+
ShutdownMode = ShutdownMode.OnMainWindowClose;
40+
}
41+
}
42+
43+
private void InitializeTheme()
44+
{
45+
try
46+
{
47+
// Load the color state configuration
48+
var colorState = new Dictionary<string, dynamic>
49+
{
50+
{ "Theme Color", "#FF722ED1" }
51+
};
52+
53+
// Load saved colors
54+
SaveDictionary.LoadJSON(colorState, "bin\\colors.cfg");
55+
56+
// Apply theme color if found
57+
if (colorState.TryGetValue("Theme Color", out var themeColor) && themeColor is string colorString)
58+
{
59+
ThemeManager.SetThemeColor(colorString);
60+
}
61+
else
62+
{
63+
// Use default purple if no saved color
64+
ThemeManager.SetThemeColor("#FF722ED1");
65+
}
66+
}
67+
catch (Exception ex)
68+
{
69+
// Log error and use default color
70+
ThemeManager.SetThemeColor("#FF722ED1");
71+
}
72+
}
873
}
974
}

Aimmy2/Class/Dictionary.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ public static class Dictionary
7979
{ "FOV Config", false },
8080
{ "ESP Config", false },
8181
{ "Settings Menu", false },
82-
{ "X/Y Percentage Adjustment", false }
82+
{ "X/Y Percentage Adjustment", false },
83+
{ "Theme Settings", false },
84+
{ "Display Settings", false}
8385
};
8486

8587
public static Dictionary<string, dynamic> dropdownState = new()
@@ -93,7 +95,8 @@ public static class Dictionary
9395
public static Dictionary<string, dynamic> colorState = new()
9496
{
9597
{ "FOV Color", "#FF8080FF"},
96-
{ "Detected Player Color", "#FF00FFFF"}
98+
{ "Detected Player Color", "#FF00FFFF"},
99+
{ "Theme Color", "#FF722ED1" }
97100
};
98101

99102
public static Dictionary<string, dynamic> AntiRecoilSettings = new()

Aimmy2/Class/Theming.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

Aimmy2/Class/UI.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ public class UI
111111
public AToggle? T_XAxisPercentageAdjustment { get; set; }
112112
public AToggle? T_YAxisPercentageAdjustment { get; set; }
113113

114+
// Theme Color Changer
115+
public ATitle? AT_ThemeColorWheel { get; set; }
116+
public AColorWheel? ThemeColorWheel { get; set; }
117+
118+
// Display Selector
119+
public ATitle? AT_DisplaySelector { get; set; }
120+
public ADisplaySelector? DisplaySelector { get; set; }
121+
114122
// ddxoft UI
115123
public AFileLocator? AFL_ddxoftDLLLocator { get; set; }
116124

0 commit comments

Comments
 (0)