From e4b5492fac3c8a9bbce8f0cc980b5470578f0f95 Mon Sep 17 00:00:00 2001 From: weedeej Date: Wed, 5 Jan 2022 18:06:20 +0800 Subject: [PATCH] Dev phase 3 --- ValorantCC/MainWindow.xaml.cs | 2 +- ValorantCC/SubWindow/ProfilesWindow.xaml | 3 +-- ValorantCC/SubWindow/ProfilesWindow.xaml.cs | 23 ++++++++++++++++++--- ValorantCC/src/API.cs | 20 ++++++++++-------- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/ValorantCC/MainWindow.xaml.cs b/ValorantCC/MainWindow.xaml.cs index 35afd89..18dbd97 100644 --- a/ValorantCC/MainWindow.xaml.cs +++ b/ValorantCC/MainWindow.xaml.cs @@ -102,7 +102,6 @@ private void profiles_SelectionChanged(object sender, SelectionChangedEventArgs SelectedIndex = profiles.SelectedIndex; SelectedProfile = DataProcessor.ProfileFromIndex(SelectedIndex); - ValCCAPI.profile = SelectedProfile; primary_color.SelectedColor = Color.FromRgb(SelectedProfile.Primary.Color.R, SelectedProfile.Primary.Color.G, SelectedProfile.Primary.Color.B); if (!DataProcessor.ProfileListed) @@ -120,6 +119,7 @@ private void profiles_SelectionChanged(object sender, SelectionChangedEventArgs ads_outline_color.SelectedColor = Color.FromRgb(SelectedProfile.aDS.OutlineColor.R, SelectedProfile.aDS.OutlineColor.G, SelectedProfile.aDS.OutlineColor.B); sniper_dot_color.SelectedColor = Color.FromRgb(SelectedProfile.Sniper.CenterDotColor.R, SelectedProfile.Sniper.CenterDotColor.G, SelectedProfile.Sniper.CenterDotColor.B); + if (ValCCAPI != null) ValCCAPI.profile = SelectedProfile; Crosshair_load(); } private void StackPanel_MouseDown(object sender, MouseButtonEventArgs e) diff --git a/ValorantCC/SubWindow/ProfilesWindow.xaml b/ValorantCC/SubWindow/ProfilesWindow.xaml index 2b37202..14f6e85 100644 --- a/ValorantCC/SubWindow/ProfilesWindow.xaml +++ b/ValorantCC/SubWindow/ProfilesWindow.xaml @@ -45,7 +45,7 @@ - +