diff --git a/Aimmy2/Class/Dictionary.cs b/Aimmy2/Class/Dictionary.cs index 1bcee324..62076f09 100644 --- a/Aimmy2/Class/Dictionary.cs +++ b/Aimmy2/Class/Dictionary.cs @@ -20,6 +20,12 @@ public static class Dictionary { "Disable Anti Recoil Keybind", "Oem6"}, { "Gun 1 Key", "D1"}, { "Gun 2 Key", "D2"}, + // Key binds for toggles + { "Aim Assist TKB", ""}, + { "Constant AI Tracking TKB", ""}, + { "Predictions TKB", ""}, + { "EMA Smoothening TKB", ""}, + { "Sticky Aim TKB", ""} }; public static Dictionary sliderSettings = new() diff --git a/Aimmy2/MainWindow.xaml.cs b/Aimmy2/MainWindow.xaml.cs index 1946d634..e7e4b78e 100644 --- a/Aimmy2/MainWindow.xaml.cs +++ b/Aimmy2/MainWindow.xaml.cs @@ -728,7 +728,13 @@ private void HandleKeybindPressed(string bindingId) ["Anti Recoil Keybind"] = () => HandleAntiRecoil(true), ["Disable Anti Recoil Keybind"] = DisableAntiRecoil, ["Gun 1 Key"] = () => LoadGunConfig("Gun 1 Config"), - ["Gun 2 Key"] = () => LoadGunConfig("Gun 2 Config") + ["Gun 2 Key"] = () => LoadGunConfig("Gun 2 Config"), + // Keybinds for toggles + ["Aim Assist TKB"] = () => uiManager.T_AimAligner.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)), + ["Constant AI Tracking TKB"] = () => uiManager.T_ConstantAITracking.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)), + ["Predictions TKB"] = () => uiManager.T_Predictions.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)), + ["EMA Smoothening TKB"] = () => uiManager.T_EMASmoothing.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)), + ["Sticky Aim TKB"] = () => uiManager.T_StickyAim.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)) }; handlers.GetValueOrDefault(bindingId)?.Invoke(); diff --git a/Aimmy2/MouseMovementLibraries/RazerSupport/RZMouse.cs b/Aimmy2/MouseMovementLibraries/RazerSupport/RZMouse.cs index 16f06631..3c00afd1 100644 --- a/Aimmy2/MouseMovementLibraries/RazerSupport/RZMouse.cs +++ b/Aimmy2/MouseMovementLibraries/RazerSupport/RZMouse.cs @@ -57,12 +57,38 @@ public static async Task Load() await DownloadRzctl(rzctlDownloadUrl_Release); return false; } + // Hopefully this method will solve the issue for the users who have/don't have the drivers + // If the user gets this error, Failed to initialize Razer mode, then it will attempt to download the Release version. + // And if that still doesn't work, then it will error again, which in this case would mean they don't have the driver for vs &&|| vc 2015–2022 + catch (Exception ex) + { + MessageBox.Show($"Failed to initialize Razer mode.\n{ex.Message}\n\n" + + "Attempting to replace rzctl.dll with the release version...", + "Initialization Error", MessageBoxButton.OK, MessageBoxImage.Error); + try + { + if (File.Exists(rzctlpath)) + File.Delete(rzctlpath); + + await DownloadRzctl(rzctlDownloadUrl_Release); + + new NoticeBar("rzctl.dll replaced with release version. Please retry loading.", 5000).Show(); + } + catch (Exception innerEx) + { + MessageBox.Show($"Failed to recover rzctl.dll.\n{innerEx.Message}", + "Recovery Error", MessageBoxButton.OK, MessageBoxImage.Error); + } + return false; + } + /* Commenting this method out to replace with a more enhanced version catch (Exception ex) { MessageBox.Show($"Failed to initialize Razer mode.\n{ex.Message}", "Initialization Error", MessageBoxButton.OK, MessageBoxImage.Error); return false; } + */ } #region Razer Synapse & Device Checks diff --git a/Aimmy2/UISections/AimMenuControl.xaml.cs b/Aimmy2/UISections/AimMenuControl.xaml.cs index 142be926..bd37aa1c 100644 --- a/Aimmy2/UISections/AimMenuControl.xaml.cs +++ b/Aimmy2/UISections/AimMenuControl.xaml.cs @@ -171,9 +171,11 @@ private void LoadAimAssist() } }; }) + .AddKeyChanger("Aim Assist TKB") .AddKeyChanger("Aim Keybind", k => uiManager.C_Keybind = k) .AddKeyChanger("Second Aim Keybind") .AddToggle("Sticky Aim", t => uiManager.T_StickyAim = t) + .AddKeyChanger("Sticky Aim TKB") .AddToggle("Constant AI Tracking", t => { uiManager.T_ConstantAITracking = t; @@ -194,8 +196,11 @@ private void LoadAimAssist() } }; }) + .AddKeyChanger("Constant AI Tracking TKB") .AddToggle("Predictions", t => uiManager.T_Predictions = t) + .AddKeyChanger("Predictions TKB") .AddToggle("EMA Smoothening", t => uiManager.T_EMASmoothing = t) + .AddKeyChanger("EMA Smoothening TKB") .AddKeyChanger("Emergency Stop Keybind", k => uiManager.C_EmergencyKeybind = k) .AddToggle("Enable Model Switch Keybind", t => uiManager.T_EnableModelSwitchKeybind = t) .AddKeyChanger("Model Switch Keybind", k => uiManager.C_ModelSwitchKeybind = k) @@ -512,9 +517,10 @@ private void LoadESPConfig() { d.DropdownBox.SelectedIndex = 0; uiManager.D_TracerPosition = d; - _mainWindow.AddDropdownItem(d, "Bottom"); - _mainWindow.AddDropdownItem(d, "Middle"); + // Changed the positions of these as top is above middle & bottom - ts (this) bothered me so i had to _mainWindow.AddDropdownItem(d, "Top"); + _mainWindow.AddDropdownItem(d, "Middle"); + _mainWindow.AddDropdownItem(d, "Bottom"); d.DropdownBox.SelectionChanged += (s, e) => { if (Dictionary.toggleState["Show Detected Player"])