From 1f90faf3db8122af66d0179786abe6d1f50cdc49 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Tue, 20 Aug 2019 19:57:31 +0300 Subject: [PATCH 001/445] Added a simple Elite: Dangerous profile - added an icon - added a simple background layer - added a simple Overview --- .../Control_EliteDangerous.xaml | 44 +++++++++++ .../Control_EliteDangerous.xaml.cs | 72 ++++++++++++++++++ .../EliteDangerousApplication.cs | 45 +++++++++++ .../EliteDangerous/EliteDangerousProfile.cs | 28 +++++++ .../GSI/GameState_EliteDangerous.cs | 18 +++++ ...Control_EliteDangerousBackgroundLayer.xaml | 13 ++++ ...trol_EliteDangerousBackgroundLayer.xaml.cs | 72 ++++++++++++++++++ .../EliteDangerousBackgroundLayerHandler.cs | 59 ++++++++++++++ .../Profiles/LightingStateManager.cs | 3 +- .../Project-Aurora/Project-Aurora.csproj | 21 ++++- .../Resources/elite_dangerous_256x256.png | Bin 0 -> 73578 bytes 11 files changed, 373 insertions(+), 2 deletions(-) create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Control_EliteDangerous.xaml create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Control_EliteDangerous.xaml.cs create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousProfile.cs create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousBackgroundLayer.xaml create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousBackgroundLayer.xaml.cs create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousBackgroundLayerHandler.cs create mode 100644 Project-Aurora/Project-Aurora/Resources/elite_dangerous_256x256.png diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Control_EliteDangerous.xaml b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Control_EliteDangerous.xaml new file mode 100644 index 000000000..dfa935dd4 --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Control_EliteDangerous.xaml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Elite: Dangerous support works using the games Journal API. This means that no memory reading or other potentially bannable methods are involved. + + + + + + diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Control_EliteDangerous.xaml.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Control_EliteDangerous.xaml.cs new file mode 100644 index 000000000..e9c68351a --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Control_EliteDangerous.xaml.cs @@ -0,0 +1,72 @@ +using Aurora.Controls; +using Aurora.Utils; +using System; +using System.IO; +using Ionic.Zip; +using System.Timers; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Navigation; +using Aurora.Devices; +using Aurora.Settings; +using Xceed.Wpf.Toolkit; +using Aurora.Profiles.EliteDangerous.GSI; +using MessageBox = System.Windows.MessageBox; + +namespace Aurora.Profiles.EliteDangerous +{ + /// + /// Interaction logic for Control_EliteDangerous.xaml + /// + public partial class Control_EliteDangerous : UserControl + { + private Application profile_manager; + + public Control_EliteDangerous(Application profile) + { + InitializeComponent(); + + profile_manager = profile; + + SetSettings(); + + if (!(profile_manager.Settings as FirstTimeApplicationSettings).IsFirstTimeInstalled) + { + (profile_manager.Settings as FirstTimeApplicationSettings).IsFirstTimeInstalled = true; + } + + profile_manager.ProfileChanged += Control_EliteDangerous_ProfileChanged; + + } + + private void Control_EliteDangerous_ProfileChanged(object sender, EventArgs e) + { + SetSettings(); + } + + private void SetSettings() + { + this.game_enabled.IsChecked = profile_manager.Settings.IsEnabled; + + } + + //Overview + + private void game_enabled_Checked(object sender, RoutedEventArgs e) + { + if (IsLoaded) + { + profile_manager.Settings.IsEnabled = (this.game_enabled.IsChecked.HasValue) ? this.game_enabled.IsChecked.Value : false; + profile_manager.SaveProfiles(); + } + } + + private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) + { + System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(e.Uri.AbsoluteUri)); + e.Handled = true; + } + } +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs new file mode 100644 index 000000000..d01ad810f --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs @@ -0,0 +1,45 @@ +using Aurora.Settings; +using Aurora.Profiles.EliteDangerous.Layers; +using System; +using System.Text; +using System.Windows.Media.Imaging; +using System.Windows.Controls; +using System.Windows.Media; +using System.IO; +using Newtonsoft.Json; +using Aurora.Settings.Layers; +using System.Collections.Generic; + +namespace Aurora.Profiles.EliteDangerous +{ + public class EliteDangerous : Application + { + public EliteDangerous() + : base(new LightEventConfig + { + Name = "Elite: Dangerous", + ID = "EliteDangerous", + ProcessNames = new[] { "EliteDangerous64.exe" }, + SettingsType = typeof(FirstTimeApplicationSettings), + ProfileType = typeof(EliteDangerousProfile), + OverviewControlType = typeof(Control_EliteDangerous), + GameStateType = typeof(GSI.GameState_EliteDangerous), + Event = new GameEvent_Generic(), + IconURI = "Resources/elite_dangerous_256x256.png" + }) + { + + var extra = new List + { + new LayerHandlerEntry("EliteDangerousBackground", "Elite: Dangerous Background Layer", typeof(EliteDangerousBackgroundLayerHandler)), + }; + + Global.LightingStateManager.RegisterLayerHandlers(extra, false); + + foreach (var entry in extra) + { + Config.ExtraAvailableLayers.Add(entry.Key); + } + } + } +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousProfile.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousProfile.cs new file mode 100644 index 000000000..217d47773 --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousProfile.cs @@ -0,0 +1,28 @@ +using Aurora.Settings; +using Aurora.Settings.Layers; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Aurora.Profiles.EliteDangerous +{ + public class EliteDangerousProfile : ApplicationProfile + { + public EliteDangerousProfile() : base() + { + + } + + public override void Reset() + { + base.Reset(); + Layers = new System.Collections.ObjectModel.ObservableCollection() + { + new Layer("Background", new Layers.EliteDangerousBackgroundLayerHandler()), + }; + } + } +} diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs new file mode 100644 index 000000000..583d8e3ac --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Aurora.Profiles.EliteDangerous.GSI +{ + class GameState_EliteDangerous : GameState + { + /// + /// Creates a default GameState_EliteDangerous instance. + /// + public GameState_EliteDangerous() : base() + { + } + } +} diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousBackgroundLayer.xaml b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousBackgroundLayer.xaml new file mode 100644 index 000000000..86048b09e --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousBackgroundLayer.xaml @@ -0,0 +1,13 @@ + + + + + diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousBackgroundLayer.xaml.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousBackgroundLayer.xaml.cs new file mode 100644 index 000000000..c9bfd29de --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousBackgroundLayer.xaml.cs @@ -0,0 +1,72 @@ +using Aurora.Settings; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Aurora.Profiles.EliteDangerous.Layers +{ + /// + /// Interaction logic for Control_EliteDangerousBackgroundLayer.xaml + /// + public partial class Control_EliteDangerousBackgroundLayer : UserControl + { + private bool settingsset = false; + private bool profileset = false; + + public Control_EliteDangerousBackgroundLayer() + { + InitializeComponent(); + } + + public Control_EliteDangerousBackgroundLayer(EliteDangerousBackgroundLayerHandler datacontext) + { + InitializeComponent(); + + this.DataContext = datacontext; + } + + public void SetSettings() + { + if (this.DataContext is EliteDangerousBackgroundLayerHandler && !settingsset) + { + this.ColorPicker_Default.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousBackgroundLayerHandler).Properties._DefaultColor ?? System.Drawing.Color.Empty); + + settingsset = true; + } + } + + internal void SetProfile(Application profile) + { + if (profile != null && !profileset) + { + var var_types_numerical = profile.ParameterLookup?.Where(kvp => Utils.TypeUtils.IsNumericType(kvp.Value.Item1)); + + profileset = true; + } + } + + private void UserControl_Loaded(object sender, RoutedEventArgs e) + { + SetSettings(); + + this.Loaded -= UserControl_Loaded; + } + + private void ColorPicker_Default_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousBackgroundLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousBackgroundLayerHandler).Properties._DefaultColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + } +} diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousBackgroundLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousBackgroundLayerHandler.cs new file mode 100644 index 000000000..2f459ee97 --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousBackgroundLayerHandler.cs @@ -0,0 +1,59 @@ +using Aurora.EffectsEngine; +using Aurora.Settings; +using Aurora.Settings.Layers; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Controls; + +namespace Aurora.Profiles.EliteDangerous.Layers +{ + public class EliteDangerousBackgroundHandlerProperties : LayerHandlerProperties2Color + { + public Color? _DefaultColor { get; set; } + + public Color DefaultColor { get { return Logic._DefaultColor ?? _DefaultColor ?? Color.Empty; } } + + public EliteDangerousBackgroundHandlerProperties() : base() { } + + public EliteDangerousBackgroundHandlerProperties(bool assign_default = false) : base(assign_default) { } + + public override void Default() + { + base.Default(); + this._DefaultColor = Color.FromArgb(255, 60, 0, 0); + } + } + public class EliteDangerousBackgroundLayerHandler : LayerHandler + { + public EliteDangerousBackgroundLayerHandler() : base() + { + _ID = "EliteDangerousBackground"; + } + + protected override UserControl CreateControl() + { + return new Control_EliteDangerousBackgroundLayer(this); + } + + public override EffectLayer Render(IGameState state) + { + EffectLayer bg_layer = new EffectLayer("Elite: Dangerous - Background"); + + Color bg_color = this.Properties.DefaultColor; + bg_layer.Fill(bg_color); + + return bg_layer; + } + + public override void SetApplication(Application profile) + { + (Control as Control_EliteDangerousBackgroundLayer).SetProfile(profile); + base.SetApplication(profile); + } + } +} diff --git a/Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs b/Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs index d9848b1a8..d1100530c 100755 --- a/Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs @@ -148,7 +148,8 @@ public bool Initialize() new ResidentEvil2.ResidentEvil2(), new CloneHero.CloneHero(), new Osu.Osu(), - new Slime_Rancher.Slime_Rancher() + new Slime_Rancher.Slime_Rancher(), + new EliteDangerous.EliteDangerous() }); RegisterLayerHandlers(new List { diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj index 0ed21f438..ad3be9f5f 100755 --- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj +++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj @@ -1,4 +1,4 @@ - + @@ -451,6 +451,16 @@ + + Control_EliteDangerous.xaml + + + + + + Control_EliteDangerousBackgroundLayer.xaml + + Control_ResidentEvil2RankLayer.xaml @@ -1518,6 +1528,7 @@ + PreserveNewest @@ -1718,6 +1729,14 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/Project-Aurora/Project-Aurora/Resources/elite_dangerous_256x256.png b/Project-Aurora/Project-Aurora/Resources/elite_dangerous_256x256.png new file mode 100644 index 0000000000000000000000000000000000000000..ee187f90f9a47529ec2912159a6f84c2edeb41dd GIT binary patch literal 73578 zcmbTd1ymeC(7ek@842kH;ol1xDKnb{3F-N*mDUHB56VhF6NnuL*c4)H#^GV-fPh9q5)t=s z0GrsDxzHG!SyblH zxL85#Y5rma8$(=OMClNe{&Na;4*x-G@BA+|AsEK#0e0Zz=HU7}rGEgLn*0aO!PUw3 zAA_5kaGKeg*_qk9I3r-W{{!n_32}iqTSER1sQ>f&e;WY7T4m+`jPc*nVrTcCA)H-g z-4N6G7eoGAXlE@?2Qy9$GiQjalZlzE8-h&wzq4@wN;{c>T_8?c5Qy!+1*P_Hl4+!+ z{|ZKkhWWjfy(z@qndQIqF_Qtin2FN;eb3G%$j-y1#VrW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*(e5l9X^IlG?(Nz zk2}F*7Ture<8=AHIM4Y1>Oc`Wt<>BieqdT=GI{DLyOY##dfdsbc4MB7iUqbRKCpX*$LI50XeXQvd(} literal 0 HcmV?d00001 From f39778d4407a15b8c61f4dc941f19d0f171e5076 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Tue, 20 Aug 2019 20:17:06 +0300 Subject: [PATCH 002/445] Don't provide alpha for color since it's not needed --- .../Layers/EliteDangerousBackgroundLayerHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousBackgroundLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousBackgroundLayerHandler.cs index 2f459ee97..7332446ab 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousBackgroundLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousBackgroundLayerHandler.cs @@ -25,7 +25,7 @@ public EliteDangerousBackgroundHandlerProperties(bool assign_default = false) : public override void Default() { base.Default(); - this._DefaultColor = Color.FromArgb(255, 60, 0, 0); + this._DefaultColor = Color.FromArgb(60, 0, 0); } } public class EliteDangerousBackgroundLayerHandler : LayerHandler From ec5abf24f7138d9da36b31337fbcd2b35fc2d914 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Thu, 22 Aug 2019 01:14:06 +0300 Subject: [PATCH 003/445] Added a layer and color pickers for initial control color groups --- .../EliteDangerousApplication.cs | 21 +- .../EliteDangerous/EliteDangerousProfile.cs | 1 + .../Control_EliteDangerousKeyBindsLayer.xaml | 76 +++++++ ...ontrol_EliteDangerousKeyBindsLayer.xaml.cs | 198 ++++++++++++++++++ .../EliteDangerousKeyBindsLayerHandler.cs | 123 +++++++++++ .../Project-Aurora/Project-Aurora.csproj | 8 + 6 files changed, 419 insertions(+), 8 deletions(-) create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml.cs create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs index d01ad810f..9f5096854 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs @@ -1,13 +1,5 @@ using Aurora.Settings; using Aurora.Profiles.EliteDangerous.Layers; -using System; -using System.Text; -using System.Windows.Media.Imaging; -using System.Windows.Controls; -using System.Windows.Media; -using System.IO; -using Newtonsoft.Json; -using Aurora.Settings.Layers; using System.Collections.Generic; namespace Aurora.Profiles.EliteDangerous @@ -32,6 +24,7 @@ public EliteDangerous() var extra = new List { new LayerHandlerEntry("EliteDangerousBackground", "Elite: Dangerous Background Layer", typeof(EliteDangerousBackgroundLayerHandler)), + new LayerHandlerEntry("EliteDangerousKeyBinds", "Elite: Dangerous Key Binds Layer", typeof(EliteDangerousKeyBindsLayerHandler)), }; Global.LightingStateManager.RegisterLayerHandlers(extra, false); @@ -41,5 +34,17 @@ public EliteDangerous() Config.ExtraAvailableLayers.Add(entry.Key); } } + + public override void OnActivate() + { + Global.logger.Info("OnActivate ED"); + base.OnActivate(); + } + + public override void OnDeactivate() + { + Global.logger.Info("OnDeactivate ED"); + base.OnDeactivate(); + } } } \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousProfile.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousProfile.cs index 217d47773..d5aaaa8a2 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousProfile.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousProfile.cs @@ -21,6 +21,7 @@ public override void Reset() base.Reset(); Layers = new System.Collections.ObjectModel.ObservableCollection() { + new Layer("Key Binds", new Layers.EliteDangerousKeyBindsLayerHandler()), new Layer("Background", new Layers.EliteDangerousBackgroundLayerHandler()), }; } diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml new file mode 100644 index 000000000..3cc8c1b8b --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml.cs new file mode 100644 index 000000000..42421892d --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml.cs @@ -0,0 +1,198 @@ +using Aurora.Settings; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Aurora.Profiles.EliteDangerous.Layers +{ + ///

+ /// Interaction logic for Control_EliteDangerousKeyBindsLayer.xaml + /// + public partial class Control_EliteDangerousKeyBindsLayer : UserControl + { + private bool settingsset = false; + private bool profileset = false; + + public Control_EliteDangerousKeyBindsLayer() + { + InitializeComponent(); + } + + public Control_EliteDangerousKeyBindsLayer(EliteDangerousKeyBindsLayerHandler datacontext) + { + InitializeComponent(); + + this.DataContext = datacontext; + } + + public void SetSettings() + { + if (this.DataContext is EliteDangerousKeyBindsLayerHandler && !settingsset) + { + this.ColorPicker_HudModeCombat.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._HudModeCombatColor ?? System.Drawing.Color.Empty); + this.ColorPicker_HudModeDiscovery.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._HudModeDiscoveryColor ?? System.Drawing.Color.Empty); + this.ColorPicker_None.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._NoneColor ?? System.Drawing.Color.Empty); + this.ColorPicker_Other.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._OtherColor ?? System.Drawing.Color.Empty); + this.ColorPicker_Ui.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._UiColor ?? System.Drawing.Color.Empty); + this.ColorPicker_UiAlt.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._UiAltColor ?? System.Drawing.Color.Empty); + this.ColorPicker_ShipStuff.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._ShipStuffColor ?? System.Drawing.Color.Empty); + this.ColorPicker_Camera.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._CameraColor ?? System.Drawing.Color.Empty); + this.ColorPicker_Defence.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._DefenceColor ?? System.Drawing.Color.Empty); + this.ColorPicker_DefenceDimmed.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._DefenceDimmedColor ?? System.Drawing.Color.Empty); + this.ColorPicker_Offence.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._OffenceColor ?? System.Drawing.Color.Empty); + this.ColorPicker_OffenceDimmed.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._OffenceDimmedColor ?? System.Drawing.Color.Empty); + this.ColorPicker_MovementSpeed.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._MovementSpeedColor ?? System.Drawing.Color.Empty); + this.ColorPicker_MovementSpeedDimmed.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._MovementSpeedDimmedColor ?? System.Drawing.Color.Empty); + this.ColorPicker_MovementSecondary.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._MovementSecondaryColor ?? System.Drawing.Color.Empty); + this.ColorPicker_Wing.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._WingColor ?? System.Drawing.Color.Empty); + this.ColorPicker_Navigation.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._NavigationColor ?? System.Drawing.Color.Empty); + this.ColorPicker_ModeEnable.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._ModeEnableColor ?? System.Drawing.Color.Empty); + this.ColorPicker_ModeDisable.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor((this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._ModeDisableColor ?? System.Drawing.Color.Empty); + + settingsset = true; + } + } + + internal void SetProfile(Application profile) + { + if (profile != null && !profileset) + { + var var_types_numerical = profile.ParameterLookup?.Where(kvp => Utils.TypeUtils.IsNumericType(kvp.Value.Item1)); + + profileset = true; + } + } + + private void UserControl_Loaded(object sender, RoutedEventArgs e) + { + SetSettings(); + + this.Loaded -= UserControl_Loaded; + } + + private void ColorPicker_HudModeCombat_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._HudModeCombatColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_HudModeDiscovery_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._HudModeDiscoveryColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_None_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._NoneColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_Other_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._OtherColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_Ui_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._UiColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_UiAlt_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._UiAltColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_ShipStuff_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._ShipStuffColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_Camera_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._CameraColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_Defence_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._DefenceColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_DefenceDimmed_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._DefenceDimmedColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_Offence_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._OffenceColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_OffenceDimmed_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._OffenceDimmedColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_MovementSpeed_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._MovementSpeedColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_MovementSpeedDimmed_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._MovementSpeedDimmedColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_MovementSecondary_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._MovementSecondaryColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_Wing_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._WingColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_Navigation_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._NavigationColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_ModeEnable_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._ModeEnableColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + + private void ColorPicker_ModeDisable_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (IsLoaded && settingsset && this.DataContext is EliteDangerousKeyBindsLayerHandler && sender is Xceed.Wpf.Toolkit.ColorPicker && (sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.HasValue) + (this.DataContext as EliteDangerousKeyBindsLayerHandler).Properties._ModeDisableColor = Utils.ColorUtils.MediaColorToDrawingColor((sender as Xceed.Wpf.Toolkit.ColorPicker).SelectedColor.Value); + } + } +} diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs new file mode 100644 index 000000000..9ef7e133e --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -0,0 +1,123 @@ +using Aurora.EffectsEngine; +using Aurora.Settings.Layers; +using System.Drawing; +using System.Windows.Controls; + +namespace Aurora.Profiles.EliteDangerous.Layers +{ + public class EliteDangerousKeyBindsHandlerProperties : LayerHandlerProperties2Color + { + public Color? _HudModeCombatColor { get; set; } + public Color HudModeCombatColor { get { return Logic._HudModeCombatColor ?? _HudModeCombatColor ?? Color.Empty; } } + + public Color? _HudModeDiscoveryColor { get; set; } + public Color HudModeDiscoveryColor { get { return Logic._HudModeDiscoveryColor ?? _HudModeDiscoveryColor ?? Color.Empty; } } + + public Color? _NoneColor { get; set; } + public Color NoneColor { get { return Logic._NoneColor ?? _NoneColor ?? Color.Empty; } } + + public Color? _OtherColor { get; set; } + public Color OtherColor { get { return Logic._OtherColor ?? _OtherColor ?? Color.Empty; } } + + public Color? _UiColor { get; set; } + public Color UiColor { get { return Logic._UiColor ?? _UiColor ?? Color.Empty; } } + + public Color? _UiAltColor { get; set; } + public Color UiAltColor { get { return Logic._UiAltColor ?? _UiAltColor ?? Color.Empty; } } + + public Color? _ShipStuffColor { get; set; } + public Color ShipStuffColor { get { return Logic._ShipStuffColor ?? _ShipStuffColor ?? Color.Empty; } } + + public Color? _CameraColor { get; set; } + public Color CameraColor { get { return Logic._CameraColor ?? _CameraColor ?? Color.Empty; } } + + public Color? _DefenceColor { get; set; } + public Color DefenceColor { get { return Logic._DefenceColor ?? _DefenceColor ?? Color.Empty; } } + + public Color? _DefenceDimmedColor { get; set; } + public Color DefenceDimmedColor { get { return Logic._DefenceDimmedColor ?? _DefenceDimmedColor ?? Color.Empty; } } + + public Color? _OffenceColor { get; set; } + public Color OffenceColor { get { return Logic._OffenceColor ?? _OffenceColor ?? Color.Empty; } } + + public Color? _OffenceDimmedColor { get; set; } + public Color OffenceDimmedColor { get { return Logic._OffenceDimmedColor ?? _OffenceDimmedColor ?? Color.Empty; } } + + public Color? _MovementSpeedColor { get; set; } + public Color MovementSpeedColor { get { return Logic._MovementSpeedColor ?? _MovementSpeedColor ?? Color.Empty; } } + + public Color? _MovementSpeedDimmedColor { get; set; } + public Color MovementSpeedDimmedColor { get { return Logic._MovementSpeedDimmedColor ?? _MovementSpeedDimmedColor ?? Color.Empty; } } + + public Color? _MovementSecondaryColor { get; set; } + public Color MovementSecondaryColor { get { return Logic._MovementSecondaryColor ?? _MovementSecondaryColor ?? Color.Empty; } } + + public Color? _WingColor { get; set; } + public Color WingColor { get { return Logic._WingColor ?? _WingColor ?? Color.Empty; } } + + public Color? _NavigationColor { get; set; } + public Color NavigationColor { get { return Logic._NavigationColor ?? _NavigationColor ?? Color.Empty; } } + + public Color? _ModeEnableColor { get; set; } + public Color ModeEnableColor { get { return Logic._ModeEnableColor ?? _ModeEnableColor ?? Color.Empty; } } + + public Color? _ModeDisableColor { get; set; } + public Color ModeDisableColor { get { return Logic._ModeDisableColor ?? _ModeDisableColor ?? Color.Empty; } } + + public EliteDangerousKeyBindsHandlerProperties() : base() { } + + public EliteDangerousKeyBindsHandlerProperties(bool assign_default = false) : base(assign_default) { } + + public override void Default() + { + base.Default(); + this._HudModeCombatColor = Color.FromArgb(255, 80, 0); + this._HudModeDiscoveryColor = Color.FromArgb(0, 160, 255); + this._NoneColor = Color.FromArgb(0, 0, 0); + this._OtherColor = Color.FromArgb(60, 0, 0); + this._UiColor = Color.FromArgb(255, 80, 0); + this._UiAltColor = Color.FromArgb(255, 115, 70); + this._ShipStuffColor = Color.FromArgb(0, 255, 0); + this._CameraColor = Color.FromArgb(71, 164, 79); + this._DefenceColor = Color.FromArgb(0, 220, 255); + this._DefenceDimmedColor = Color.FromArgb(0, 70, 80); + this._OffenceColor = Color.FromArgb(255, 0, 0); + this._OffenceDimmedColor = Color.FromArgb(100, 0, 0); + this._MovementSpeedColor = Color.FromArgb(136, 0, 255); + this._MovementSpeedDimmedColor = Color.FromArgb(50, 0, 100); + this._MovementSecondaryColor = Color.FromArgb(255, 0, 255); + this._WingColor = Color.FromArgb(0, 0, 255); + this._NavigationColor = Color.FromArgb(255, 220, 0); + this._ModeEnableColor = Color.FromArgb(153, 167, 255); + this._ModeDisableColor = Color.FromArgb(61, 88, 156); + } + } + public class EliteDangerousKeyBindsLayerHandler : LayerHandler + { + public EliteDangerousKeyBindsLayerHandler() : base() + { + _ID = "EliteDangerousKeyBinds"; + } + + protected override UserControl CreateControl() + { + return new Control_EliteDangerousKeyBindsLayer(this); + } + + public override EffectLayer Render(IGameState state) + { + EffectLayer bg_layer = new EffectLayer("Elite: Dangerous - Key Binds"); + +// Color bg_color = this.Properties.DefaultColor; +// bg_layer.Fill(bg_color); + + return bg_layer; + } + + public override void SetApplication(Application profile) + { + (Control as Control_EliteDangerousKeyBindsLayer).SetProfile(profile); + base.SetApplication(profile); + } + } +} diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj index ad3be9f5f..7bd0553ca 100755 --- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj +++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj @@ -460,7 +460,11 @@ Control_EliteDangerousBackgroundLayer.xaml + + Control_EliteDangerousKeyBindsLayer.xaml + + Control_ResidentEvil2RankLayer.xaml @@ -1737,6 +1741,10 @@ Designer MSBuild:Compile
+ + MSBuild:Compile + Designer + MSBuild:Compile Designer From 8b5efe4cd89ff53d71201b126aa0c68355ed9dfa Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Thu, 22 Aug 2019 01:31:03 +0300 Subject: [PATCH 004/445] Started working on highlighting key binds --- .../Layers/EliteDangerousKeyBindsLayerHandler.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs index 9ef7e133e..140f23ce2 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -2,6 +2,7 @@ using Aurora.Settings.Layers; using System.Drawing; using System.Windows.Controls; +using Aurora.Devices; namespace Aurora.Profiles.EliteDangerous.Layers { @@ -106,12 +107,13 @@ protected override UserControl CreateControl() public override EffectLayer Render(IGameState state) { - EffectLayer bg_layer = new EffectLayer("Elite: Dangerous - Key Binds"); + EffectLayer keyBindsLayer = new EffectLayer("Elite: Dangerous - Key Binds"); -// Color bg_color = this.Properties.DefaultColor; -// bg_layer.Fill(bg_color); + keyBindsLayer.Set(DeviceKeys.C, this.Properties.ShipStuffColor); + keyBindsLayer.Set(DeviceKeys.V, this.Properties.DefenceColor); + keyBindsLayer.Set(DeviceKeys.B, this.Properties.DefenceDimmedColor); - return bg_layer; + return keyBindsLayer; } public override void SetApplication(Application profile) From 2d2f9adfafe6acf5841867a664cd497e92f52581 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Thu, 22 Aug 2019 22:35:04 +0300 Subject: [PATCH 005/445] Working on blinking keys --- .../EliteDangerousKeyBindsLayerHandler.cs | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs index 140f23ce2..fc9153aaa 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -1,8 +1,10 @@ -using Aurora.EffectsEngine; +using System; +using Aurora.EffectsEngine; using Aurora.Settings.Layers; using System.Drawing; using System.Windows.Controls; using Aurora.Devices; +using CSScriptLibrary; namespace Aurora.Profiles.EliteDangerous.Layers { @@ -95,6 +97,7 @@ public override void Default() } public class EliteDangerousKeyBindsLayerHandler : LayerHandler { + private int blinkSpeed = 20; public EliteDangerousKeyBindsLayerHandler() : base() { _ID = "EliteDangerousKeyBinds"; @@ -105,6 +108,27 @@ protected override UserControl CreateControl() return new Control_EliteDangerousKeyBindsLayer(this); } + private float GetBlinkStep() + { + float animationPosition = Utils.Time.GetMillisecondsSinceEpoch() % (10000L / blinkSpeed) / (10000.0f / blinkSpeed); + float animationStep = animationPosition * 2; + return animationStep > 1 ? 1F + (1F - animationStep) : animationStep; + } + + private Color GetBlinkingColor(Color baseColor) + { + return Utils.ColorUtils.BlendColors( + this.Properties.ShipStuffColor, + Color.FromArgb( + 0, + this.Properties.ShipStuffColor.R, + this.Properties.ShipStuffColor.G, + this.Properties.ShipStuffColor.B + ), + GetBlinkStep() + ); + } + public override EffectLayer Render(IGameState state) { EffectLayer keyBindsLayer = new EffectLayer("Elite: Dangerous - Key Binds"); @@ -112,6 +136,7 @@ public override EffectLayer Render(IGameState state) keyBindsLayer.Set(DeviceKeys.C, this.Properties.ShipStuffColor); keyBindsLayer.Set(DeviceKeys.V, this.Properties.DefenceColor); keyBindsLayer.Set(DeviceKeys.B, this.Properties.DefenceDimmedColor); + keyBindsLayer.Set(DeviceKeys.A, GetBlinkingColor(Properties.ShipStuffColor)); return keyBindsLayer; } From 427a08faff7ffc1199da66a19722dc3b81eaaa48 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Thu, 22 Aug 2019 23:13:50 +0300 Subject: [PATCH 006/445] Added Status node for Elite: Dangerous - started working on Elite: Dangerous game state and event --- .../EliteDangerousApplication.cs | 14 +--------- .../GSI/GameState_EliteDangerous.cs | 13 +++++++++ .../EliteDangerous/GSI/Nodes/Status.cs | 17 ++++++++++++ .../GameEvent_EliteDangerous.cs | 27 +++++++++++++++++++ .../Project-Aurora/Project-Aurora.csproj | 2 ++ 5 files changed, 60 insertions(+), 13 deletions(-) create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs index 9f5096854..c772ae41f 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs @@ -16,7 +16,7 @@ public EliteDangerous() ProfileType = typeof(EliteDangerousProfile), OverviewControlType = typeof(Control_EliteDangerous), GameStateType = typeof(GSI.GameState_EliteDangerous), - Event = new GameEvent_Generic(), + Event = new GameEvent_EliteDangerous(), IconURI = "Resources/elite_dangerous_256x256.png" }) { @@ -34,17 +34,5 @@ public EliteDangerous() Config.ExtraAvailableLayers.Add(entry.Key); } } - - public override void OnActivate() - { - Global.logger.Info("OnActivate ED"); - base.OnActivate(); - } - - public override void OnDeactivate() - { - Global.logger.Info("OnDeactivate ED"); - base.OnDeactivate(); - } } } \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs index 583d8e3ac..f5bb1621f 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs @@ -3,11 +3,24 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using Aurora.Profiles.EliteDangerous.GSI.Nodes; namespace Aurora.Profiles.EliteDangerous.GSI { class GameState_EliteDangerous : GameState { + private Status status; + + public Status Status + { + get + { + if (status == null) + status = new Status(); + + return status; + } + } /// /// Creates a default GameState_EliteDangerous instance. /// diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs new file mode 100644 index 000000000..b5af7612a --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs @@ -0,0 +1,17 @@ +namespace Aurora.Profiles.EliteDangerous.GSI.Nodes +{ + /// + /// Class representing player status + /// + public class Status : Node + { + public string timestamp; + public string @event; + public long Flags; + public int[] Pips; + public int FireGroup; + public int GuiFocus; + public double Fuel; + public double Cargo; + } +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs new file mode 100644 index 000000000..c31df6834 --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Aurora.EffectsEngine; +using Aurora.Profiles.EliteDangerous.GSI; +using Aurora.Settings; + +namespace Aurora.Profiles.EliteDangerous +{ + public class GameEvent_EliteDangerous : GameEvent_Generic + { + public GameEvent_EliteDangerous() : base() + { + //TODO: Read initial game configuration + } + + public override void OnActivate() + { + //TODO: Enable Journal API reading + } + + public override void OnDeactivate() + { + //TODO: Disable Journal API reading + } + } +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj index 7bd0553ca..77919916f 100755 --- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj +++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj @@ -456,7 +456,9 @@
+ + Control_EliteDangerousBackgroundLayer.xaml From 088e5d8aab79d0d6492968ec3d082ddc45ff8dc2 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Thu, 22 Aug 2019 23:30:08 +0300 Subject: [PATCH 007/445] Fixed overridden methods --- .../Profiles/EliteDangerous/GameEvent_EliteDangerous.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs index c31df6834..cfc299c16 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs @@ -14,12 +14,12 @@ public GameEvent_EliteDangerous() : base() //TODO: Read initial game configuration } - public override void OnActivate() + public override void OnResume() { //TODO: Enable Journal API reading } - public override void OnDeactivate() + public override void OnPause() { //TODO: Disable Journal API reading } From 74de390d6f4a42ce2d8c8168d1cd848a232e0e02 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Fri, 23 Aug 2019 00:38:30 +0300 Subject: [PATCH 008/445] Implemented detection of currend binds file - implemented a file watcher for bind files - stop/start file watchers as needed --- .../GameEvent_EliteDangerous.cs | 86 +++++++++++++++++-- 1 file changed, 79 insertions(+), 7 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs index cfc299c16..ca520a7e5 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs @@ -1,26 +1,98 @@ -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using Aurora.EffectsEngine; -using Aurora.Profiles.EliteDangerous.GSI; -using Aurora.Settings; namespace Aurora.Profiles.EliteDangerous { public class GameEvent_EliteDangerous : GameEvent_Generic { - public GameEvent_EliteDangerous() : base() + + private static readonly string journalFolder = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), + "Saved Games", + "Frontier Developments", + "Elite Dangerous" + ); + private static readonly string statusFile = Path.Combine(journalFolder, "Status.json"); + + private static readonly string bindingsFolder = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Frontier Developments", + "Elite Dangerous", + "Options", + "Bindings" + ); + private static readonly string bindingsPresetFile = Path.Combine(bindingsFolder, "StartPreset.start"); + + private string currentBindFile = null; + private FileSystemWatcher bindWatcher = null; + + public GameEvent_EliteDangerous() : base() {} + + public void WatchBindFiles() + { + StopWatchingBindFiles(); + if (Directory.Exists(bindingsFolder)) + { + bindWatcher = new FileSystemWatcher() + { + Path = bindingsFolder, + NotifyFilter = NotifyFilters.LastWrite, + EnableRaisingEvents = true + }; + bindWatcher.Changed += OnBindsFileChanged; + } + } + + public void StopWatchingBindFiles() + { + if (bindWatcher != null) + { + bindWatcher.Dispose(); + bindWatcher = null; + } + } + + private void OnBindsFileChanged(object sender, FileSystemEventArgs e) + { + // This is a fix for multiple change events being triggered + if (bindWatcher != null) bindWatcher.EnableRaisingEvents = false; + ReadBindFiles(); + if (bindWatcher != null) bindWatcher.EnableRaisingEvents = true; + } + + private void ReadBindFiles() + { + if (File.Exists(bindingsPresetFile)) + { + string currentBindPrefix = File.ReadAllText(bindingsPresetFile).Trim(); + foreach (string bindFile in Directory.GetFiles(bindingsFolder, currentBindPrefix + ".*.binds")) + { + currentBindFile = bindFile; + } + + if (currentBindFile != null) + { + ParseBindFile(); + } + } + } + + private void ParseBindFile() { - //TODO: Read initial game configuration + //TODO: Parse configuration XML + Global.logger.Error("Current bind file: " + currentBindFile); } public override void OnResume() { + ReadBindFiles(); + WatchBindFiles(); //TODO: Enable Journal API reading } public override void OnPause() { + StopWatchingBindFiles(); //TODO: Disable Journal API reading } } From d0a9f127df7d4b2af4db5e7235a8c19ab017b8f8 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Fri, 23 Aug 2019 01:02:24 +0300 Subject: [PATCH 009/445] Fixed lifecycle method names --- .../Profiles/EliteDangerous/GameEvent_EliteDangerous.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs index ca520a7e5..260292620 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs @@ -83,14 +83,14 @@ private void ParseBindFile() Global.logger.Error("Current bind file: " + currentBindFile); } - public override void OnResume() + public override void OnStart() { ReadBindFiles(); WatchBindFiles(); //TODO: Enable Journal API reading } - public override void OnPause() + public override void OnStop() { StopWatchingBindFiles(); //TODO: Disable Journal API reading From 458479f7ebf6f48a2092d4bef78ba5b8cc81a84d Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Sun, 25 Aug 2019 22:16:25 +0300 Subject: [PATCH 010/445] Started parsing binds file - added some classes for the future --- .../EliteDangerous/GSI/Nodes/Controls.cs | 278 ++++++++++++++++++ .../EliteDangerous/GSI/Nodes/Status.cs | 66 +++++ .../GameEvent_EliteDangerous.cs | 22 ++ .../Project-Aurora/Project-Aurora.csproj | 1 + 4 files changed, 367 insertions(+) create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs new file mode 100644 index 000000000..9df1a10a1 --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs @@ -0,0 +1,278 @@ +namespace Aurora.Profiles.EliteDangerous.GSI.Nodes +{ + + public class EliteBind + { + public static readonly string MODIFIER = "MODIFIER"; + public static readonly string MouseReset = "MouseReset"; + public static readonly string YawLeftButton = "YawLeftButton"; + public static readonly string YawRightButton = "YawRightButton"; + public static readonly string YawToRollButton = "YawToRollButton"; + public static readonly string RollLeftButton = "RollLeftButton"; + public static readonly string RollRightButton = "RollRightButton"; + public static readonly string PitchUpButton = "PitchUpButton"; + public static readonly string PitchDownButton = "PitchDownButton"; + public static readonly string LeftThrustButton = "LeftThrustButton"; + public static readonly string RightThrustButton = "RightThrustButton"; + public static readonly string UpThrustButton = "UpThrustButton"; + public static readonly string DownThrustButton = "DownThrustButton"; + public static readonly string ForwardThrustButton = "ForwardThrustButton"; + public static readonly string BackwardThrustButton = "BackwardThrustButton"; + public static readonly string UseAlternateFlightValuesToggle = "UseAlternateFlightValuesToggle"; + public static readonly string ToggleReverseThrottleInput = "ToggleReverseThrottleInput"; + public static readonly string ForwardKey = "ForwardKey"; + public static readonly string BackwardKey = "BackwardKey"; + public static readonly string SetSpeedMinus100 = "SetSpeedMinus100"; + public static readonly string SetSpeedMinus75 = "SetSpeedMinus75"; + public static readonly string SetSpeedMinus50 = "SetSpeedMinus50"; + public static readonly string SetSpeedMinus25 = "SetSpeedMinus25"; + public static readonly string SetSpeedZero = "SetSpeedZero"; + public static readonly string SetSpeed25 = "SetSpeed25"; + public static readonly string SetSpeed50 = "SetSpeed50"; + public static readonly string SetSpeed75 = "SetSpeed75"; + public static readonly string SetSpeed100 = "SetSpeed100"; + public static readonly string YawLeftButton_Landing = "YawLeftButton_Landing"; + public static readonly string YawRightButton_Landing = "YawRightButton_Landing"; + public static readonly string PitchUpButton_Landing = "PitchUpButton_Landing"; + public static readonly string PitchDownButton_Landing = "PitchDownButton_Landing"; + public static readonly string RollLeftButton_Landing = "RollLeftButton_Landing"; + public static readonly string RollRightButton_Landing = "RollRightButton_Landing"; + public static readonly string LeftThrustButton_Landing = "LeftThrustButton_Landing"; + public static readonly string RightThrustButton_Landing = "RightThrustButton_Landing"; + public static readonly string UpThrustButton_Landing = "UpThrustButton_Landing"; + public static readonly string DownThrustButton_Landing = "DownThrustButton_Landing"; + public static readonly string ForwardThrustButton_Landing = "ForwardThrustButton_Landing"; + public static readonly string BackwardThrustButton_Landing = "BackwardThrustButton_Landing"; + public static readonly string ToggleFlightAssist = "ToggleFlightAssist"; + public static readonly string UseBoostJuice = "UseBoostJuice"; + public static readonly string HyperSuperCombination = "HyperSuperCombination"; + public static readonly string Supercruise = "Supercruise"; + public static readonly string Hyperspace = "Hyperspace"; + public static readonly string DisableRotationCorrectToggle = "DisableRotationCorrectToggle"; + public static readonly string OrbitLinesToggle = "OrbitLinesToggle"; + public static readonly string SelectTarget = "SelectTarget"; + public static readonly string CycleNextTarget = "CycleNextTarget"; + public static readonly string CyclePreviousTarget = "CyclePreviousTarget"; + public static readonly string SelectHighestThreat = "SelectHighestThreat"; + public static readonly string CycleNextHostileTarget = "CycleNextHostileTarget"; + public static readonly string CyclePreviousHostileTarget = "CyclePreviousHostileTarget"; + public static readonly string TargetWingman0 = "TargetWingman0"; + public static readonly string TargetWingman1 = "TargetWingman1"; + public static readonly string TargetWingman2 = "TargetWingman2"; + public static readonly string SelectTargetsTarget = "SelectTargetsTarget"; + public static readonly string WingNavLock = "WingNavLock"; + public static readonly string CycleNextSubsystem = "CycleNextSubsystem"; + public static readonly string CyclePreviousSubsystem = "CyclePreviousSubsystem"; + public static readonly string TargetNextRouteSystem = "TargetNextRouteSystem"; + public static readonly string PrimaryFire = "PrimaryFire"; + public static readonly string SecondaryFire = "SecondaryFire"; + public static readonly string CycleFireGroupNext = "CycleFireGroupNext"; + public static readonly string CycleFireGroupPrevious = "CycleFireGroupPrevious"; + public static readonly string DeployHardpointToggle = "DeployHardpointToggle"; + public static readonly string ToggleButtonUpInput = "ToggleButtonUpInput"; + public static readonly string DeployHeatSink = "DeployHeatSink"; + public static readonly string ShipSpotLightToggle = "ShipSpotLightToggle"; + public static readonly string RadarIncreaseRange = "RadarIncreaseRange"; + public static readonly string RadarDecreaseRange = "RadarDecreaseRange"; + public static readonly string IncreaseEnginesPower = "IncreaseEnginesPower"; + public static readonly string IncreaseWeaponsPower = "IncreaseWeaponsPower"; + public static readonly string IncreaseSystemsPower = "IncreaseSystemsPower"; + public static readonly string ResetPowerDistribution = "ResetPowerDistribution"; + public static readonly string HMDReset = "HMDReset"; + public static readonly string ToggleCargoScoop = "ToggleCargoScoop"; + public static readonly string EjectAllCargo = "EjectAllCargo"; + public static readonly string LandingGearToggle = "LandingGearToggle"; + public static readonly string MicrophoneMute = "MicrophoneMute"; + public static readonly string UseShieldCell = "UseShieldCell"; + public static readonly string FireChaffLauncher = "FireChaffLauncher"; + public static readonly string ChargeECM = "ChargeECM"; + public static readonly string WeaponColourToggle = "WeaponColourToggle"; + public static readonly string EngineColourToggle = "EngineColourToggle"; + public static readonly string NightVisionToggle = "NightVisionToggle"; + public static readonly string UIFocus = "UIFocus"; + public static readonly string FocusLeftPanel = "FocusLeftPanel"; + public static readonly string FocusCommsPanel = "FocusCommsPanel"; + public static readonly string QuickCommsPanel = "QuickCommsPanel"; + public static readonly string FocusRadarPanel = "FocusRadarPanel"; + public static readonly string FocusRightPanel = "FocusRightPanel"; + public static readonly string GalaxyMapOpen = "GalaxyMapOpen"; + public static readonly string SystemMapOpen = "SystemMapOpen"; + public static readonly string ShowPGScoreSummaryInput = "ShowPGScoreSummaryInput"; + public static readonly string HeadLookToggle = "HeadLookToggle"; + public static readonly string Pause = "Pause"; + public static readonly string FriendsMenu = "FriendsMenu"; + public static readonly string OpenCodexGoToDiscovery = "OpenCodexGoToDiscovery"; + public static readonly string PlayerHUDModeToggle = "PlayerHUDModeToggle"; + public static readonly string UI_Up = "UI_Up"; + public static readonly string UI_Down = "UI_Down"; + public static readonly string UI_Left = "UI_Left"; + public static readonly string UI_Right = "UI_Right"; + public static readonly string UI_Select = "UI_Select"; + public static readonly string UI_Back = "UI_Back"; + public static readonly string UI_Toggle = "UI_Toggle"; + public static readonly string CycleNextPanel = "CycleNextPanel"; + public static readonly string CyclePreviousPanel = "CyclePreviousPanel"; + public static readonly string CycleNextPage = "CycleNextPage"; + public static readonly string CyclePreviousPage = "CyclePreviousPage"; + public static readonly string HeadLookReset = "HeadLookReset"; + public static readonly string HeadLookPitchUp = "HeadLookPitchUp"; + public static readonly string HeadLookPitchDown = "HeadLookPitchDown"; + public static readonly string HeadLookYawLeft = "HeadLookYawLeft"; + public static readonly string HeadLookYawRight = "HeadLookYawRight"; + public static readonly string CamPitchUp = "CamPitchUp"; + public static readonly string CamPitchDown = "CamPitchDown"; + public static readonly string CamYawLeft = "CamYawLeft"; + public static readonly string CamYawRight = "CamYawRight"; + public static readonly string CamTranslateForward = "CamTranslateForward"; + public static readonly string CamTranslateBackward = "CamTranslateBackward"; + public static readonly string CamTranslateLeft = "CamTranslateLeft"; + public static readonly string CamTranslateRight = "CamTranslateRight"; + public static readonly string CamTranslateUp = "CamTranslateUp"; + public static readonly string CamTranslateDown = "CamTranslateDown"; + public static readonly string CamZoomIn = "CamZoomIn"; + public static readonly string CamZoomOut = "CamZoomOut"; + public static readonly string CamTranslateZHold = "CamTranslateZHold"; + public static readonly string ToggleDriveAssist = "ToggleDriveAssist"; + public static readonly string SteerLeftButton = "SteerLeftButton"; + public static readonly string SteerRightButton = "SteerRightButton"; + public static readonly string BuggyRollLeftButton = "BuggyRollLeftButton"; + public static readonly string BuggyRollRightButton = "BuggyRollRightButton"; + public static readonly string BuggyPitchUpButton = "BuggyPitchUpButton"; + public static readonly string BuggyPitchDownButton = "BuggyPitchDownButton"; + public static readonly string VerticalThrustersButton = "VerticalThrustersButton"; + public static readonly string BuggyPrimaryFireButton = "BuggyPrimaryFireButton"; + public static readonly string BuggySecondaryFireButton = "BuggySecondaryFireButton"; + public static readonly string AutoBreakBuggyButton = "AutoBreakBuggyButton"; + public static readonly string HeadlightsBuggyButton = "HeadlightsBuggyButton"; + public static readonly string ToggleBuggyTurretButton = "ToggleBuggyTurretButton"; + public static readonly string SelectTarget_Buggy = "SelectTarget_Buggy"; + public static readonly string BuggyTurretYawLeftButton = "BuggyTurretYawLeftButton"; + public static readonly string BuggyTurretYawRightButton = "BuggyTurretYawRightButton"; + public static readonly string BuggyTurretPitchUpButton = "BuggyTurretPitchUpButton"; + public static readonly string BuggyTurretPitchDownButton = "BuggyTurretPitchDownButton"; + public static readonly string BuggyToggleReverseThrottleInput = "BuggyToggleReverseThrottleInput"; + public static readonly string IncreaseSpeedButtonMax = "IncreaseSpeedButtonMax"; + public static readonly string DecreaseSpeedButtonMax = "DecreaseSpeedButtonMax"; + public static readonly string IncreaseEnginesPower_Buggy = "IncreaseEnginesPower_Buggy"; + public static readonly string IncreaseWeaponsPower_Buggy = "IncreaseWeaponsPower_Buggy"; + public static readonly string IncreaseSystemsPower_Buggy = "IncreaseSystemsPower_Buggy"; + public static readonly string ResetPowerDistribution_Buggy = "ResetPowerDistribution_Buggy"; + public static readonly string ToggleCargoScoop_Buggy = "ToggleCargoScoop_Buggy"; + public static readonly string EjectAllCargo_Buggy = "EjectAllCargo_Buggy"; + public static readonly string RecallDismissShip = "RecallDismissShip"; + public static readonly string UIFocus_Buggy = "UIFocus_Buggy"; + public static readonly string FocusLeftPanel_Buggy = "FocusLeftPanel_Buggy"; + public static readonly string FocusCommsPanel_Buggy = "FocusCommsPanel_Buggy"; + public static readonly string QuickCommsPanel_Buggy = "QuickCommsPanel_Buggy"; + public static readonly string FocusRadarPanel_Buggy = "FocusRadarPanel_Buggy"; + public static readonly string FocusRightPanel_Buggy = "FocusRightPanel_Buggy"; + public static readonly string GalaxyMapOpen_Buggy = "GalaxyMapOpen_Buggy"; + public static readonly string SystemMapOpen_Buggy = "SystemMapOpen_Buggy"; + public static readonly string HeadLookToggle_Buggy = "HeadLookToggle_Buggy"; + public static readonly string MultiCrewToggleMode = "MultiCrewToggleMode"; + public static readonly string MultiCrewPrimaryFire = "MultiCrewPrimaryFire"; + public static readonly string MultiCrewSecondaryFire = "MultiCrewSecondaryFire"; + public static readonly string MultiCrewPrimaryUtilityFire = "MultiCrewPrimaryUtilityFire"; + public static readonly string MultiCrewSecondaryUtilityFire = "MultiCrewSecondaryUtilityFire"; + public static readonly string MultiCrewThirdPersonYawLeftButton = "MultiCrewThirdPersonYawLeftButton"; + public static readonly string MultiCrewThirdPersonYawRightButton = "MultiCrewThirdPersonYawRightButton"; + public static readonly string MultiCrewThirdPersonPitchUpButton = "MultiCrewThirdPersonPitchUpButton"; + public static readonly string MultiCrewThirdPersonPitchDownButton = "MultiCrewThirdPersonPitchDownButton"; + public static readonly string MultiCrewThirdPersonFovOutButton = "MultiCrewThirdPersonFovOutButton"; + public static readonly string MultiCrewThirdPersonFovInButton = "MultiCrewThirdPersonFovInButton"; + public static readonly string MultiCrewCockpitUICycleForward = "MultiCrewCockpitUICycleForward"; + public static readonly string MultiCrewCockpitUICycleBackward = "MultiCrewCockpitUICycleBackward"; + public static readonly string OrderRequestDock = "OrderRequestDock"; + public static readonly string OrderDefensiveBehaviour = "OrderDefensiveBehaviour"; + public static readonly string OrderAggressiveBehaviour = "OrderAggressiveBehaviour"; + public static readonly string OrderFocusTarget = "OrderFocusTarget"; + public static readonly string OrderHoldFire = "OrderHoldFire"; + public static readonly string OrderHoldPosition = "OrderHoldPosition"; + public static readonly string OrderFollow = "OrderFollow"; + public static readonly string OpenOrders = "OpenOrders"; + public static readonly string PhotoCameraToggle = "PhotoCameraToggle"; + public static readonly string PhotoCameraToggle_Buggy = "PhotoCameraToggle_Buggy"; + public static readonly string VanityCameraScrollLeft = "VanityCameraScrollLeft"; + public static readonly string VanityCameraScrollRight = "VanityCameraScrollRight"; + public static readonly string ToggleFreeCam = "ToggleFreeCam"; + public static readonly string VanityCameraOne = "VanityCameraOne"; + public static readonly string VanityCameraTwo = "VanityCameraTwo"; + public static readonly string VanityCameraThree = "VanityCameraThree"; + public static readonly string VanityCameraFour = "VanityCameraFour"; + public static readonly string VanityCameraFive = "VanityCameraFive"; + public static readonly string VanityCameraSix = "VanityCameraSix"; + public static readonly string VanityCameraSeven = "VanityCameraSeven"; + public static readonly string VanityCameraEight = "VanityCameraEight"; + public static readonly string VanityCameraNine = "VanityCameraNine"; + public static readonly string FreeCamToggleHUD = "FreeCamToggleHUD"; + public static readonly string FreeCamSpeedInc = "FreeCamSpeedInc"; + public static readonly string FreeCamSpeedDec = "FreeCamSpeedDec"; + public static readonly string ToggleReverseThrottleInputFreeCam = "ToggleReverseThrottleInputFreeCam"; + public static readonly string MoveFreeCamForward = "MoveFreeCamForward"; + public static readonly string MoveFreeCamBackwards = "MoveFreeCamBackwards"; + public static readonly string MoveFreeCamRight = "MoveFreeCamRight"; + public static readonly string MoveFreeCamLeft = "MoveFreeCamLeft"; + public static readonly string MoveFreeCamUp = "MoveFreeCamUp"; + public static readonly string MoveFreeCamDown = "MoveFreeCamDown"; + public static readonly string PitchCameraUp = "PitchCameraUp"; + public static readonly string PitchCameraDown = "PitchCameraDown"; + public static readonly string YawCameraLeft = "YawCameraLeft"; + public static readonly string YawCameraRight = "YawCameraRight"; + public static readonly string RollCameraLeft = "RollCameraLeft"; + public static readonly string RollCameraRight = "RollCameraRight"; + public static readonly string ToggleRotationLock = "ToggleRotationLock"; + public static readonly string FixCameraRelativeToggle = "FixCameraRelativeToggle"; + public static readonly string FixCameraWorldToggle = "FixCameraWorldToggle"; + public static readonly string QuitCamera = "QuitCamera"; + public static readonly string ToggleAdvanceMode = "ToggleAdvanceMode"; + public static readonly string FreeCamZoomIn = "FreeCamZoomIn"; + public static readonly string FreeCamZoomOut = "FreeCamZoomOut"; + public static readonly string FStopDec = "FStopDec"; + public static readonly string FStopInc = "FStopInc"; + public static readonly string CommanderCreator_Undo = "CommanderCreator_Undo"; + public static readonly string CommanderCreator_Redo = "CommanderCreator_Redo"; + public static readonly string CommanderCreator_Rotation_MouseToggle = "CommanderCreator_Rotation_MouseToggle"; + public static readonly string GalnetAudio_Play_Pause = "GalnetAudio_Play_Pause"; + public static readonly string GalnetAudio_SkipForward = "GalnetAudio_SkipForward"; + public static readonly string GalnetAudio_SkipBackward = "GalnetAudio_SkipBackward"; + public static readonly string GalnetAudio_ClearQueue = "GalnetAudio_ClearQueue"; + public static readonly string ExplorationFSSEnter = "ExplorationFSSEnter"; + public static readonly string ExplorationFSSCameraPitchIncreaseButton = "ExplorationFSSCameraPitchIncreaseButton"; + public static readonly string ExplorationFSSCameraPitchDecreaseButton = "ExplorationFSSCameraPitchDecreaseButton"; + public static readonly string ExplorationFSSCameraYawIncreaseButton = "ExplorationFSSCameraYawIncreaseButton"; + public static readonly string ExplorationFSSCameraYawDecreaseButton = "ExplorationFSSCameraYawDecreaseButton"; + public static readonly string ExplorationFSSZoomIn = "ExplorationFSSZoomIn"; + public static readonly string ExplorationFSSZoomOut = "ExplorationFSSZoomOut"; + public static readonly string ExplorationFSSMiniZoomIn = "ExplorationFSSMiniZoomIn"; + public static readonly string ExplorationFSSMiniZoomOut = "ExplorationFSSMiniZoomOut"; + public static readonly string ExplorationFSSRadioTuningX_Increase = "ExplorationFSSRadioTuningX_Increase"; + public static readonly string ExplorationFSSRadioTuningX_Decrease = "ExplorationFSSRadioTuningX_Decrease"; + public static readonly string ExplorationFSSDiscoveryScan = "ExplorationFSSDiscoveryScan"; + public static readonly string ExplorationFSSQuit = "ExplorationFSSQuit"; + public static readonly string ExplorationFSSTarget = "ExplorationFSSTarget"; + public static readonly string ExplorationFSSShowHelp = "ExplorationFSSShowHelp"; + public static readonly string ExplorationSAAChangeScannedAreaViewToggle = "ExplorationSAAChangeScannedAreaViewToggle"; + public static readonly string ExplorationSAAExitThirdPerson = "ExplorationSAAExitThirdPerson"; + public static readonly string SAAThirdPersonYawLeftButton = "SAAThirdPersonYawLeftButton"; + public static readonly string SAAThirdPersonYawRightButton = "SAAThirdPersonYawRightButton"; + public static readonly string SAAThirdPersonPitchUpButton = "SAAThirdPersonPitchUpButton"; + public static readonly string SAAThirdPersonPitchDownButton = "SAAThirdPersonPitchDownButton"; + public static readonly string SAAThirdPersonFovOutButton = "SAAThirdPersonFovOutButton"; + public static readonly string SAAThirdPersonFovInButton = "SAAThirdPersonFovInButton"; + } + + /// + /// Class representing current controls configuration + /// + public class Controls : Node + { + public string timestamp; + public string @event; + public long Flags; + public int[] Pips; + public int FireGroup; + public int GuiFocus; + public double Fuel; + public double Cargo; + } +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs index b5af7612a..8af14a720 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs @@ -1,5 +1,71 @@ namespace Aurora.Profiles.EliteDangerous.GSI.Nodes { + + public class StatusState + { + long flagsSet = -1; + long flagsNotSet = -1; + int guiFocus = -1; + + public StatusState(long flagsSet, int guiFocus, long flagsNotSet) + { + this.flagsSet = flagsSet; + this.guiFocus = guiFocus; + this.flagsNotSet = flagsNotSet; + } + + public bool ConditionSatisfied(long flags, int guiFocus) { + if(this.guiFocus != -1 && this.guiFocus != guiFocus) { + return false; + } + if(this.flagsSet != -1 && !Flag.IsFlagSet(flags, this.flagsSet)) { + return false; + } + if(this.flagsNotSet != -1 && Flag.IsFlagSet(flags, this.flagsNotSet)) { + return false; + } + + return true; + } + } + + public static class Flag + { + public static readonly int DOCKED = 1; + public static readonly int LANDED_PLANET = 1 << 1; + public static readonly int LANDING_GEAR = 1 << 2; + public static readonly int SHIELDS_UP = 1 << 3; + public static readonly int SUPERCRUISE = 1 << 4; + public static readonly int FA_OFF = 1 << 5; + public static readonly int HARDPOINTS = 1 << 6; + public static readonly int IN_WING = 1 << 7; + public static readonly int SHIP_LIGHTS = 1 << 8; + public static readonly int CARGO_SCOOP = 1 << 9; + public static readonly int SILENT_RUNNING = 1 << 10; + public static readonly int SCOOPING = 1 << 11; + public static readonly int SRV_HANDBRAKE = 1 << 12; + public static readonly int SRV_TURRET = 1 << 13; + public static readonly int SRV_UNDER_SHIP = 1 << 14; + public static readonly int SRV_DRIVE_ASSIST = 1 << 15; + public static readonly int MASS_LOCK = 1 << 16; + public static readonly int FSD_CHARGING = 1 << 17; + public static readonly int FSD_COOLDOWN = 1 << 18; + public static readonly int LOW_FUEL = 1 << 19; // Less than 25% + public static readonly int OVERHEATING = 1 << 20; // More than 100% + public static readonly int HAS_LAT_LONG = 1 << 21; + public static readonly int IN_DANGER = 1 << 22; + public static readonly int INTERDICTION = 1 << 23; + public static readonly int IN_SHIP = 1 << 24; + public static readonly int IN_FIGHTER = 1 << 25; + public static readonly int IN_SRV = 1 << 26; + public static readonly int HUD_DISCOVERY_MODE = 1 << 27; + public static readonly int NIGHT_VISION = 1 << 28; + + public static bool IsFlagSet(long bitmask, long flag) { + return (bitmask & flag) == flag; + } + } + /// /// Class representing player status /// diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs index 260292620..a141f4614 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Xml; namespace Aurora.Profiles.EliteDangerous { @@ -81,6 +82,27 @@ private void ParseBindFile() { //TODO: Parse configuration XML Global.logger.Error("Current bind file: " + currentBindFile); + XmlDocument doc = new XmlDocument(); + try + { + doc.Load(currentBindFile); + XmlNodeList binds = doc.DocumentElement.ChildNodes; + foreach(XmlNode bind in binds) + { + foreach (XmlNode mapping in bind.ChildNodes) + { + if(mapping.Name == "Primary" || mapping.Name == "Secondary") { + // This is a bind + Global.logger.Error(bind.Name + " " + mapping.Name + ": " + mapping.Attributes["Device"].Value + " " + mapping.Attributes["Key"].Value); + } + } + } + + } + catch (System.IO.FileNotFoundException) + { + Global.logger.Error("Error loading binds file: " + currentBindFile); + } } public override void OnStart() diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj index 77919916f..d71ddd7af 100755 --- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj +++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj @@ -458,6 +458,7 @@ + Control_EliteDangerousBackgroundLayer.xaml From b4aab5ba1c73fa44735c1d472a0144e3da2ddb8f Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Mon, 26 Aug 2019 00:25:09 +0300 Subject: [PATCH 011/445] Implemented binds file parsing - added structures for binds - started implementing control/color groups --- .../GSI/GameState_EliteDangerous.cs | 19 +- .../EliteDangerous/GSI/Nodes/Controls.cs | 718 +++++++++++------- .../GameEvent_EliteDangerous.cs | 55 +- .../EliteDangerousKeyBindsLayerHandler.cs | 55 +- 4 files changed, 564 insertions(+), 283 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs index f5bb1621f..00e50557c 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs @@ -1,15 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Aurora.Profiles.EliteDangerous.GSI.Nodes; +using Aurora.Profiles.EliteDangerous.GSI.Nodes; namespace Aurora.Profiles.EliteDangerous.GSI { class GameState_EliteDangerous : GameState { private Status status; + private Nodes.Controls controls; public Status Status { @@ -21,6 +17,17 @@ public Status Status return status; } } + + public Nodes.Controls Controls + { + get + { + if (controls == null) + controls = new Nodes.Controls(); + + return controls; + } + } /// /// Creates a default GameState_EliteDangerous instance. /// diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs index 9df1a10a1..182a06ca4 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs @@ -1,264 +1,431 @@ -namespace Aurora.Profiles.EliteDangerous.GSI.Nodes +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using Aurora.Devices; +using CSScriptLibrary; + +namespace Aurora.Profiles.EliteDangerous.GSI.Nodes { - public class EliteBind + public class Bind { - public static readonly string MODIFIER = "MODIFIER"; - public static readonly string MouseReset = "MouseReset"; - public static readonly string YawLeftButton = "YawLeftButton"; - public static readonly string YawRightButton = "YawRightButton"; - public static readonly string YawToRollButton = "YawToRollButton"; - public static readonly string RollLeftButton = "RollLeftButton"; - public static readonly string RollRightButton = "RollRightButton"; - public static readonly string PitchUpButton = "PitchUpButton"; - public static readonly string PitchDownButton = "PitchDownButton"; - public static readonly string LeftThrustButton = "LeftThrustButton"; - public static readonly string RightThrustButton = "RightThrustButton"; - public static readonly string UpThrustButton = "UpThrustButton"; - public static readonly string DownThrustButton = "DownThrustButton"; - public static readonly string ForwardThrustButton = "ForwardThrustButton"; - public static readonly string BackwardThrustButton = "BackwardThrustButton"; - public static readonly string UseAlternateFlightValuesToggle = "UseAlternateFlightValuesToggle"; - public static readonly string ToggleReverseThrottleInput = "ToggleReverseThrottleInput"; - public static readonly string ForwardKey = "ForwardKey"; - public static readonly string BackwardKey = "BackwardKey"; - public static readonly string SetSpeedMinus100 = "SetSpeedMinus100"; - public static readonly string SetSpeedMinus75 = "SetSpeedMinus75"; - public static readonly string SetSpeedMinus50 = "SetSpeedMinus50"; - public static readonly string SetSpeedMinus25 = "SetSpeedMinus25"; - public static readonly string SetSpeedZero = "SetSpeedZero"; - public static readonly string SetSpeed25 = "SetSpeed25"; - public static readonly string SetSpeed50 = "SetSpeed50"; - public static readonly string SetSpeed75 = "SetSpeed75"; - public static readonly string SetSpeed100 = "SetSpeed100"; - public static readonly string YawLeftButton_Landing = "YawLeftButton_Landing"; - public static readonly string YawRightButton_Landing = "YawRightButton_Landing"; - public static readonly string PitchUpButton_Landing = "PitchUpButton_Landing"; - public static readonly string PitchDownButton_Landing = "PitchDownButton_Landing"; - public static readonly string RollLeftButton_Landing = "RollLeftButton_Landing"; - public static readonly string RollRightButton_Landing = "RollRightButton_Landing"; - public static readonly string LeftThrustButton_Landing = "LeftThrustButton_Landing"; - public static readonly string RightThrustButton_Landing = "RightThrustButton_Landing"; - public static readonly string UpThrustButton_Landing = "UpThrustButton_Landing"; - public static readonly string DownThrustButton_Landing = "DownThrustButton_Landing"; - public static readonly string ForwardThrustButton_Landing = "ForwardThrustButton_Landing"; - public static readonly string BackwardThrustButton_Landing = "BackwardThrustButton_Landing"; - public static readonly string ToggleFlightAssist = "ToggleFlightAssist"; - public static readonly string UseBoostJuice = "UseBoostJuice"; - public static readonly string HyperSuperCombination = "HyperSuperCombination"; - public static readonly string Supercruise = "Supercruise"; - public static readonly string Hyperspace = "Hyperspace"; - public static readonly string DisableRotationCorrectToggle = "DisableRotationCorrectToggle"; - public static readonly string OrbitLinesToggle = "OrbitLinesToggle"; - public static readonly string SelectTarget = "SelectTarget"; - public static readonly string CycleNextTarget = "CycleNextTarget"; - public static readonly string CyclePreviousTarget = "CyclePreviousTarget"; - public static readonly string SelectHighestThreat = "SelectHighestThreat"; - public static readonly string CycleNextHostileTarget = "CycleNextHostileTarget"; - public static readonly string CyclePreviousHostileTarget = "CyclePreviousHostileTarget"; - public static readonly string TargetWingman0 = "TargetWingman0"; - public static readonly string TargetWingman1 = "TargetWingman1"; - public static readonly string TargetWingman2 = "TargetWingman2"; - public static readonly string SelectTargetsTarget = "SelectTargetsTarget"; - public static readonly string WingNavLock = "WingNavLock"; - public static readonly string CycleNextSubsystem = "CycleNextSubsystem"; - public static readonly string CyclePreviousSubsystem = "CyclePreviousSubsystem"; - public static readonly string TargetNextRouteSystem = "TargetNextRouteSystem"; - public static readonly string PrimaryFire = "PrimaryFire"; - public static readonly string SecondaryFire = "SecondaryFire"; - public static readonly string CycleFireGroupNext = "CycleFireGroupNext"; - public static readonly string CycleFireGroupPrevious = "CycleFireGroupPrevious"; - public static readonly string DeployHardpointToggle = "DeployHardpointToggle"; - public static readonly string ToggleButtonUpInput = "ToggleButtonUpInput"; - public static readonly string DeployHeatSink = "DeployHeatSink"; - public static readonly string ShipSpotLightToggle = "ShipSpotLightToggle"; - public static readonly string RadarIncreaseRange = "RadarIncreaseRange"; - public static readonly string RadarDecreaseRange = "RadarDecreaseRange"; - public static readonly string IncreaseEnginesPower = "IncreaseEnginesPower"; - public static readonly string IncreaseWeaponsPower = "IncreaseWeaponsPower"; - public static readonly string IncreaseSystemsPower = "IncreaseSystemsPower"; - public static readonly string ResetPowerDistribution = "ResetPowerDistribution"; - public static readonly string HMDReset = "HMDReset"; - public static readonly string ToggleCargoScoop = "ToggleCargoScoop"; - public static readonly string EjectAllCargo = "EjectAllCargo"; - public static readonly string LandingGearToggle = "LandingGearToggle"; - public static readonly string MicrophoneMute = "MicrophoneMute"; - public static readonly string UseShieldCell = "UseShieldCell"; - public static readonly string FireChaffLauncher = "FireChaffLauncher"; - public static readonly string ChargeECM = "ChargeECM"; - public static readonly string WeaponColourToggle = "WeaponColourToggle"; - public static readonly string EngineColourToggle = "EngineColourToggle"; - public static readonly string NightVisionToggle = "NightVisionToggle"; - public static readonly string UIFocus = "UIFocus"; - public static readonly string FocusLeftPanel = "FocusLeftPanel"; - public static readonly string FocusCommsPanel = "FocusCommsPanel"; - public static readonly string QuickCommsPanel = "QuickCommsPanel"; - public static readonly string FocusRadarPanel = "FocusRadarPanel"; - public static readonly string FocusRightPanel = "FocusRightPanel"; - public static readonly string GalaxyMapOpen = "GalaxyMapOpen"; - public static readonly string SystemMapOpen = "SystemMapOpen"; - public static readonly string ShowPGScoreSummaryInput = "ShowPGScoreSummaryInput"; - public static readonly string HeadLookToggle = "HeadLookToggle"; - public static readonly string Pause = "Pause"; - public static readonly string FriendsMenu = "FriendsMenu"; - public static readonly string OpenCodexGoToDiscovery = "OpenCodexGoToDiscovery"; - public static readonly string PlayerHUDModeToggle = "PlayerHUDModeToggle"; - public static readonly string UI_Up = "UI_Up"; - public static readonly string UI_Down = "UI_Down"; - public static readonly string UI_Left = "UI_Left"; - public static readonly string UI_Right = "UI_Right"; - public static readonly string UI_Select = "UI_Select"; - public static readonly string UI_Back = "UI_Back"; - public static readonly string UI_Toggle = "UI_Toggle"; - public static readonly string CycleNextPanel = "CycleNextPanel"; - public static readonly string CyclePreviousPanel = "CyclePreviousPanel"; - public static readonly string CycleNextPage = "CycleNextPage"; - public static readonly string CyclePreviousPage = "CyclePreviousPage"; - public static readonly string HeadLookReset = "HeadLookReset"; - public static readonly string HeadLookPitchUp = "HeadLookPitchUp"; - public static readonly string HeadLookPitchDown = "HeadLookPitchDown"; - public static readonly string HeadLookYawLeft = "HeadLookYawLeft"; - public static readonly string HeadLookYawRight = "HeadLookYawRight"; - public static readonly string CamPitchUp = "CamPitchUp"; - public static readonly string CamPitchDown = "CamPitchDown"; - public static readonly string CamYawLeft = "CamYawLeft"; - public static readonly string CamYawRight = "CamYawRight"; - public static readonly string CamTranslateForward = "CamTranslateForward"; - public static readonly string CamTranslateBackward = "CamTranslateBackward"; - public static readonly string CamTranslateLeft = "CamTranslateLeft"; - public static readonly string CamTranslateRight = "CamTranslateRight"; - public static readonly string CamTranslateUp = "CamTranslateUp"; - public static readonly string CamTranslateDown = "CamTranslateDown"; - public static readonly string CamZoomIn = "CamZoomIn"; - public static readonly string CamZoomOut = "CamZoomOut"; - public static readonly string CamTranslateZHold = "CamTranslateZHold"; - public static readonly string ToggleDriveAssist = "ToggleDriveAssist"; - public static readonly string SteerLeftButton = "SteerLeftButton"; - public static readonly string SteerRightButton = "SteerRightButton"; - public static readonly string BuggyRollLeftButton = "BuggyRollLeftButton"; - public static readonly string BuggyRollRightButton = "BuggyRollRightButton"; - public static readonly string BuggyPitchUpButton = "BuggyPitchUpButton"; - public static readonly string BuggyPitchDownButton = "BuggyPitchDownButton"; - public static readonly string VerticalThrustersButton = "VerticalThrustersButton"; - public static readonly string BuggyPrimaryFireButton = "BuggyPrimaryFireButton"; - public static readonly string BuggySecondaryFireButton = "BuggySecondaryFireButton"; - public static readonly string AutoBreakBuggyButton = "AutoBreakBuggyButton"; - public static readonly string HeadlightsBuggyButton = "HeadlightsBuggyButton"; - public static readonly string ToggleBuggyTurretButton = "ToggleBuggyTurretButton"; - public static readonly string SelectTarget_Buggy = "SelectTarget_Buggy"; - public static readonly string BuggyTurretYawLeftButton = "BuggyTurretYawLeftButton"; - public static readonly string BuggyTurretYawRightButton = "BuggyTurretYawRightButton"; - public static readonly string BuggyTurretPitchUpButton = "BuggyTurretPitchUpButton"; - public static readonly string BuggyTurretPitchDownButton = "BuggyTurretPitchDownButton"; - public static readonly string BuggyToggleReverseThrottleInput = "BuggyToggleReverseThrottleInput"; - public static readonly string IncreaseSpeedButtonMax = "IncreaseSpeedButtonMax"; - public static readonly string DecreaseSpeedButtonMax = "DecreaseSpeedButtonMax"; - public static readonly string IncreaseEnginesPower_Buggy = "IncreaseEnginesPower_Buggy"; - public static readonly string IncreaseWeaponsPower_Buggy = "IncreaseWeaponsPower_Buggy"; - public static readonly string IncreaseSystemsPower_Buggy = "IncreaseSystemsPower_Buggy"; - public static readonly string ResetPowerDistribution_Buggy = "ResetPowerDistribution_Buggy"; - public static readonly string ToggleCargoScoop_Buggy = "ToggleCargoScoop_Buggy"; - public static readonly string EjectAllCargo_Buggy = "EjectAllCargo_Buggy"; - public static readonly string RecallDismissShip = "RecallDismissShip"; - public static readonly string UIFocus_Buggy = "UIFocus_Buggy"; - public static readonly string FocusLeftPanel_Buggy = "FocusLeftPanel_Buggy"; - public static readonly string FocusCommsPanel_Buggy = "FocusCommsPanel_Buggy"; - public static readonly string QuickCommsPanel_Buggy = "QuickCommsPanel_Buggy"; - public static readonly string FocusRadarPanel_Buggy = "FocusRadarPanel_Buggy"; - public static readonly string FocusRightPanel_Buggy = "FocusRightPanel_Buggy"; - public static readonly string GalaxyMapOpen_Buggy = "GalaxyMapOpen_Buggy"; - public static readonly string SystemMapOpen_Buggy = "SystemMapOpen_Buggy"; - public static readonly string HeadLookToggle_Buggy = "HeadLookToggle_Buggy"; - public static readonly string MultiCrewToggleMode = "MultiCrewToggleMode"; - public static readonly string MultiCrewPrimaryFire = "MultiCrewPrimaryFire"; - public static readonly string MultiCrewSecondaryFire = "MultiCrewSecondaryFire"; - public static readonly string MultiCrewPrimaryUtilityFire = "MultiCrewPrimaryUtilityFire"; - public static readonly string MultiCrewSecondaryUtilityFire = "MultiCrewSecondaryUtilityFire"; - public static readonly string MultiCrewThirdPersonYawLeftButton = "MultiCrewThirdPersonYawLeftButton"; - public static readonly string MultiCrewThirdPersonYawRightButton = "MultiCrewThirdPersonYawRightButton"; - public static readonly string MultiCrewThirdPersonPitchUpButton = "MultiCrewThirdPersonPitchUpButton"; - public static readonly string MultiCrewThirdPersonPitchDownButton = "MultiCrewThirdPersonPitchDownButton"; - public static readonly string MultiCrewThirdPersonFovOutButton = "MultiCrewThirdPersonFovOutButton"; - public static readonly string MultiCrewThirdPersonFovInButton = "MultiCrewThirdPersonFovInButton"; - public static readonly string MultiCrewCockpitUICycleForward = "MultiCrewCockpitUICycleForward"; - public static readonly string MultiCrewCockpitUICycleBackward = "MultiCrewCockpitUICycleBackward"; - public static readonly string OrderRequestDock = "OrderRequestDock"; - public static readonly string OrderDefensiveBehaviour = "OrderDefensiveBehaviour"; - public static readonly string OrderAggressiveBehaviour = "OrderAggressiveBehaviour"; - public static readonly string OrderFocusTarget = "OrderFocusTarget"; - public static readonly string OrderHoldFire = "OrderHoldFire"; - public static readonly string OrderHoldPosition = "OrderHoldPosition"; - public static readonly string OrderFollow = "OrderFollow"; - public static readonly string OpenOrders = "OpenOrders"; - public static readonly string PhotoCameraToggle = "PhotoCameraToggle"; - public static readonly string PhotoCameraToggle_Buggy = "PhotoCameraToggle_Buggy"; - public static readonly string VanityCameraScrollLeft = "VanityCameraScrollLeft"; - public static readonly string VanityCameraScrollRight = "VanityCameraScrollRight"; - public static readonly string ToggleFreeCam = "ToggleFreeCam"; - public static readonly string VanityCameraOne = "VanityCameraOne"; - public static readonly string VanityCameraTwo = "VanityCameraTwo"; - public static readonly string VanityCameraThree = "VanityCameraThree"; - public static readonly string VanityCameraFour = "VanityCameraFour"; - public static readonly string VanityCameraFive = "VanityCameraFive"; - public static readonly string VanityCameraSix = "VanityCameraSix"; - public static readonly string VanityCameraSeven = "VanityCameraSeven"; - public static readonly string VanityCameraEight = "VanityCameraEight"; - public static readonly string VanityCameraNine = "VanityCameraNine"; - public static readonly string FreeCamToggleHUD = "FreeCamToggleHUD"; - public static readonly string FreeCamSpeedInc = "FreeCamSpeedInc"; - public static readonly string FreeCamSpeedDec = "FreeCamSpeedDec"; - public static readonly string ToggleReverseThrottleInputFreeCam = "ToggleReverseThrottleInputFreeCam"; - public static readonly string MoveFreeCamForward = "MoveFreeCamForward"; - public static readonly string MoveFreeCamBackwards = "MoveFreeCamBackwards"; - public static readonly string MoveFreeCamRight = "MoveFreeCamRight"; - public static readonly string MoveFreeCamLeft = "MoveFreeCamLeft"; - public static readonly string MoveFreeCamUp = "MoveFreeCamUp"; - public static readonly string MoveFreeCamDown = "MoveFreeCamDown"; - public static readonly string PitchCameraUp = "PitchCameraUp"; - public static readonly string PitchCameraDown = "PitchCameraDown"; - public static readonly string YawCameraLeft = "YawCameraLeft"; - public static readonly string YawCameraRight = "YawCameraRight"; - public static readonly string RollCameraLeft = "RollCameraLeft"; - public static readonly string RollCameraRight = "RollCameraRight"; - public static readonly string ToggleRotationLock = "ToggleRotationLock"; - public static readonly string FixCameraRelativeToggle = "FixCameraRelativeToggle"; - public static readonly string FixCameraWorldToggle = "FixCameraWorldToggle"; - public static readonly string QuitCamera = "QuitCamera"; - public static readonly string ToggleAdvanceMode = "ToggleAdvanceMode"; - public static readonly string FreeCamZoomIn = "FreeCamZoomIn"; - public static readonly string FreeCamZoomOut = "FreeCamZoomOut"; - public static readonly string FStopDec = "FStopDec"; - public static readonly string FStopInc = "FStopInc"; - public static readonly string CommanderCreator_Undo = "CommanderCreator_Undo"; - public static readonly string CommanderCreator_Redo = "CommanderCreator_Redo"; - public static readonly string CommanderCreator_Rotation_MouseToggle = "CommanderCreator_Rotation_MouseToggle"; - public static readonly string GalnetAudio_Play_Pause = "GalnetAudio_Play_Pause"; - public static readonly string GalnetAudio_SkipForward = "GalnetAudio_SkipForward"; - public static readonly string GalnetAudio_SkipBackward = "GalnetAudio_SkipBackward"; - public static readonly string GalnetAudio_ClearQueue = "GalnetAudio_ClearQueue"; - public static readonly string ExplorationFSSEnter = "ExplorationFSSEnter"; - public static readonly string ExplorationFSSCameraPitchIncreaseButton = "ExplorationFSSCameraPitchIncreaseButton"; - public static readonly string ExplorationFSSCameraPitchDecreaseButton = "ExplorationFSSCameraPitchDecreaseButton"; - public static readonly string ExplorationFSSCameraYawIncreaseButton = "ExplorationFSSCameraYawIncreaseButton"; - public static readonly string ExplorationFSSCameraYawDecreaseButton = "ExplorationFSSCameraYawDecreaseButton"; - public static readonly string ExplorationFSSZoomIn = "ExplorationFSSZoomIn"; - public static readonly string ExplorationFSSZoomOut = "ExplorationFSSZoomOut"; - public static readonly string ExplorationFSSMiniZoomIn = "ExplorationFSSMiniZoomIn"; - public static readonly string ExplorationFSSMiniZoomOut = "ExplorationFSSMiniZoomOut"; - public static readonly string ExplorationFSSRadioTuningX_Increase = "ExplorationFSSRadioTuningX_Increase"; - public static readonly string ExplorationFSSRadioTuningX_Decrease = "ExplorationFSSRadioTuningX_Decrease"; - public static readonly string ExplorationFSSDiscoveryScan = "ExplorationFSSDiscoveryScan"; - public static readonly string ExplorationFSSQuit = "ExplorationFSSQuit"; - public static readonly string ExplorationFSSTarget = "ExplorationFSSTarget"; - public static readonly string ExplorationFSSShowHelp = "ExplorationFSSShowHelp"; - public static readonly string ExplorationSAAChangeScannedAreaViewToggle = "ExplorationSAAChangeScannedAreaViewToggle"; - public static readonly string ExplorationSAAExitThirdPerson = "ExplorationSAAExitThirdPerson"; - public static readonly string SAAThirdPersonYawLeftButton = "SAAThirdPersonYawLeftButton"; - public static readonly string SAAThirdPersonYawRightButton = "SAAThirdPersonYawRightButton"; - public static readonly string SAAThirdPersonPitchUpButton = "SAAThirdPersonPitchUpButton"; - public static readonly string SAAThirdPersonPitchDownButton = "SAAThirdPersonPitchDownButton"; - public static readonly string SAAThirdPersonFovOutButton = "SAAThirdPersonFovOutButton"; - public static readonly string SAAThirdPersonFovInButton = "SAAThirdPersonFovInButton"; + public static class EliteBindName + { + public static readonly string MouseReset = "MouseReset"; + public static readonly string YawLeftButton = "YawLeftButton"; + public static readonly string YawRightButton = "YawRightButton"; + public static readonly string YawToRollButton = "YawToRollButton"; + public static readonly string RollLeftButton = "RollLeftButton"; + public static readonly string RollRightButton = "RollRightButton"; + public static readonly string PitchUpButton = "PitchUpButton"; + public static readonly string PitchDownButton = "PitchDownButton"; + public static readonly string LeftThrustButton = "LeftThrustButton"; + public static readonly string RightThrustButton = "RightThrustButton"; + public static readonly string UpThrustButton = "UpThrustButton"; + public static readonly string DownThrustButton = "DownThrustButton"; + public static readonly string ForwardThrustButton = "ForwardThrustButton"; + public static readonly string BackwardThrustButton = "BackwardThrustButton"; + public static readonly string UseAlternateFlightValuesToggle = "UseAlternateFlightValuesToggle"; + public static readonly string ToggleReverseThrottleInput = "ToggleReverseThrottleInput"; + public static readonly string ForwardKey = "ForwardKey"; + public static readonly string BackwardKey = "BackwardKey"; + public static readonly string SetSpeedMinus100 = "SetSpeedMinus100"; + public static readonly string SetSpeedMinus75 = "SetSpeedMinus75"; + public static readonly string SetSpeedMinus50 = "SetSpeedMinus50"; + public static readonly string SetSpeedMinus25 = "SetSpeedMinus25"; + public static readonly string SetSpeedZero = "SetSpeedZero"; + public static readonly string SetSpeed25 = "SetSpeed25"; + public static readonly string SetSpeed50 = "SetSpeed50"; + public static readonly string SetSpeed75 = "SetSpeed75"; + public static readonly string SetSpeed100 = "SetSpeed100"; + public static readonly string YawLeftButton_Landing = "YawLeftButton_Landing"; + public static readonly string YawRightButton_Landing = "YawRightButton_Landing"; + public static readonly string PitchUpButton_Landing = "PitchUpButton_Landing"; + public static readonly string PitchDownButton_Landing = "PitchDownButton_Landing"; + public static readonly string RollLeftButton_Landing = "RollLeftButton_Landing"; + public static readonly string RollRightButton_Landing = "RollRightButton_Landing"; + public static readonly string LeftThrustButton_Landing = "LeftThrustButton_Landing"; + public static readonly string RightThrustButton_Landing = "RightThrustButton_Landing"; + public static readonly string UpThrustButton_Landing = "UpThrustButton_Landing"; + public static readonly string DownThrustButton_Landing = "DownThrustButton_Landing"; + public static readonly string ForwardThrustButton_Landing = "ForwardThrustButton_Landing"; + public static readonly string BackwardThrustButton_Landing = "BackwardThrustButton_Landing"; + public static readonly string ToggleFlightAssist = "ToggleFlightAssist"; + public static readonly string UseBoostJuice = "UseBoostJuice"; + public static readonly string HyperSuperCombination = "HyperSuperCombination"; + public static readonly string Supercruise = "Supercruise"; + public static readonly string Hyperspace = "Hyperspace"; + public static readonly string DisableRotationCorrectToggle = "DisableRotationCorrectToggle"; + public static readonly string OrbitLinesToggle = "OrbitLinesToggle"; + public static readonly string SelectTarget = "SelectTarget"; + public static readonly string CycleNextTarget = "CycleNextTarget"; + public static readonly string CyclePreviousTarget = "CyclePreviousTarget"; + public static readonly string SelectHighestThreat = "SelectHighestThreat"; + public static readonly string CycleNextHostileTarget = "CycleNextHostileTarget"; + public static readonly string CyclePreviousHostileTarget = "CyclePreviousHostileTarget"; + public static readonly string TargetWingman0 = "TargetWingman0"; + public static readonly string TargetWingman1 = "TargetWingman1"; + public static readonly string TargetWingman2 = "TargetWingman2"; + public static readonly string SelectTargetsTarget = "SelectTargetsTarget"; + public static readonly string WingNavLock = "WingNavLock"; + public static readonly string CycleNextSubsystem = "CycleNextSubsystem"; + public static readonly string CyclePreviousSubsystem = "CyclePreviousSubsystem"; + public static readonly string TargetNextRouteSystem = "TargetNextRouteSystem"; + public static readonly string PrimaryFire = "PrimaryFire"; + public static readonly string SecondaryFire = "SecondaryFire"; + public static readonly string CycleFireGroupNext = "CycleFireGroupNext"; + public static readonly string CycleFireGroupPrevious = "CycleFireGroupPrevious"; + public static readonly string DeployHardpointToggle = "DeployHardpointToggle"; + public static readonly string ToggleButtonUpInput = "ToggleButtonUpInput"; + public static readonly string DeployHeatSink = "DeployHeatSink"; + public static readonly string ShipSpotLightToggle = "ShipSpotLightToggle"; + public static readonly string RadarIncreaseRange = "RadarIncreaseRange"; + public static readonly string RadarDecreaseRange = "RadarDecreaseRange"; + public static readonly string IncreaseEnginesPower = "IncreaseEnginesPower"; + public static readonly string IncreaseWeaponsPower = "IncreaseWeaponsPower"; + public static readonly string IncreaseSystemsPower = "IncreaseSystemsPower"; + public static readonly string ResetPowerDistribution = "ResetPowerDistribution"; + public static readonly string HMDReset = "HMDReset"; + public static readonly string ToggleCargoScoop = "ToggleCargoScoop"; + public static readonly string EjectAllCargo = "EjectAllCargo"; + public static readonly string LandingGearToggle = "LandingGearToggle"; + public static readonly string MicrophoneMute = "MicrophoneMute"; + public static readonly string UseShieldCell = "UseShieldCell"; + public static readonly string FireChaffLauncher = "FireChaffLauncher"; + public static readonly string ChargeECM = "ChargeECM"; + public static readonly string WeaponColourToggle = "WeaponColourToggle"; + public static readonly string EngineColourToggle = "EngineColourToggle"; + public static readonly string NightVisionToggle = "NightVisionToggle"; + public static readonly string UIFocus = "UIFocus"; + public static readonly string FocusLeftPanel = "FocusLeftPanel"; + public static readonly string FocusCommsPanel = "FocusCommsPanel"; + public static readonly string QuickCommsPanel = "QuickCommsPanel"; + public static readonly string FocusRadarPanel = "FocusRadarPanel"; + public static readonly string FocusRightPanel = "FocusRightPanel"; + public static readonly string GalaxyMapOpen = "GalaxyMapOpen"; + public static readonly string SystemMapOpen = "SystemMapOpen"; + public static readonly string ShowPGScoreSummaryInput = "ShowPGScoreSummaryInput"; + public static readonly string HeadLookToggle = "HeadLookToggle"; + public static readonly string Pause = "Pause"; + public static readonly string FriendsMenu = "FriendsMenu"; + public static readonly string OpenCodexGoToDiscovery = "OpenCodexGoToDiscovery"; + public static readonly string PlayerHUDModeToggle = "PlayerHUDModeToggle"; + public static readonly string UI_Up = "UI_Up"; + public static readonly string UI_Down = "UI_Down"; + public static readonly string UI_Left = "UI_Left"; + public static readonly string UI_Right = "UI_Right"; + public static readonly string UI_Select = "UI_Select"; + public static readonly string UI_Back = "UI_Back"; + public static readonly string UI_Toggle = "UI_Toggle"; + public static readonly string CycleNextPanel = "CycleNextPanel"; + public static readonly string CyclePreviousPanel = "CyclePreviousPanel"; + public static readonly string CycleNextPage = "CycleNextPage"; + public static readonly string CyclePreviousPage = "CyclePreviousPage"; + public static readonly string HeadLookReset = "HeadLookReset"; + public static readonly string HeadLookPitchUp = "HeadLookPitchUp"; + public static readonly string HeadLookPitchDown = "HeadLookPitchDown"; + public static readonly string HeadLookYawLeft = "HeadLookYawLeft"; + public static readonly string HeadLookYawRight = "HeadLookYawRight"; + public static readonly string CamPitchUp = "CamPitchUp"; + public static readonly string CamPitchDown = "CamPitchDown"; + public static readonly string CamYawLeft = "CamYawLeft"; + public static readonly string CamYawRight = "CamYawRight"; + public static readonly string CamTranslateForward = "CamTranslateForward"; + public static readonly string CamTranslateBackward = "CamTranslateBackward"; + public static readonly string CamTranslateLeft = "CamTranslateLeft"; + public static readonly string CamTranslateRight = "CamTranslateRight"; + public static readonly string CamTranslateUp = "CamTranslateUp"; + public static readonly string CamTranslateDown = "CamTranslateDown"; + public static readonly string CamZoomIn = "CamZoomIn"; + public static readonly string CamZoomOut = "CamZoomOut"; + public static readonly string CamTranslateZHold = "CamTranslateZHold"; + public static readonly string ToggleDriveAssist = "ToggleDriveAssist"; + public static readonly string SteerLeftButton = "SteerLeftButton"; + public static readonly string SteerRightButton = "SteerRightButton"; + public static readonly string BuggyRollLeftButton = "BuggyRollLeftButton"; + public static readonly string BuggyRollRightButton = "BuggyRollRightButton"; + public static readonly string BuggyPitchUpButton = "BuggyPitchUpButton"; + public static readonly string BuggyPitchDownButton = "BuggyPitchDownButton"; + public static readonly string VerticalThrustersButton = "VerticalThrustersButton"; + public static readonly string BuggyPrimaryFireButton = "BuggyPrimaryFireButton"; + public static readonly string BuggySecondaryFireButton = "BuggySecondaryFireButton"; + public static readonly string AutoBreakBuggyButton = "AutoBreakBuggyButton"; + public static readonly string HeadlightsBuggyButton = "HeadlightsBuggyButton"; + public static readonly string ToggleBuggyTurretButton = "ToggleBuggyTurretButton"; + public static readonly string SelectTarget_Buggy = "SelectTarget_Buggy"; + public static readonly string BuggyTurretYawLeftButton = "BuggyTurretYawLeftButton"; + public static readonly string BuggyTurretYawRightButton = "BuggyTurretYawRightButton"; + public static readonly string BuggyTurretPitchUpButton = "BuggyTurretPitchUpButton"; + public static readonly string BuggyTurretPitchDownButton = "BuggyTurretPitchDownButton"; + public static readonly string BuggyToggleReverseThrottleInput = "BuggyToggleReverseThrottleInput"; + public static readonly string IncreaseSpeedButtonMax = "IncreaseSpeedButtonMax"; + public static readonly string DecreaseSpeedButtonMax = "DecreaseSpeedButtonMax"; + public static readonly string IncreaseEnginesPower_Buggy = "IncreaseEnginesPower_Buggy"; + public static readonly string IncreaseWeaponsPower_Buggy = "IncreaseWeaponsPower_Buggy"; + public static readonly string IncreaseSystemsPower_Buggy = "IncreaseSystemsPower_Buggy"; + public static readonly string ResetPowerDistribution_Buggy = "ResetPowerDistribution_Buggy"; + public static readonly string ToggleCargoScoop_Buggy = "ToggleCargoScoop_Buggy"; + public static readonly string EjectAllCargo_Buggy = "EjectAllCargo_Buggy"; + public static readonly string RecallDismissShip = "RecallDismissShip"; + public static readonly string UIFocus_Buggy = "UIFocus_Buggy"; + public static readonly string FocusLeftPanel_Buggy = "FocusLeftPanel_Buggy"; + public static readonly string FocusCommsPanel_Buggy = "FocusCommsPanel_Buggy"; + public static readonly string QuickCommsPanel_Buggy = "QuickCommsPanel_Buggy"; + public static readonly string FocusRadarPanel_Buggy = "FocusRadarPanel_Buggy"; + public static readonly string FocusRightPanel_Buggy = "FocusRightPanel_Buggy"; + public static readonly string GalaxyMapOpen_Buggy = "GalaxyMapOpen_Buggy"; + public static readonly string SystemMapOpen_Buggy = "SystemMapOpen_Buggy"; + public static readonly string HeadLookToggle_Buggy = "HeadLookToggle_Buggy"; + public static readonly string MultiCrewToggleMode = "MultiCrewToggleMode"; + public static readonly string MultiCrewPrimaryFire = "MultiCrewPrimaryFire"; + public static readonly string MultiCrewSecondaryFire = "MultiCrewSecondaryFire"; + public static readonly string MultiCrewPrimaryUtilityFire = "MultiCrewPrimaryUtilityFire"; + public static readonly string MultiCrewSecondaryUtilityFire = "MultiCrewSecondaryUtilityFire"; + public static readonly string MultiCrewThirdPersonYawLeftButton = "MultiCrewThirdPersonYawLeftButton"; + public static readonly string MultiCrewThirdPersonYawRightButton = "MultiCrewThirdPersonYawRightButton"; + public static readonly string MultiCrewThirdPersonPitchUpButton = "MultiCrewThirdPersonPitchUpButton"; + public static readonly string MultiCrewThirdPersonPitchDownButton = "MultiCrewThirdPersonPitchDownButton"; + public static readonly string MultiCrewThirdPersonFovOutButton = "MultiCrewThirdPersonFovOutButton"; + public static readonly string MultiCrewThirdPersonFovInButton = "MultiCrewThirdPersonFovInButton"; + public static readonly string MultiCrewCockpitUICycleForward = "MultiCrewCockpitUICycleForward"; + public static readonly string MultiCrewCockpitUICycleBackward = "MultiCrewCockpitUICycleBackward"; + public static readonly string OrderRequestDock = "OrderRequestDock"; + public static readonly string OrderDefensiveBehaviour = "OrderDefensiveBehaviour"; + public static readonly string OrderAggressiveBehaviour = "OrderAggressiveBehaviour"; + public static readonly string OrderFocusTarget = "OrderFocusTarget"; + public static readonly string OrderHoldFire = "OrderHoldFire"; + public static readonly string OrderHoldPosition = "OrderHoldPosition"; + public static readonly string OrderFollow = "OrderFollow"; + public static readonly string OpenOrders = "OpenOrders"; + public static readonly string PhotoCameraToggle = "PhotoCameraToggle"; + public static readonly string PhotoCameraToggle_Buggy = "PhotoCameraToggle_Buggy"; + public static readonly string VanityCameraScrollLeft = "VanityCameraScrollLeft"; + public static readonly string VanityCameraScrollRight = "VanityCameraScrollRight"; + public static readonly string ToggleFreeCam = "ToggleFreeCam"; + public static readonly string VanityCameraOne = "VanityCameraOne"; + public static readonly string VanityCameraTwo = "VanityCameraTwo"; + public static readonly string VanityCameraThree = "VanityCameraThree"; + public static readonly string VanityCameraFour = "VanityCameraFour"; + public static readonly string VanityCameraFive = "VanityCameraFive"; + public static readonly string VanityCameraSix = "VanityCameraSix"; + public static readonly string VanityCameraSeven = "VanityCameraSeven"; + public static readonly string VanityCameraEight = "VanityCameraEight"; + public static readonly string VanityCameraNine = "VanityCameraNine"; + public static readonly string FreeCamToggleHUD = "FreeCamToggleHUD"; + public static readonly string FreeCamSpeedInc = "FreeCamSpeedInc"; + public static readonly string FreeCamSpeedDec = "FreeCamSpeedDec"; + public static readonly string ToggleReverseThrottleInputFreeCam = "ToggleReverseThrottleInputFreeCam"; + public static readonly string MoveFreeCamForward = "MoveFreeCamForward"; + public static readonly string MoveFreeCamBackwards = "MoveFreeCamBackwards"; + public static readonly string MoveFreeCamRight = "MoveFreeCamRight"; + public static readonly string MoveFreeCamLeft = "MoveFreeCamLeft"; + public static readonly string MoveFreeCamUp = "MoveFreeCamUp"; + public static readonly string MoveFreeCamDown = "MoveFreeCamDown"; + public static readonly string PitchCameraUp = "PitchCameraUp"; + public static readonly string PitchCameraDown = "PitchCameraDown"; + public static readonly string YawCameraLeft = "YawCameraLeft"; + public static readonly string YawCameraRight = "YawCameraRight"; + public static readonly string RollCameraLeft = "RollCameraLeft"; + public static readonly string RollCameraRight = "RollCameraRight"; + public static readonly string ToggleRotationLock = "ToggleRotationLock"; + public static readonly string FixCameraRelativeToggle = "FixCameraRelativeToggle"; + public static readonly string FixCameraWorldToggle = "FixCameraWorldToggle"; + public static readonly string QuitCamera = "QuitCamera"; + public static readonly string ToggleAdvanceMode = "ToggleAdvanceMode"; + public static readonly string FreeCamZoomIn = "FreeCamZoomIn"; + public static readonly string FreeCamZoomOut = "FreeCamZoomOut"; + public static readonly string FStopDec = "FStopDec"; + public static readonly string FStopInc = "FStopInc"; + public static readonly string CommanderCreator_Undo = "CommanderCreator_Undo"; + public static readonly string CommanderCreator_Redo = "CommanderCreator_Redo"; + public static readonly string CommanderCreator_Rotation_MouseToggle = "CommanderCreator_Rotation_MouseToggle"; + public static readonly string GalnetAudio_Play_Pause = "GalnetAudio_Play_Pause"; + public static readonly string GalnetAudio_SkipForward = "GalnetAudio_SkipForward"; + public static readonly string GalnetAudio_SkipBackward = "GalnetAudio_SkipBackward"; + public static readonly string GalnetAudio_ClearQueue = "GalnetAudio_ClearQueue"; + public static readonly string ExplorationFSSEnter = "ExplorationFSSEnter"; + public static readonly string ExplorationFSSCameraPitchIncreaseButton = "ExplorationFSSCameraPitchIncreaseButton"; + public static readonly string ExplorationFSSCameraPitchDecreaseButton = "ExplorationFSSCameraPitchDecreaseButton"; + public static readonly string ExplorationFSSCameraYawIncreaseButton = "ExplorationFSSCameraYawIncreaseButton"; + public static readonly string ExplorationFSSCameraYawDecreaseButton = "ExplorationFSSCameraYawDecreaseButton"; + public static readonly string ExplorationFSSZoomIn = "ExplorationFSSZoomIn"; + public static readonly string ExplorationFSSZoomOut = "ExplorationFSSZoomOut"; + public static readonly string ExplorationFSSMiniZoomIn = "ExplorationFSSMiniZoomIn"; + public static readonly string ExplorationFSSMiniZoomOut = "ExplorationFSSMiniZoomOut"; + public static readonly string ExplorationFSSRadioTuningX_Increase = "ExplorationFSSRadioTuningX_Increase"; + public static readonly string ExplorationFSSRadioTuningX_Decrease = "ExplorationFSSRadioTuningX_Decrease"; + public static readonly string ExplorationFSSDiscoveryScan = "ExplorationFSSDiscoveryScan"; + public static readonly string ExplorationFSSQuit = "ExplorationFSSQuit"; + public static readonly string ExplorationFSSTarget = "ExplorationFSSTarget"; + public static readonly string ExplorationFSSShowHelp = "ExplorationFSSShowHelp"; + public static readonly string ExplorationSAAChangeScannedAreaViewToggle = "ExplorationSAAChangeScannedAreaViewToggle"; + public static readonly string ExplorationSAAExitThirdPerson = "ExplorationSAAExitThirdPerson"; + public static readonly string SAAThirdPersonYawLeftButton = "SAAThirdPersonYawLeftButton"; + public static readonly string SAAThirdPersonYawRightButton = "SAAThirdPersonYawRightButton"; + public static readonly string SAAThirdPersonPitchUpButton = "SAAThirdPersonPitchUpButton"; + public static readonly string SAAThirdPersonPitchDownButton = "SAAThirdPersonPitchDownButton"; + public static readonly string SAAThirdPersonFovOutButton = "SAAThirdPersonFovOutButton"; + public static readonly string SAAThirdPersonFovInButton = "SAAThirdPersonFovInButton"; + } + + public static Dictionary eliteKeyToDeviceKey = new Dictionary() + { + {"Key_Escape", DeviceKeys.ESC}, + {"Key_F1", DeviceKeys.F1}, + {"Key_F2", DeviceKeys.F2}, + {"Key_F3", DeviceKeys.F3}, + {"Key_F4", DeviceKeys.F4}, + {"Key_F5", DeviceKeys.F5}, + {"Key_F6", DeviceKeys.F6}, + {"Key_F7", DeviceKeys.F7}, + {"Key_F8", DeviceKeys.F8}, + {"Key_F9", DeviceKeys.F9}, + {"Key_F10", DeviceKeys.F10}, + {"Key_F11", DeviceKeys.F11}, + {"Key_F12", DeviceKeys.F12}, + {"Key_PrintScreen", DeviceKeys.PRINT_SCREEN}, + {"Key_ScrollLock", DeviceKeys.SCROLL_LOCK}, + {"Key_PauseBreak", DeviceKeys.PAUSE_BREAK}, + {"Key_Grave", DeviceKeys.TILDE}, + {"Key_1", DeviceKeys.ONE}, + {"Key_2", DeviceKeys.TWO}, + {"Key_3", DeviceKeys.THREE}, + {"Key_4", DeviceKeys.FOUR}, + {"Key_5", DeviceKeys.FIVE}, + {"Key_6", DeviceKeys.SIX}, + {"Key_7", DeviceKeys.SEVEN}, + {"Key_8", DeviceKeys.EIGHT}, + {"Key_9", DeviceKeys.NINE}, + {"Key_0", DeviceKeys.ZERO}, + {"Key_Minus", DeviceKeys.MINUS}, + {"Key_Equals", DeviceKeys.EQUALS}, + {"Key_Backspace", DeviceKeys.BACKSPACE}, + {"Key_Insert", DeviceKeys.INSERT}, + {"Key_Home", DeviceKeys.HOME}, + {"Key_PageUp", DeviceKeys.PAGE_UP}, + {"Key_Numpad_Lock", DeviceKeys.NUM_LOCK}, + {"Key_Numpad_Divide", DeviceKeys.NUM_SLASH}, + {"Key_Numpad_Multiply", DeviceKeys.NUM_ASTERISK}, + {"Key_Numpad_Subtract", DeviceKeys.NUM_MINUS}, + {"Key_Tab", DeviceKeys.TAB}, + {"Key_Q", DeviceKeys.Q}, + {"Key_W", DeviceKeys.W}, + {"Key_E", DeviceKeys.E}, + {"Key_R", DeviceKeys.R}, + {"Key_T", DeviceKeys.T}, + {"Key_Y", DeviceKeys.Y}, + {"Key_U", DeviceKeys.U}, + {"Key_I", DeviceKeys.I}, + {"Key_O", DeviceKeys.O}, + {"Key_P", DeviceKeys.P}, + {"Key_LeftBracket", DeviceKeys.OPEN_BRACKET}, + {"Key_RightBracket", DeviceKeys.CLOSE_BRACKET}, + {"Key_BackSlash", DeviceKeys.BACKSLASH}, + {"Key_Delete", DeviceKeys.DELETE}, + {"Key_End", DeviceKeys.END}, + {"Key_PageDown", DeviceKeys.PAGE_DOWN}, + {"Key_Numpad_7", DeviceKeys.NUM_SEVEN}, + {"Key_Numpad_8", DeviceKeys.NUM_EIGHT}, + {"Key_Numpad_9", DeviceKeys.NUM_NINE}, + {"Key_Numpad_Add", DeviceKeys.NUM_PLUS}, + {"Key_CapsLock", DeviceKeys.CAPS_LOCK}, + {"Key_A", DeviceKeys.A}, + {"Key_S", DeviceKeys.S}, + {"Key_D", DeviceKeys.D}, + {"Key_F", DeviceKeys.F}, + {"Key_G", DeviceKeys.G}, + {"Key_H", DeviceKeys.H}, + {"Key_J", DeviceKeys.J}, + {"Key_K", DeviceKeys.K}, + {"Key_L", DeviceKeys.L}, + {"Key_SemiColon", DeviceKeys.SEMICOLON}, + {"Key_Apostrophe", DeviceKeys.APOSTROPHE}, + {"Key_Enter", DeviceKeys.ENTER}, + {"Key_Numpad_4", DeviceKeys.NUM_FOUR}, + {"Key_Numpad_5", DeviceKeys.NUM_FIVE}, + {"Key_Numpad_6", DeviceKeys.NUM_SIX}, + {"Key_LeftShift", DeviceKeys.LEFT_SHIFT}, + {"Key_Z", DeviceKeys.Z}, + {"Key_X", DeviceKeys.X}, + {"Key_C", DeviceKeys.C}, + {"Key_V", DeviceKeys.V}, + {"Key_B", DeviceKeys.B}, + {"Key_N", DeviceKeys.N}, + {"Key_M", DeviceKeys.M}, + {"Key_Comma", DeviceKeys.COMMA}, + {"Key_Period", DeviceKeys.PERIOD}, + {"Key_Slash", DeviceKeys.FORWARD_SLASH}, + {"Key_RightShift", DeviceKeys.RIGHT_SHIFT}, + {"Key_UpArrow", DeviceKeys.ARROW_UP}, + {"Key_Numpad_1", DeviceKeys.NUM_ONE}, + {"Key_Numpad_2", DeviceKeys.NUM_TWO}, + {"Key_Numpad_3", DeviceKeys.NUM_THREE}, + {"Key_Numpad_Enter", DeviceKeys.NUM_ENTER}, + {"Key_LeftControl", DeviceKeys.LEFT_CONTROL}, + {"Key_LeftWindows", DeviceKeys.LEFT_WINDOWS}, + {"Key_LeftAlt", DeviceKeys.LEFT_ALT}, + {"Key_Space", DeviceKeys.SPACE}, + {"Key_RightAlt", DeviceKeys.RIGHT_ALT}, + {"Key_RightWindows", DeviceKeys.RIGHT_WINDOWS}, + {"Key_Application_select", DeviceKeys.APPLICATION_SELECT}, + {"Key_RightControl", DeviceKeys.RIGHT_CONTROL}, + {"Key_LeftArrow", DeviceKeys.ARROW_LEFT}, + {"Key_DownArrow", DeviceKeys.ARROW_DOWN}, + {"Key_RightArrow", DeviceKeys.ARROW_RIGHT}, + {"Key_Numpad_0", DeviceKeys.NUM_ZERO}, + {"Key_Numpad_Decimal", DeviceKeys.NUM_PERIOD} + }; + + public class Mapping + { + public DeviceKeys key = DeviceKeys.NONE; + public List modifiers = new List(); + + public void SetKey(string eliteKey) + { + if (Bind.eliteKeyToDeviceKey.ContainsKey(eliteKey)) + { + key = Bind.eliteKeyToDeviceKey[eliteKey]; + } + } + public void AddModifier(string eliteKey) + { + if (Bind.eliteKeyToDeviceKey.ContainsKey(eliteKey)) + { + modifiers.Add(Bind.eliteKeyToDeviceKey[eliteKey]); + } + } + + public bool HasKey() + { + return key != null; + } + } + + private string command; + public HashSet mappings = new HashSet(); + + public Bind(string command) + { + this.command = command; + } + + public void AddMapping(Mapping mapping) + { + mappings.Add(mapping); + } + } + + public class ControlGroup + { + public Color color; + public List commands; + public StatusState neededStatus; + + public ControlGroup(string[] commands) + { + this.commands = commands.ToList(); + } } /// @@ -266,13 +433,32 @@ public class EliteBind /// public class Controls : Node { - public string timestamp; - public string @event; - public long Flags; - public int[] Pips; - public int FireGroup; - public int GuiFocus; - public double Fuel; - public double Cargo; + public HashSet modifierKeys; + public Dictionary commandToBind; + public Dictionary bindToCommand; + +// public static Dictionary groups = new Dictionary() +// { +// {"camera", new ControlGroup(new string[] +// { +// Bind.EliteBindName.PhotoCameraToggle, Bind.EliteBindName.PhotoCameraToggle_Buggy, Bind.EliteBindName.VanityCameraScrollLeft, +// Bind.EliteBindName.VanityCameraScrollRight, Bind.EliteBindName.ToggleFreeCam, Bind.EliteBindName.FreeCamToggleHUD, +// Bind.EliteBindName.FixCameraRelativeToggle, Bind.EliteBindName.FixCameraWorldToggle +// })}, +// {"movement_speed", new ControlGroup(new string[] +// { +// Bind.EliteBindName.ForwardKey, Bind.EliteBindName.BackwardKey, Bind.EliteBindName.IncreaseEnginesPower, Bind.EliteBindName.SetSpeedZero, +// Bind.EliteBindName.SetSpeed25, Bind.EliteBindName.SetSpeed50, Bind.EliteBindName.SetSpeed75, Bind.EliteBindName.SetSpeed100 +// })}, +// {"movement_speed2", new ControlGroup(new string[] +// { +// Bind.EliteBindName.SetSpeedMinus100, Bind.EliteBindName.SetSpeedMinus75, Bind.EliteBindName.SetSpeedMinus50, +// Bind.EliteBindName.SetSpeedMinus25, Bind.EliteBindName.AutoBreakBuggyButton +// })}, +// {"movement_speed3", new ControlGroup(new string[] +// { +// Bind.EliteBindName.OrderHoldPosition +// })}, +// }; } } \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs index a141f4614..08c2b46d7 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs @@ -1,6 +1,10 @@ using System; +using System.Collections.Generic; using System.IO; +using System.Linq; using System.Xml; +using Aurora.Profiles.EliteDangerous.GSI; +using Aurora.Profiles.EliteDangerous.GSI.Nodes; namespace Aurora.Profiles.EliteDangerous { @@ -82,27 +86,64 @@ private void ParseBindFile() { //TODO: Parse configuration XML Global.logger.Error("Current bind file: " + currentBindFile); + + HashSet modifierKeys = new HashSet(); + + Dictionary commandToBind = new Dictionary(); + Dictionary bindToCommand = new Dictionary(); + XmlDocument doc = new XmlDocument(); try { doc.Load(currentBindFile); - XmlNodeList binds = doc.DocumentElement.ChildNodes; - foreach(XmlNode bind in binds) + XmlNodeList commands = doc.DocumentElement.ChildNodes; + foreach(XmlNode command in commands) { - foreach (XmlNode mapping in bind.ChildNodes) + Bind bind = new Bind(command.Name); + foreach (XmlNode xmlMapping in command.ChildNodes) { - if(mapping.Name == "Primary" || mapping.Name == "Secondary") { - // This is a bind - Global.logger.Error(bind.Name + " " + mapping.Name + ": " + mapping.Attributes["Device"].Value + " " + mapping.Attributes["Key"].Value); + if (xmlMapping.Name != "Primary" && xmlMapping.Name != "Secondary") continue; + + Bind.Mapping mapping = new Bind.Mapping(); + + if (xmlMapping.Attributes["Device"].Value == "Keyboard") + { + mapping.SetKey(xmlMapping.Attributes["Key"].Value); + } + + foreach (XmlNode property in xmlMapping.ChildNodes) + { + if (property.Name != "Modifier") continue; + + if (property.Attributes["Device"].Value == "Keyboard" && !string.IsNullOrEmpty(property.Attributes["Key"].Value)) + { + modifierKeys.Add(property.Attributes["Key"].Value); + mapping.AddModifier(property.Attributes["Key"].Value); + } + } + + if (mapping.HasKey()) + { + bind.AddMapping(mapping); } } - } + if (bind.mappings.Any()) + { + commandToBind.Add(command.Name, bind); + bindToCommand.Add(bind, command.Name); + } + } } catch (System.IO.FileNotFoundException) { Global.logger.Error("Error loading binds file: " + currentBindFile); } + + GSI.Nodes.Controls controls = (_game_state as GameState_EliteDangerous).Controls; + controls.modifierKeys = modifierKeys; + controls.commandToBind = commandToBind; + controls.bindToCommand = bindToCommand; } public override void OnStart() diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs index fc9153aaa..7dec88f57 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -1,9 +1,12 @@ using System; +using System.Collections.Generic; using Aurora.EffectsEngine; using Aurora.Settings.Layers; using System.Drawing; using System.Windows.Controls; using Aurora.Devices; +using Aurora.Profiles.EliteDangerous.GSI; +using Aurora.Profiles.EliteDangerous.GSI.Nodes; using CSScriptLibrary; namespace Aurora.Profiles.EliteDangerous.Layers @@ -133,10 +136,54 @@ public override EffectLayer Render(IGameState state) { EffectLayer keyBindsLayer = new EffectLayer("Elite: Dangerous - Key Binds"); - keyBindsLayer.Set(DeviceKeys.C, this.Properties.ShipStuffColor); - keyBindsLayer.Set(DeviceKeys.V, this.Properties.DefenceColor); - keyBindsLayer.Set(DeviceKeys.B, this.Properties.DefenceDimmedColor); - keyBindsLayer.Set(DeviceKeys.A, GetBlinkingColor(Properties.ShipStuffColor)); + Dictionary groups = new Dictionary() + { + {"camera", new ControlGroup(new string[] + { + Bind.EliteBindName.PhotoCameraToggle, Bind.EliteBindName.PhotoCameraToggle_Buggy, Bind.EliteBindName.VanityCameraScrollLeft, + Bind.EliteBindName.VanityCameraScrollRight, Bind.EliteBindName.ToggleFreeCam, Bind.EliteBindName.FreeCamToggleHUD, + Bind.EliteBindName.FixCameraRelativeToggle, Bind.EliteBindName.FixCameraWorldToggle + })}, + {"movement_speed", new ControlGroup(new string[] + { + Bind.EliteBindName.ForwardKey, Bind.EliteBindName.BackwardKey, Bind.EliteBindName.IncreaseEnginesPower, Bind.EliteBindName.SetSpeedZero, + Bind.EliteBindName.SetSpeed25, Bind.EliteBindName.SetSpeed50, Bind.EliteBindName.SetSpeed75, Bind.EliteBindName.SetSpeed100 + })}, + {"movement_speed2", new ControlGroup(new string[] + { + Bind.EliteBindName.SetSpeedMinus100, Bind.EliteBindName.SetSpeedMinus75, Bind.EliteBindName.SetSpeedMinus50, + Bind.EliteBindName.SetSpeedMinus25, Bind.EliteBindName.AutoBreakBuggyButton + })}, + {"movement_speed3", new ControlGroup(new string[] + { + Bind.EliteBindName.OrderHoldPosition + })}, + }; + + groups["camera"].color = this.Properties.CameraColor; + groups["movement_speed"].color = this.Properties.MovementSpeedColor; + groups["movement_speed2"].color = this.Properties.MovementSpeedColor; + groups["movement_speed3"].color = this.Properties.MovementSpeedColor; + + GSI.Nodes.Controls controls = (state as GameState_EliteDangerous).Controls; + foreach(KeyValuePair entry in controls.commandToBind) + { + foreach (KeyValuePair group in groups) + { + if (group.Value.commands.Contains(entry.Key)) + { + foreach (Bind.Mapping mapping in entry.Value.mappings) + { + keyBindsLayer.Set(mapping.key, group.Value.color); + } + } + } + } + +// keyBindsLayer.Set(DeviceKeys.C, this.Properties.ShipStuffColor); +// keyBindsLayer.Set(DeviceKeys.V, this.Properties.DefenceColor); +// keyBindsLayer.Set(DeviceKeys.B, this.Properties.DefenceDimmedColor); +// keyBindsLayer.Set(DeviceKeys.A, GetBlinkingColor(Properties.ShipStuffColor)); return keyBindsLayer; } From 954272d6f1c00d212c6d0f2daf79fe7251bca62a Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Mon, 26 Aug 2019 00:46:32 +0300 Subject: [PATCH 012/445] Fixed a crash when reading file after it was changed --- .../GameEvent_EliteDangerous.cs | 43 +++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs index 08c2b46d7..6cce39675 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Timers; using System.Xml; using Aurora.Profiles.EliteDangerous.GSI; using Aurora.Profiles.EliteDangerous.GSI.Nodes; @@ -10,6 +11,7 @@ namespace Aurora.Profiles.EliteDangerous { public class GameEvent_EliteDangerous : GameEvent_Generic { + readonly DelayedMethodCaller delayedFileRead = new DelayedMethodCaller(1); private static readonly string journalFolder = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), @@ -57,12 +59,45 @@ public void StopWatchingBindFiles() } } + public class DelayedMethodCaller + { + int _delay; + Timer _timer = new Timer(); + + public DelayedMethodCaller(int delay) + { + _delay = delay; + } + + public void CallMethod(Action action) + { + if (!_timer.Enabled) + { + _timer = new Timer(_delay) + { + AutoReset = false + }; + _timer.Elapsed += (object sender, ElapsedEventArgs e) => + { + action(); + }; + _timer.Start(); + } + else + { + _timer.Stop(); + _timer.Start(); + } + } + } + private void OnBindsFileChanged(object sender, FileSystemEventArgs e) { - // This is a fix for multiple change events being triggered - if (bindWatcher != null) bindWatcher.EnableRaisingEvents = false; - ReadBindFiles(); - if (bindWatcher != null) bindWatcher.EnableRaisingEvents = true; + /* + * This event can fire multiple times in a row. We need to make sure to read the file only after + * the last event is fired to avoid running into a locked file + */ + delayedFileRead.CallMethod(() => ReadBindFiles()); } private void ReadBindFiles() From 5cd7dd4425b104b1d425a5a2efe099aa476cf94b Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Mon, 26 Aug 2019 19:25:38 +0300 Subject: [PATCH 013/445] Improved color groups - working on making color groups depend on the game status --- .../GSI/GameState_EliteDangerous.cs | 14 ++- .../EliteDangerous/GSI/Nodes/Controls.cs | 47 +++++----- .../EliteDangerous/GSI/Nodes/Journal.cs | 15 +++ .../EliteDangerous/GSI/Nodes/Status.cs | 23 ++++- .../EliteDangerousKeyBindsLayerHandler.cs | 92 ++++++++++++------- .../Project-Aurora/Project-Aurora.csproj | 1 + 6 files changed, 131 insertions(+), 61 deletions(-) create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Journal.cs diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs index 00e50557c..b68b0da8b 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs @@ -2,11 +2,23 @@ namespace Aurora.Profiles.EliteDangerous.GSI { - class GameState_EliteDangerous : GameState + public class GameState_EliteDangerous : GameState { private Status status; + private Journal journal; private Nodes.Controls controls; + public Journal Journal + { + get + { + if (journal == null) + journal = new Journal(); + + return journal; + } + } + public Status Status { get diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs index 182a06ca4..9038ddaac 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs @@ -418,13 +418,32 @@ public void AddMapping(Mapping mapping) public class ControlGroup { + public string colorGroupName; public Color color; public List commands; - public StatusState neededStatus; + public StatusState neededStatusState; - public ControlGroup(string[] commands) + public ControlGroup(string colorGroupName, string[] commands) : this(colorGroupName, commands, null) { } + + public ControlGroup(string colorGroupName, string[] commands, StatusState neededStatusState) { + this.colorGroupName = colorGroupName; this.commands = commands.ToList(); + this.neededStatusState = neededStatusState; + } + + public bool ConditionSatisfied(Status status) + { + return ConditionSatisfied(status.Flags, status.GuiFocus); + } + public bool ConditionSatisfied(long flags, int guiFocus) + { + if (neededStatusState != null) + { + return neededStatusState.ConditionSatisfied(flags, guiFocus); + } + + return true; } } @@ -436,29 +455,5 @@ public class Controls : Node public HashSet modifierKeys; public Dictionary commandToBind; public Dictionary bindToCommand; - -// public static Dictionary groups = new Dictionary() -// { -// {"camera", new ControlGroup(new string[] -// { -// Bind.EliteBindName.PhotoCameraToggle, Bind.EliteBindName.PhotoCameraToggle_Buggy, Bind.EliteBindName.VanityCameraScrollLeft, -// Bind.EliteBindName.VanityCameraScrollRight, Bind.EliteBindName.ToggleFreeCam, Bind.EliteBindName.FreeCamToggleHUD, -// Bind.EliteBindName.FixCameraRelativeToggle, Bind.EliteBindName.FixCameraWorldToggle -// })}, -// {"movement_speed", new ControlGroup(new string[] -// { -// Bind.EliteBindName.ForwardKey, Bind.EliteBindName.BackwardKey, Bind.EliteBindName.IncreaseEnginesPower, Bind.EliteBindName.SetSpeedZero, -// Bind.EliteBindName.SetSpeed25, Bind.EliteBindName.SetSpeed50, Bind.EliteBindName.SetSpeed75, Bind.EliteBindName.SetSpeed100 -// })}, -// {"movement_speed2", new ControlGroup(new string[] -// { -// Bind.EliteBindName.SetSpeedMinus100, Bind.EliteBindName.SetSpeedMinus75, Bind.EliteBindName.SetSpeedMinus50, -// Bind.EliteBindName.SetSpeedMinus25, Bind.EliteBindName.AutoBreakBuggyButton -// })}, -// {"movement_speed3", new ControlGroup(new string[] -// { -// Bind.EliteBindName.OrderHoldPosition -// })}, -// }; } } \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Journal.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Journal.cs new file mode 100644 index 000000000..2ddd4a13e --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Journal.cs @@ -0,0 +1,15 @@ +namespace Aurora.Profiles.EliteDangerous.GSI.Nodes +{ + public enum FighterStatus + { + None, Launched, Unmanned + } + + public class Journal : Node + { + public FighterStatus fighterStatus = FighterStatus.None; + public bool hasChaff = false; + public bool hasHeatSink = false; + public bool hasShieldCellBank = false; + } +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs index 8af14a720..48c154df5 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs @@ -1,4 +1,6 @@ -namespace Aurora.Profiles.EliteDangerous.GSI.Nodes +using System; + +namespace Aurora.Profiles.EliteDangerous.GSI.Nodes { public class StatusState @@ -6,15 +8,29 @@ public class StatusState long flagsSet = -1; long flagsNotSet = -1; int guiFocus = -1; - - public StatusState(long flagsSet, int guiFocus, long flagsNotSet) + private Func conditionCallback = null; + + public StatusState(long flagsSet, long flagsNotSet) : this(flagsSet, -1, flagsNotSet, null) {} + public StatusState(long flagsSet, int guiFocus, long flagsNotSet, Func conditionCallback) { this.flagsSet = flagsSet; this.guiFocus = guiFocus; this.flagsNotSet = flagsNotSet; + this.conditionCallback = conditionCallback; + } + public StatusState(Func conditionCallback) + { + this.conditionCallback = conditionCallback; } + public bool ConditionSatisfied(Status status) + { + return ConditionSatisfied(status.Flags, status.GuiFocus); + } public bool ConditionSatisfied(long flags, int guiFocus) { + if(conditionCallback != null && !conditionCallback()) { + return false; + } if(this.guiFocus != -1 && this.guiFocus != guiFocus) { return false; } @@ -31,6 +47,7 @@ public bool ConditionSatisfied(long flags, int guiFocus) { public static class Flag { + public static readonly int NONE = -1; public static readonly int DOCKED = 1; public static readonly int LANDED_PLANET = 1 << 1; public static readonly int LANDING_GEAR = 1 << 2; diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs index 7dec88f57..228d7bd0c 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -69,7 +69,7 @@ public class EliteDangerousKeyBindsHandlerProperties : LayerHandlerProperties2Co public Color? _ModeDisableColor { get; set; } public Color ModeDisableColor { get { return Logic._ModeDisableColor ?? _ModeDisableColor ?? Color.Empty; } } - + public EliteDangerousKeyBindsHandlerProperties() : base() { } public EliteDangerousKeyBindsHandlerProperties(bool assign_default = false) : base(assign_default) { } @@ -97,10 +97,63 @@ public override void Default() this._ModeEnableColor = Color.FromArgb(153, 167, 255); this._ModeDisableColor = Color.FromArgb(61, 88, 156); } + + public Color GetColorByVariableName(string colorVariableName) { + switch (@colorVariableName) + { + case "HudModeCombatColor": return HudModeCombatColor; + case "HudModeDiscoveryColor": return HudModeDiscoveryColor; + case "NoneColor": return NoneColor; + case "OtherColor": return OtherColor; + case "UiColor": return UiColor; + case "UiAltColor": return UiAltColor; + case "ShipStuffColor": return ShipStuffColor; + case "CameraColor": return CameraColor; + case "DefenceColor": return DefenceColor; + case "DefenceDimmedColor": return DefenceDimmedColor; + case "OffenceColor": return OffenceColor; + case "OffenceDimmedColor": return OffenceDimmedColor; + case "MovementSpeedColor": return MovementSpeedColor; + case "MovementSpeedDimmedColor": return MovementSpeedDimmedColor; + case "MovementSecondaryColor": return MovementSecondaryColor; + case "WingColor": return WingColor; + case "NavigationColor": return NavigationColor; + case "ModeEnableColor": return ModeEnableColor; + case "ModeDisableColor": return ModeDisableColor; + } + + return NoneColor; + } } + public class EliteDangerousKeyBindsLayerHandler : LayerHandler { private int blinkSpeed = 20; + public static GameState_EliteDangerous gameState = null; + + private ControlGroup[] commandGroups = { + new ControlGroup("CameraColor", new [] { + Bind.EliteBindName.PhotoCameraToggle, Bind.EliteBindName.PhotoCameraToggle_Buggy, Bind.EliteBindName.VanityCameraScrollLeft, + Bind.EliteBindName.VanityCameraScrollRight, Bind.EliteBindName.ToggleFreeCam, Bind.EliteBindName.FreeCamToggleHUD, + Bind.EliteBindName.FixCameraRelativeToggle, Bind.EliteBindName.FixCameraWorldToggle + }), + new ControlGroup("MovementSpeedColor", new [] { + Bind.EliteBindName.ForwardKey, Bind.EliteBindName.BackwardKey, Bind.EliteBindName.IncreaseEnginesPower, Bind.EliteBindName.SetSpeedZero, + Bind.EliteBindName.SetSpeed25, Bind.EliteBindName.SetSpeed50, Bind.EliteBindName.SetSpeed75, Bind.EliteBindName.SetSpeed100 + }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET)), + new ControlGroup("MovementSpeedColor", new [] { + Bind.EliteBindName.SetSpeedMinus100, Bind.EliteBindName.SetSpeedMinus75, Bind.EliteBindName.SetSpeedMinus50, + Bind.EliteBindName.SetSpeedMinus25, Bind.EliteBindName.AutoBreakBuggyButton + }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE)), + new ControlGroup("MovementSpeedColor", new [] { + Bind.EliteBindName.OrderHoldPosition + }, new StatusState(() => + { + if(gameState != null) return gameState.Journal.fighterStatus != FighterStatus.None; + return false; + })) + }; + public EliteDangerousKeyBindsLayerHandler() : base() { _ID = "EliteDangerousKeyBinds"; @@ -134,47 +187,24 @@ private Color GetBlinkingColor(Color baseColor) public override EffectLayer Render(IGameState state) { + gameState = state as GameState_EliteDangerous; EffectLayer keyBindsLayer = new EffectLayer("Elite: Dangerous - Key Binds"); - Dictionary groups = new Dictionary() + foreach (ControlGroup group in commandGroups) { - {"camera", new ControlGroup(new string[] - { - Bind.EliteBindName.PhotoCameraToggle, Bind.EliteBindName.PhotoCameraToggle_Buggy, Bind.EliteBindName.VanityCameraScrollLeft, - Bind.EliteBindName.VanityCameraScrollRight, Bind.EliteBindName.ToggleFreeCam, Bind.EliteBindName.FreeCamToggleHUD, - Bind.EliteBindName.FixCameraRelativeToggle, Bind.EliteBindName.FixCameraWorldToggle - })}, - {"movement_speed", new ControlGroup(new string[] - { - Bind.EliteBindName.ForwardKey, Bind.EliteBindName.BackwardKey, Bind.EliteBindName.IncreaseEnginesPower, Bind.EliteBindName.SetSpeedZero, - Bind.EliteBindName.SetSpeed25, Bind.EliteBindName.SetSpeed50, Bind.EliteBindName.SetSpeed75, Bind.EliteBindName.SetSpeed100 - })}, - {"movement_speed2", new ControlGroup(new string[] - { - Bind.EliteBindName.SetSpeedMinus100, Bind.EliteBindName.SetSpeedMinus75, Bind.EliteBindName.SetSpeedMinus50, - Bind.EliteBindName.SetSpeedMinus25, Bind.EliteBindName.AutoBreakBuggyButton - })}, - {"movement_speed3", new ControlGroup(new string[] - { - Bind.EliteBindName.OrderHoldPosition - })}, - }; - - groups["camera"].color = this.Properties.CameraColor; - groups["movement_speed"].color = this.Properties.MovementSpeedColor; - groups["movement_speed2"].color = this.Properties.MovementSpeedColor; - groups["movement_speed3"].color = this.Properties.MovementSpeedColor; + group.color = Properties.GetColorByVariableName(group.colorGroupName); + } GSI.Nodes.Controls controls = (state as GameState_EliteDangerous).Controls; foreach(KeyValuePair entry in controls.commandToBind) { - foreach (KeyValuePair group in groups) + foreach (ControlGroup group in commandGroups) { - if (group.Value.commands.Contains(entry.Key)) + if (group.ConditionSatisfied(gameState.Status) && group.commands.Contains(entry.Key)) { foreach (Bind.Mapping mapping in entry.Value.mappings) { - keyBindsLayer.Set(mapping.key, group.Value.color); + keyBindsLayer.Set(mapping.key, group.color); } } } diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj index d71ddd7af..30412bbe9 100755 --- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj +++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj @@ -459,6 +459,7 @@ + Control_EliteDangerousBackgroundLayer.xaml From 6ccdbbf3fb93f53f15f215f297c66b32388037bc Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Mon, 26 Aug 2019 23:18:06 +0300 Subject: [PATCH 014/445] Implemented game status parsing - implemented a file reader - implemented more color groups - implemented blinking keys --- .../EliteDangerousApplication.cs | 2 +- .../EliteDangerous/GSI/Nodes/Controls.cs | 543 +++++++++--------- .../EliteDangerous/GSI/Nodes/Status.cs | 112 ++-- .../GameEvent_EliteDangerous.cs | 75 +-- .../EliteDangerous/Helpers/FileWatcher.cs | 101 ++++ .../EliteDangerous/Helpers/TimerHelpers.cs | 37 ++ .../EliteDangerousKeyBindsLayerHandler.cs | 471 +++++++++++---- .../Project-Aurora/Project-Aurora.csproj | 2 + 8 files changed, 902 insertions(+), 441 deletions(-) create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Helpers/FileWatcher.cs create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Helpers/TimerHelpers.cs diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs index c772ae41f..b0d2258b2 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/EliteDangerousApplication.cs @@ -11,7 +11,7 @@ public EliteDangerous() { Name = "Elite: Dangerous", ID = "EliteDangerous", - ProcessNames = new[] { "EliteDangerous64.exe" }, + ProcessNames = new[] { "EliteDangerous64.exe", "sublime_text.exe" }, SettingsType = typeof(FirstTimeApplicationSettings), ProfileType = typeof(EliteDangerousProfile), OverviewControlType = typeof(Control_EliteDangerous), diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs index 9038ddaac..c2760dadc 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs @@ -6,268 +6,275 @@ namespace Aurora.Profiles.EliteDangerous.GSI.Nodes { + public static class Command + { + public static readonly string MouseReset = "MouseReset"; + public static readonly string YawLeftButton = "YawLeftButton"; + public static readonly string YawRightButton = "YawRightButton"; + public static readonly string YawToRollButton = "YawToRollButton"; + public static readonly string RollLeftButton = "RollLeftButton"; + public static readonly string RollRightButton = "RollRightButton"; + public static readonly string PitchUpButton = "PitchUpButton"; + public static readonly string PitchDownButton = "PitchDownButton"; + public static readonly string LeftThrustButton = "LeftThrustButton"; + public static readonly string RightThrustButton = "RightThrustButton"; + public static readonly string UpThrustButton = "UpThrustButton"; + public static readonly string DownThrustButton = "DownThrustButton"; + public static readonly string ForwardThrustButton = "ForwardThrustButton"; + public static readonly string BackwardThrustButton = "BackwardThrustButton"; + public static readonly string UseAlternateFlightValuesToggle = "UseAlternateFlightValuesToggle"; + public static readonly string ToggleReverseThrottleInput = "ToggleReverseThrottleInput"; + public static readonly string ForwardKey = "ForwardKey"; + public static readonly string BackwardKey = "BackwardKey"; + public static readonly string SetSpeedMinus100 = "SetSpeedMinus100"; + public static readonly string SetSpeedMinus75 = "SetSpeedMinus75"; + public static readonly string SetSpeedMinus50 = "SetSpeedMinus50"; + public static readonly string SetSpeedMinus25 = "SetSpeedMinus25"; + public static readonly string SetSpeedZero = "SetSpeedZero"; + public static readonly string SetSpeed25 = "SetSpeed25"; + public static readonly string SetSpeed50 = "SetSpeed50"; + public static readonly string SetSpeed75 = "SetSpeed75"; + public static readonly string SetSpeed100 = "SetSpeed100"; + public static readonly string YawLeftButton_Landing = "YawLeftButton_Landing"; + public static readonly string YawRightButton_Landing = "YawRightButton_Landing"; + public static readonly string PitchUpButton_Landing = "PitchUpButton_Landing"; + public static readonly string PitchDownButton_Landing = "PitchDownButton_Landing"; + public static readonly string RollLeftButton_Landing = "RollLeftButton_Landing"; + public static readonly string RollRightButton_Landing = "RollRightButton_Landing"; + public static readonly string LeftThrustButton_Landing = "LeftThrustButton_Landing"; + public static readonly string RightThrustButton_Landing = "RightThrustButton_Landing"; + public static readonly string UpThrustButton_Landing = "UpThrustButton_Landing"; + public static readonly string DownThrustButton_Landing = "DownThrustButton_Landing"; + public static readonly string ForwardThrustButton_Landing = "ForwardThrustButton_Landing"; + public static readonly string BackwardThrustButton_Landing = "BackwardThrustButton_Landing"; + public static readonly string ToggleFlightAssist = "ToggleFlightAssist"; + public static readonly string UseBoostJuice = "UseBoostJuice"; + public static readonly string HyperSuperCombination = "HyperSuperCombination"; + public static readonly string Supercruise = "Supercruise"; + public static readonly string Hyperspace = "Hyperspace"; + public static readonly string DisableRotationCorrectToggle = "DisableRotationCorrectToggle"; + public static readonly string OrbitLinesToggle = "OrbitLinesToggle"; + public static readonly string SelectTarget = "SelectTarget"; + public static readonly string CycleNextTarget = "CycleNextTarget"; + public static readonly string CyclePreviousTarget = "CyclePreviousTarget"; + public static readonly string SelectHighestThreat = "SelectHighestThreat"; + public static readonly string CycleNextHostileTarget = "CycleNextHostileTarget"; + public static readonly string CyclePreviousHostileTarget = "CyclePreviousHostileTarget"; + public static readonly string TargetWingman0 = "TargetWingman0"; + public static readonly string TargetWingman1 = "TargetWingman1"; + public static readonly string TargetWingman2 = "TargetWingman2"; + public static readonly string SelectTargetsTarget = "SelectTargetsTarget"; + public static readonly string WingNavLock = "WingNavLock"; + public static readonly string CycleNextSubsystem = "CycleNextSubsystem"; + public static readonly string CyclePreviousSubsystem = "CyclePreviousSubsystem"; + public static readonly string TargetNextRouteSystem = "TargetNextRouteSystem"; + public static readonly string PrimaryFire = "PrimaryFire"; + public static readonly string SecondaryFire = "SecondaryFire"; + public static readonly string CycleFireGroupNext = "CycleFireGroupNext"; + public static readonly string CycleFireGroupPrevious = "CycleFireGroupPrevious"; + public static readonly string DeployHardpointToggle = "DeployHardpointToggle"; + public static readonly string ToggleButtonUpInput = "ToggleButtonUpInput"; + public static readonly string DeployHeatSink = "DeployHeatSink"; + public static readonly string ShipSpotLightToggle = "ShipSpotLightToggle"; + public static readonly string RadarIncreaseRange = "RadarIncreaseRange"; + public static readonly string RadarDecreaseRange = "RadarDecreaseRange"; + public static readonly string IncreaseEnginesPower = "IncreaseEnginesPower"; + public static readonly string IncreaseWeaponsPower = "IncreaseWeaponsPower"; + public static readonly string IncreaseSystemsPower = "IncreaseSystemsPower"; + public static readonly string ResetPowerDistribution = "ResetPowerDistribution"; + public static readonly string HMDReset = "HMDReset"; + public static readonly string ToggleCargoScoop = "ToggleCargoScoop"; + public static readonly string EjectAllCargo = "EjectAllCargo"; + public static readonly string LandingGearToggle = "LandingGearToggle"; + public static readonly string MicrophoneMute = "MicrophoneMute"; + public static readonly string UseShieldCell = "UseShieldCell"; + public static readonly string FireChaffLauncher = "FireChaffLauncher"; + public static readonly string ChargeECM = "ChargeECM"; + public static readonly string WeaponColourToggle = "WeaponColourToggle"; + public static readonly string EngineColourToggle = "EngineColourToggle"; + public static readonly string NightVisionToggle = "NightVisionToggle"; + public static readonly string UIFocus = "UIFocus"; + public static readonly string FocusLeftPanel = "FocusLeftPanel"; + public static readonly string FocusCommsPanel = "FocusCommsPanel"; + public static readonly string QuickCommsPanel = "QuickCommsPanel"; + public static readonly string FocusRadarPanel = "FocusRadarPanel"; + public static readonly string FocusRightPanel = "FocusRightPanel"; + public static readonly string GalaxyMapOpen = "GalaxyMapOpen"; + public static readonly string SystemMapOpen = "SystemMapOpen"; + public static readonly string ShowPGScoreSummaryInput = "ShowPGScoreSummaryInput"; + public static readonly string HeadLookToggle = "HeadLookToggle"; + public static readonly string Pause = "Pause"; + public static readonly string FriendsMenu = "FriendsMenu"; + public static readonly string OpenCodexGoToDiscovery = "OpenCodexGoToDiscovery"; + public static readonly string PlayerHUDModeToggle = "PlayerHUDModeToggle"; + public static readonly string UI_Up = "UI_Up"; + public static readonly string UI_Down = "UI_Down"; + public static readonly string UI_Left = "UI_Left"; + public static readonly string UI_Right = "UI_Right"; + public static readonly string UI_Select = "UI_Select"; + public static readonly string UI_Back = "UI_Back"; + public static readonly string UI_Toggle = "UI_Toggle"; + public static readonly string CycleNextPanel = "CycleNextPanel"; + public static readonly string CyclePreviousPanel = "CyclePreviousPanel"; + public static readonly string CycleNextPage = "CycleNextPage"; + public static readonly string CyclePreviousPage = "CyclePreviousPage"; + public static readonly string HeadLookReset = "HeadLookReset"; + public static readonly string HeadLookPitchUp = "HeadLookPitchUp"; + public static readonly string HeadLookPitchDown = "HeadLookPitchDown"; + public static readonly string HeadLookYawLeft = "HeadLookYawLeft"; + public static readonly string HeadLookYawRight = "HeadLookYawRight"; + public static readonly string CamPitchUp = "CamPitchUp"; + public static readonly string CamPitchDown = "CamPitchDown"; + public static readonly string CamYawLeft = "CamYawLeft"; + public static readonly string CamYawRight = "CamYawRight"; + public static readonly string CamTranslateForward = "CamTranslateForward"; + public static readonly string CamTranslateBackward = "CamTranslateBackward"; + public static readonly string CamTranslateLeft = "CamTranslateLeft"; + public static readonly string CamTranslateRight = "CamTranslateRight"; + public static readonly string CamTranslateUp = "CamTranslateUp"; + public static readonly string CamTranslateDown = "CamTranslateDown"; + public static readonly string CamZoomIn = "CamZoomIn"; + public static readonly string CamZoomOut = "CamZoomOut"; + public static readonly string CamTranslateZHold = "CamTranslateZHold"; + public static readonly string ToggleDriveAssist = "ToggleDriveAssist"; + public static readonly string SteerLeftButton = "SteerLeftButton"; + public static readonly string SteerRightButton = "SteerRightButton"; + public static readonly string BuggyRollLeftButton = "BuggyRollLeftButton"; + public static readonly string BuggyRollRightButton = "BuggyRollRightButton"; + public static readonly string BuggyPitchUpButton = "BuggyPitchUpButton"; + public static readonly string BuggyPitchDownButton = "BuggyPitchDownButton"; + public static readonly string VerticalThrustersButton = "VerticalThrustersButton"; + public static readonly string BuggyPrimaryFireButton = "BuggyPrimaryFireButton"; + public static readonly string BuggySecondaryFireButton = "BuggySecondaryFireButton"; + public static readonly string AutoBreakBuggyButton = "AutoBreakBuggyButton"; + public static readonly string HeadlightsBuggyButton = "HeadlightsBuggyButton"; + public static readonly string ToggleBuggyTurretButton = "ToggleBuggyTurretButton"; + public static readonly string SelectTarget_Buggy = "SelectTarget_Buggy"; + public static readonly string BuggyTurretYawLeftButton = "BuggyTurretYawLeftButton"; + public static readonly string BuggyTurretYawRightButton = "BuggyTurretYawRightButton"; + public static readonly string BuggyTurretPitchUpButton = "BuggyTurretPitchUpButton"; + public static readonly string BuggyTurretPitchDownButton = "BuggyTurretPitchDownButton"; + public static readonly string BuggyToggleReverseThrottleInput = "BuggyToggleReverseThrottleInput"; + public static readonly string IncreaseSpeedButtonMax = "IncreaseSpeedButtonMax"; + public static readonly string DecreaseSpeedButtonMax = "DecreaseSpeedButtonMax"; + public static readonly string IncreaseEnginesPower_Buggy = "IncreaseEnginesPower_Buggy"; + public static readonly string IncreaseWeaponsPower_Buggy = "IncreaseWeaponsPower_Buggy"; + public static readonly string IncreaseSystemsPower_Buggy = "IncreaseSystemsPower_Buggy"; + public static readonly string ResetPowerDistribution_Buggy = "ResetPowerDistribution_Buggy"; + public static readonly string ToggleCargoScoop_Buggy = "ToggleCargoScoop_Buggy"; + public static readonly string EjectAllCargo_Buggy = "EjectAllCargo_Buggy"; + public static readonly string RecallDismissShip = "RecallDismissShip"; + public static readonly string UIFocus_Buggy = "UIFocus_Buggy"; + public static readonly string FocusLeftPanel_Buggy = "FocusLeftPanel_Buggy"; + public static readonly string FocusCommsPanel_Buggy = "FocusCommsPanel_Buggy"; + public static readonly string QuickCommsPanel_Buggy = "QuickCommsPanel_Buggy"; + public static readonly string FocusRadarPanel_Buggy = "FocusRadarPanel_Buggy"; + public static readonly string FocusRightPanel_Buggy = "FocusRightPanel_Buggy"; + public static readonly string GalaxyMapOpen_Buggy = "GalaxyMapOpen_Buggy"; + public static readonly string SystemMapOpen_Buggy = "SystemMapOpen_Buggy"; + public static readonly string HeadLookToggle_Buggy = "HeadLookToggle_Buggy"; + public static readonly string MultiCrewToggleMode = "MultiCrewToggleMode"; + public static readonly string MultiCrewPrimaryFire = "MultiCrewPrimaryFire"; + public static readonly string MultiCrewSecondaryFire = "MultiCrewSecondaryFire"; + public static readonly string MultiCrewPrimaryUtilityFire = "MultiCrewPrimaryUtilityFire"; + public static readonly string MultiCrewSecondaryUtilityFire = "MultiCrewSecondaryUtilityFire"; + public static readonly string MultiCrewThirdPersonYawLeftButton = "MultiCrewThirdPersonYawLeftButton"; + public static readonly string MultiCrewThirdPersonYawRightButton = "MultiCrewThirdPersonYawRightButton"; + public static readonly string MultiCrewThirdPersonPitchUpButton = "MultiCrewThirdPersonPitchUpButton"; + public static readonly string MultiCrewThirdPersonPitchDownButton = "MultiCrewThirdPersonPitchDownButton"; + public static readonly string MultiCrewThirdPersonFovOutButton = "MultiCrewThirdPersonFovOutButton"; + public static readonly string MultiCrewThirdPersonFovInButton = "MultiCrewThirdPersonFovInButton"; + public static readonly string MultiCrewCockpitUICycleForward = "MultiCrewCockpitUICycleForward"; + public static readonly string MultiCrewCockpitUICycleBackward = "MultiCrewCockpitUICycleBackward"; + public static readonly string OrderRequestDock = "OrderRequestDock"; + public static readonly string OrderDefensiveBehaviour = "OrderDefensiveBehaviour"; + public static readonly string OrderAggressiveBehaviour = "OrderAggressiveBehaviour"; + public static readonly string OrderFocusTarget = "OrderFocusTarget"; + public static readonly string OrderHoldFire = "OrderHoldFire"; + public static readonly string OrderHoldPosition = "OrderHoldPosition"; + public static readonly string OrderFollow = "OrderFollow"; + public static readonly string OpenOrders = "OpenOrders"; + public static readonly string PhotoCameraToggle = "PhotoCameraToggle"; + public static readonly string PhotoCameraToggle_Buggy = "PhotoCameraToggle_Buggy"; + public static readonly string VanityCameraScrollLeft = "VanityCameraScrollLeft"; + public static readonly string VanityCameraScrollRight = "VanityCameraScrollRight"; + public static readonly string ToggleFreeCam = "ToggleFreeCam"; + public static readonly string VanityCameraOne = "VanityCameraOne"; + public static readonly string VanityCameraTwo = "VanityCameraTwo"; + public static readonly string VanityCameraThree = "VanityCameraThree"; + public static readonly string VanityCameraFour = "VanityCameraFour"; + public static readonly string VanityCameraFive = "VanityCameraFive"; + public static readonly string VanityCameraSix = "VanityCameraSix"; + public static readonly string VanityCameraSeven = "VanityCameraSeven"; + public static readonly string VanityCameraEight = "VanityCameraEight"; + public static readonly string VanityCameraNine = "VanityCameraNine"; + public static readonly string FreeCamToggleHUD = "FreeCamToggleHUD"; + public static readonly string FreeCamSpeedInc = "FreeCamSpeedInc"; + public static readonly string FreeCamSpeedDec = "FreeCamSpeedDec"; + public static readonly string ToggleReverseThrottleInputFreeCam = "ToggleReverseThrottleInputFreeCam"; + public static readonly string MoveFreeCamForward = "MoveFreeCamForward"; + public static readonly string MoveFreeCamBackwards = "MoveFreeCamBackwards"; + public static readonly string MoveFreeCamRight = "MoveFreeCamRight"; + public static readonly string MoveFreeCamLeft = "MoveFreeCamLeft"; + public static readonly string MoveFreeCamUp = "MoveFreeCamUp"; + public static readonly string MoveFreeCamDown = "MoveFreeCamDown"; + public static readonly string PitchCameraUp = "PitchCameraUp"; + public static readonly string PitchCameraDown = "PitchCameraDown"; + public static readonly string YawCameraLeft = "YawCameraLeft"; + public static readonly string YawCameraRight = "YawCameraRight"; + public static readonly string RollCameraLeft = "RollCameraLeft"; + public static readonly string RollCameraRight = "RollCameraRight"; + public static readonly string ToggleRotationLock = "ToggleRotationLock"; + public static readonly string FixCameraRelativeToggle = "FixCameraRelativeToggle"; + public static readonly string FixCameraWorldToggle = "FixCameraWorldToggle"; + public static readonly string QuitCamera = "QuitCamera"; + public static readonly string ToggleAdvanceMode = "ToggleAdvanceMode"; + public static readonly string FreeCamZoomIn = "FreeCamZoomIn"; + public static readonly string FreeCamZoomOut = "FreeCamZoomOut"; + public static readonly string FStopDec = "FStopDec"; + public static readonly string FStopInc = "FStopInc"; + public static readonly string CommanderCreator_Undo = "CommanderCreator_Undo"; + public static readonly string CommanderCreator_Redo = "CommanderCreator_Redo"; + public static readonly string CommanderCreator_Rotation_MouseToggle = "CommanderCreator_Rotation_MouseToggle"; + public static readonly string GalnetAudio_Play_Pause = "GalnetAudio_Play_Pause"; + public static readonly string GalnetAudio_SkipForward = "GalnetAudio_SkipForward"; + public static readonly string GalnetAudio_SkipBackward = "GalnetAudio_SkipBackward"; + public static readonly string GalnetAudio_ClearQueue = "GalnetAudio_ClearQueue"; + public static readonly string ExplorationFSSEnter = "ExplorationFSSEnter"; + + public static readonly string ExplorationFSSCameraPitchIncreaseButton = + "ExplorationFSSCameraPitchIncreaseButton"; + + public static readonly string ExplorationFSSCameraPitchDecreaseButton = + "ExplorationFSSCameraPitchDecreaseButton"; + + public static readonly string ExplorationFSSCameraYawIncreaseButton = "ExplorationFSSCameraYawIncreaseButton"; + public static readonly string ExplorationFSSCameraYawDecreaseButton = "ExplorationFSSCameraYawDecreaseButton"; + public static readonly string ExplorationFSSZoomIn = "ExplorationFSSZoomIn"; + public static readonly string ExplorationFSSZoomOut = "ExplorationFSSZoomOut"; + public static readonly string ExplorationFSSMiniZoomIn = "ExplorationFSSMiniZoomIn"; + public static readonly string ExplorationFSSMiniZoomOut = "ExplorationFSSMiniZoomOut"; + public static readonly string ExplorationFSSRadioTuningX_Increase = "ExplorationFSSRadioTuningX_Increase"; + public static readonly string ExplorationFSSRadioTuningX_Decrease = "ExplorationFSSRadioTuningX_Decrease"; + public static readonly string ExplorationFSSDiscoveryScan = "ExplorationFSSDiscoveryScan"; + public static readonly string ExplorationFSSQuit = "ExplorationFSSQuit"; + public static readonly string ExplorationFSSTarget = "ExplorationFSSTarget"; + public static readonly string ExplorationFSSShowHelp = "ExplorationFSSShowHelp"; + + public static readonly string ExplorationSAAChangeScannedAreaViewToggle = + "ExplorationSAAChangeScannedAreaViewToggle"; + + public static readonly string ExplorationSAAExitThirdPerson = "ExplorationSAAExitThirdPerson"; + public static readonly string SAAThirdPersonYawLeftButton = "SAAThirdPersonYawLeftButton"; + public static readonly string SAAThirdPersonYawRightButton = "SAAThirdPersonYawRightButton"; + public static readonly string SAAThirdPersonPitchUpButton = "SAAThirdPersonPitchUpButton"; + public static readonly string SAAThirdPersonPitchDownButton = "SAAThirdPersonPitchDownButton"; + public static readonly string SAAThirdPersonFovOutButton = "SAAThirdPersonFovOutButton"; + public static readonly string SAAThirdPersonFovInButton = "SAAThirdPersonFovInButton"; + } public class Bind { - public static class EliteBindName - { - public static readonly string MouseReset = "MouseReset"; - public static readonly string YawLeftButton = "YawLeftButton"; - public static readonly string YawRightButton = "YawRightButton"; - public static readonly string YawToRollButton = "YawToRollButton"; - public static readonly string RollLeftButton = "RollLeftButton"; - public static readonly string RollRightButton = "RollRightButton"; - public static readonly string PitchUpButton = "PitchUpButton"; - public static readonly string PitchDownButton = "PitchDownButton"; - public static readonly string LeftThrustButton = "LeftThrustButton"; - public static readonly string RightThrustButton = "RightThrustButton"; - public static readonly string UpThrustButton = "UpThrustButton"; - public static readonly string DownThrustButton = "DownThrustButton"; - public static readonly string ForwardThrustButton = "ForwardThrustButton"; - public static readonly string BackwardThrustButton = "BackwardThrustButton"; - public static readonly string UseAlternateFlightValuesToggle = "UseAlternateFlightValuesToggle"; - public static readonly string ToggleReverseThrottleInput = "ToggleReverseThrottleInput"; - public static readonly string ForwardKey = "ForwardKey"; - public static readonly string BackwardKey = "BackwardKey"; - public static readonly string SetSpeedMinus100 = "SetSpeedMinus100"; - public static readonly string SetSpeedMinus75 = "SetSpeedMinus75"; - public static readonly string SetSpeedMinus50 = "SetSpeedMinus50"; - public static readonly string SetSpeedMinus25 = "SetSpeedMinus25"; - public static readonly string SetSpeedZero = "SetSpeedZero"; - public static readonly string SetSpeed25 = "SetSpeed25"; - public static readonly string SetSpeed50 = "SetSpeed50"; - public static readonly string SetSpeed75 = "SetSpeed75"; - public static readonly string SetSpeed100 = "SetSpeed100"; - public static readonly string YawLeftButton_Landing = "YawLeftButton_Landing"; - public static readonly string YawRightButton_Landing = "YawRightButton_Landing"; - public static readonly string PitchUpButton_Landing = "PitchUpButton_Landing"; - public static readonly string PitchDownButton_Landing = "PitchDownButton_Landing"; - public static readonly string RollLeftButton_Landing = "RollLeftButton_Landing"; - public static readonly string RollRightButton_Landing = "RollRightButton_Landing"; - public static readonly string LeftThrustButton_Landing = "LeftThrustButton_Landing"; - public static readonly string RightThrustButton_Landing = "RightThrustButton_Landing"; - public static readonly string UpThrustButton_Landing = "UpThrustButton_Landing"; - public static readonly string DownThrustButton_Landing = "DownThrustButton_Landing"; - public static readonly string ForwardThrustButton_Landing = "ForwardThrustButton_Landing"; - public static readonly string BackwardThrustButton_Landing = "BackwardThrustButton_Landing"; - public static readonly string ToggleFlightAssist = "ToggleFlightAssist"; - public static readonly string UseBoostJuice = "UseBoostJuice"; - public static readonly string HyperSuperCombination = "HyperSuperCombination"; - public static readonly string Supercruise = "Supercruise"; - public static readonly string Hyperspace = "Hyperspace"; - public static readonly string DisableRotationCorrectToggle = "DisableRotationCorrectToggle"; - public static readonly string OrbitLinesToggle = "OrbitLinesToggle"; - public static readonly string SelectTarget = "SelectTarget"; - public static readonly string CycleNextTarget = "CycleNextTarget"; - public static readonly string CyclePreviousTarget = "CyclePreviousTarget"; - public static readonly string SelectHighestThreat = "SelectHighestThreat"; - public static readonly string CycleNextHostileTarget = "CycleNextHostileTarget"; - public static readonly string CyclePreviousHostileTarget = "CyclePreviousHostileTarget"; - public static readonly string TargetWingman0 = "TargetWingman0"; - public static readonly string TargetWingman1 = "TargetWingman1"; - public static readonly string TargetWingman2 = "TargetWingman2"; - public static readonly string SelectTargetsTarget = "SelectTargetsTarget"; - public static readonly string WingNavLock = "WingNavLock"; - public static readonly string CycleNextSubsystem = "CycleNextSubsystem"; - public static readonly string CyclePreviousSubsystem = "CyclePreviousSubsystem"; - public static readonly string TargetNextRouteSystem = "TargetNextRouteSystem"; - public static readonly string PrimaryFire = "PrimaryFire"; - public static readonly string SecondaryFire = "SecondaryFire"; - public static readonly string CycleFireGroupNext = "CycleFireGroupNext"; - public static readonly string CycleFireGroupPrevious = "CycleFireGroupPrevious"; - public static readonly string DeployHardpointToggle = "DeployHardpointToggle"; - public static readonly string ToggleButtonUpInput = "ToggleButtonUpInput"; - public static readonly string DeployHeatSink = "DeployHeatSink"; - public static readonly string ShipSpotLightToggle = "ShipSpotLightToggle"; - public static readonly string RadarIncreaseRange = "RadarIncreaseRange"; - public static readonly string RadarDecreaseRange = "RadarDecreaseRange"; - public static readonly string IncreaseEnginesPower = "IncreaseEnginesPower"; - public static readonly string IncreaseWeaponsPower = "IncreaseWeaponsPower"; - public static readonly string IncreaseSystemsPower = "IncreaseSystemsPower"; - public static readonly string ResetPowerDistribution = "ResetPowerDistribution"; - public static readonly string HMDReset = "HMDReset"; - public static readonly string ToggleCargoScoop = "ToggleCargoScoop"; - public static readonly string EjectAllCargo = "EjectAllCargo"; - public static readonly string LandingGearToggle = "LandingGearToggle"; - public static readonly string MicrophoneMute = "MicrophoneMute"; - public static readonly string UseShieldCell = "UseShieldCell"; - public static readonly string FireChaffLauncher = "FireChaffLauncher"; - public static readonly string ChargeECM = "ChargeECM"; - public static readonly string WeaponColourToggle = "WeaponColourToggle"; - public static readonly string EngineColourToggle = "EngineColourToggle"; - public static readonly string NightVisionToggle = "NightVisionToggle"; - public static readonly string UIFocus = "UIFocus"; - public static readonly string FocusLeftPanel = "FocusLeftPanel"; - public static readonly string FocusCommsPanel = "FocusCommsPanel"; - public static readonly string QuickCommsPanel = "QuickCommsPanel"; - public static readonly string FocusRadarPanel = "FocusRadarPanel"; - public static readonly string FocusRightPanel = "FocusRightPanel"; - public static readonly string GalaxyMapOpen = "GalaxyMapOpen"; - public static readonly string SystemMapOpen = "SystemMapOpen"; - public static readonly string ShowPGScoreSummaryInput = "ShowPGScoreSummaryInput"; - public static readonly string HeadLookToggle = "HeadLookToggle"; - public static readonly string Pause = "Pause"; - public static readonly string FriendsMenu = "FriendsMenu"; - public static readonly string OpenCodexGoToDiscovery = "OpenCodexGoToDiscovery"; - public static readonly string PlayerHUDModeToggle = "PlayerHUDModeToggle"; - public static readonly string UI_Up = "UI_Up"; - public static readonly string UI_Down = "UI_Down"; - public static readonly string UI_Left = "UI_Left"; - public static readonly string UI_Right = "UI_Right"; - public static readonly string UI_Select = "UI_Select"; - public static readonly string UI_Back = "UI_Back"; - public static readonly string UI_Toggle = "UI_Toggle"; - public static readonly string CycleNextPanel = "CycleNextPanel"; - public static readonly string CyclePreviousPanel = "CyclePreviousPanel"; - public static readonly string CycleNextPage = "CycleNextPage"; - public static readonly string CyclePreviousPage = "CyclePreviousPage"; - public static readonly string HeadLookReset = "HeadLookReset"; - public static readonly string HeadLookPitchUp = "HeadLookPitchUp"; - public static readonly string HeadLookPitchDown = "HeadLookPitchDown"; - public static readonly string HeadLookYawLeft = "HeadLookYawLeft"; - public static readonly string HeadLookYawRight = "HeadLookYawRight"; - public static readonly string CamPitchUp = "CamPitchUp"; - public static readonly string CamPitchDown = "CamPitchDown"; - public static readonly string CamYawLeft = "CamYawLeft"; - public static readonly string CamYawRight = "CamYawRight"; - public static readonly string CamTranslateForward = "CamTranslateForward"; - public static readonly string CamTranslateBackward = "CamTranslateBackward"; - public static readonly string CamTranslateLeft = "CamTranslateLeft"; - public static readonly string CamTranslateRight = "CamTranslateRight"; - public static readonly string CamTranslateUp = "CamTranslateUp"; - public static readonly string CamTranslateDown = "CamTranslateDown"; - public static readonly string CamZoomIn = "CamZoomIn"; - public static readonly string CamZoomOut = "CamZoomOut"; - public static readonly string CamTranslateZHold = "CamTranslateZHold"; - public static readonly string ToggleDriveAssist = "ToggleDriveAssist"; - public static readonly string SteerLeftButton = "SteerLeftButton"; - public static readonly string SteerRightButton = "SteerRightButton"; - public static readonly string BuggyRollLeftButton = "BuggyRollLeftButton"; - public static readonly string BuggyRollRightButton = "BuggyRollRightButton"; - public static readonly string BuggyPitchUpButton = "BuggyPitchUpButton"; - public static readonly string BuggyPitchDownButton = "BuggyPitchDownButton"; - public static readonly string VerticalThrustersButton = "VerticalThrustersButton"; - public static readonly string BuggyPrimaryFireButton = "BuggyPrimaryFireButton"; - public static readonly string BuggySecondaryFireButton = "BuggySecondaryFireButton"; - public static readonly string AutoBreakBuggyButton = "AutoBreakBuggyButton"; - public static readonly string HeadlightsBuggyButton = "HeadlightsBuggyButton"; - public static readonly string ToggleBuggyTurretButton = "ToggleBuggyTurretButton"; - public static readonly string SelectTarget_Buggy = "SelectTarget_Buggy"; - public static readonly string BuggyTurretYawLeftButton = "BuggyTurretYawLeftButton"; - public static readonly string BuggyTurretYawRightButton = "BuggyTurretYawRightButton"; - public static readonly string BuggyTurretPitchUpButton = "BuggyTurretPitchUpButton"; - public static readonly string BuggyTurretPitchDownButton = "BuggyTurretPitchDownButton"; - public static readonly string BuggyToggleReverseThrottleInput = "BuggyToggleReverseThrottleInput"; - public static readonly string IncreaseSpeedButtonMax = "IncreaseSpeedButtonMax"; - public static readonly string DecreaseSpeedButtonMax = "DecreaseSpeedButtonMax"; - public static readonly string IncreaseEnginesPower_Buggy = "IncreaseEnginesPower_Buggy"; - public static readonly string IncreaseWeaponsPower_Buggy = "IncreaseWeaponsPower_Buggy"; - public static readonly string IncreaseSystemsPower_Buggy = "IncreaseSystemsPower_Buggy"; - public static readonly string ResetPowerDistribution_Buggy = "ResetPowerDistribution_Buggy"; - public static readonly string ToggleCargoScoop_Buggy = "ToggleCargoScoop_Buggy"; - public static readonly string EjectAllCargo_Buggy = "EjectAllCargo_Buggy"; - public static readonly string RecallDismissShip = "RecallDismissShip"; - public static readonly string UIFocus_Buggy = "UIFocus_Buggy"; - public static readonly string FocusLeftPanel_Buggy = "FocusLeftPanel_Buggy"; - public static readonly string FocusCommsPanel_Buggy = "FocusCommsPanel_Buggy"; - public static readonly string QuickCommsPanel_Buggy = "QuickCommsPanel_Buggy"; - public static readonly string FocusRadarPanel_Buggy = "FocusRadarPanel_Buggy"; - public static readonly string FocusRightPanel_Buggy = "FocusRightPanel_Buggy"; - public static readonly string GalaxyMapOpen_Buggy = "GalaxyMapOpen_Buggy"; - public static readonly string SystemMapOpen_Buggy = "SystemMapOpen_Buggy"; - public static readonly string HeadLookToggle_Buggy = "HeadLookToggle_Buggy"; - public static readonly string MultiCrewToggleMode = "MultiCrewToggleMode"; - public static readonly string MultiCrewPrimaryFire = "MultiCrewPrimaryFire"; - public static readonly string MultiCrewSecondaryFire = "MultiCrewSecondaryFire"; - public static readonly string MultiCrewPrimaryUtilityFire = "MultiCrewPrimaryUtilityFire"; - public static readonly string MultiCrewSecondaryUtilityFire = "MultiCrewSecondaryUtilityFire"; - public static readonly string MultiCrewThirdPersonYawLeftButton = "MultiCrewThirdPersonYawLeftButton"; - public static readonly string MultiCrewThirdPersonYawRightButton = "MultiCrewThirdPersonYawRightButton"; - public static readonly string MultiCrewThirdPersonPitchUpButton = "MultiCrewThirdPersonPitchUpButton"; - public static readonly string MultiCrewThirdPersonPitchDownButton = "MultiCrewThirdPersonPitchDownButton"; - public static readonly string MultiCrewThirdPersonFovOutButton = "MultiCrewThirdPersonFovOutButton"; - public static readonly string MultiCrewThirdPersonFovInButton = "MultiCrewThirdPersonFovInButton"; - public static readonly string MultiCrewCockpitUICycleForward = "MultiCrewCockpitUICycleForward"; - public static readonly string MultiCrewCockpitUICycleBackward = "MultiCrewCockpitUICycleBackward"; - public static readonly string OrderRequestDock = "OrderRequestDock"; - public static readonly string OrderDefensiveBehaviour = "OrderDefensiveBehaviour"; - public static readonly string OrderAggressiveBehaviour = "OrderAggressiveBehaviour"; - public static readonly string OrderFocusTarget = "OrderFocusTarget"; - public static readonly string OrderHoldFire = "OrderHoldFire"; - public static readonly string OrderHoldPosition = "OrderHoldPosition"; - public static readonly string OrderFollow = "OrderFollow"; - public static readonly string OpenOrders = "OpenOrders"; - public static readonly string PhotoCameraToggle = "PhotoCameraToggle"; - public static readonly string PhotoCameraToggle_Buggy = "PhotoCameraToggle_Buggy"; - public static readonly string VanityCameraScrollLeft = "VanityCameraScrollLeft"; - public static readonly string VanityCameraScrollRight = "VanityCameraScrollRight"; - public static readonly string ToggleFreeCam = "ToggleFreeCam"; - public static readonly string VanityCameraOne = "VanityCameraOne"; - public static readonly string VanityCameraTwo = "VanityCameraTwo"; - public static readonly string VanityCameraThree = "VanityCameraThree"; - public static readonly string VanityCameraFour = "VanityCameraFour"; - public static readonly string VanityCameraFive = "VanityCameraFive"; - public static readonly string VanityCameraSix = "VanityCameraSix"; - public static readonly string VanityCameraSeven = "VanityCameraSeven"; - public static readonly string VanityCameraEight = "VanityCameraEight"; - public static readonly string VanityCameraNine = "VanityCameraNine"; - public static readonly string FreeCamToggleHUD = "FreeCamToggleHUD"; - public static readonly string FreeCamSpeedInc = "FreeCamSpeedInc"; - public static readonly string FreeCamSpeedDec = "FreeCamSpeedDec"; - public static readonly string ToggleReverseThrottleInputFreeCam = "ToggleReverseThrottleInputFreeCam"; - public static readonly string MoveFreeCamForward = "MoveFreeCamForward"; - public static readonly string MoveFreeCamBackwards = "MoveFreeCamBackwards"; - public static readonly string MoveFreeCamRight = "MoveFreeCamRight"; - public static readonly string MoveFreeCamLeft = "MoveFreeCamLeft"; - public static readonly string MoveFreeCamUp = "MoveFreeCamUp"; - public static readonly string MoveFreeCamDown = "MoveFreeCamDown"; - public static readonly string PitchCameraUp = "PitchCameraUp"; - public static readonly string PitchCameraDown = "PitchCameraDown"; - public static readonly string YawCameraLeft = "YawCameraLeft"; - public static readonly string YawCameraRight = "YawCameraRight"; - public static readonly string RollCameraLeft = "RollCameraLeft"; - public static readonly string RollCameraRight = "RollCameraRight"; - public static readonly string ToggleRotationLock = "ToggleRotationLock"; - public static readonly string FixCameraRelativeToggle = "FixCameraRelativeToggle"; - public static readonly string FixCameraWorldToggle = "FixCameraWorldToggle"; - public static readonly string QuitCamera = "QuitCamera"; - public static readonly string ToggleAdvanceMode = "ToggleAdvanceMode"; - public static readonly string FreeCamZoomIn = "FreeCamZoomIn"; - public static readonly string FreeCamZoomOut = "FreeCamZoomOut"; - public static readonly string FStopDec = "FStopDec"; - public static readonly string FStopInc = "FStopInc"; - public static readonly string CommanderCreator_Undo = "CommanderCreator_Undo"; - public static readonly string CommanderCreator_Redo = "CommanderCreator_Redo"; - public static readonly string CommanderCreator_Rotation_MouseToggle = "CommanderCreator_Rotation_MouseToggle"; - public static readonly string GalnetAudio_Play_Pause = "GalnetAudio_Play_Pause"; - public static readonly string GalnetAudio_SkipForward = "GalnetAudio_SkipForward"; - public static readonly string GalnetAudio_SkipBackward = "GalnetAudio_SkipBackward"; - public static readonly string GalnetAudio_ClearQueue = "GalnetAudio_ClearQueue"; - public static readonly string ExplorationFSSEnter = "ExplorationFSSEnter"; - public static readonly string ExplorationFSSCameraPitchIncreaseButton = "ExplorationFSSCameraPitchIncreaseButton"; - public static readonly string ExplorationFSSCameraPitchDecreaseButton = "ExplorationFSSCameraPitchDecreaseButton"; - public static readonly string ExplorationFSSCameraYawIncreaseButton = "ExplorationFSSCameraYawIncreaseButton"; - public static readonly string ExplorationFSSCameraYawDecreaseButton = "ExplorationFSSCameraYawDecreaseButton"; - public static readonly string ExplorationFSSZoomIn = "ExplorationFSSZoomIn"; - public static readonly string ExplorationFSSZoomOut = "ExplorationFSSZoomOut"; - public static readonly string ExplorationFSSMiniZoomIn = "ExplorationFSSMiniZoomIn"; - public static readonly string ExplorationFSSMiniZoomOut = "ExplorationFSSMiniZoomOut"; - public static readonly string ExplorationFSSRadioTuningX_Increase = "ExplorationFSSRadioTuningX_Increase"; - public static readonly string ExplorationFSSRadioTuningX_Decrease = "ExplorationFSSRadioTuningX_Decrease"; - public static readonly string ExplorationFSSDiscoveryScan = "ExplorationFSSDiscoveryScan"; - public static readonly string ExplorationFSSQuit = "ExplorationFSSQuit"; - public static readonly string ExplorationFSSTarget = "ExplorationFSSTarget"; - public static readonly string ExplorationFSSShowHelp = "ExplorationFSSShowHelp"; - public static readonly string ExplorationSAAChangeScannedAreaViewToggle = "ExplorationSAAChangeScannedAreaViewToggle"; - public static readonly string ExplorationSAAExitThirdPerson = "ExplorationSAAExitThirdPerson"; - public static readonly string SAAThirdPersonYawLeftButton = "SAAThirdPersonYawLeftButton"; - public static readonly string SAAThirdPersonYawRightButton = "SAAThirdPersonYawRightButton"; - public static readonly string SAAThirdPersonPitchUpButton = "SAAThirdPersonPitchUpButton"; - public static readonly string SAAThirdPersonPitchDownButton = "SAAThirdPersonPitchDownButton"; - public static readonly string SAAThirdPersonFovOutButton = "SAAThirdPersonFovOutButton"; - public static readonly string SAAThirdPersonFovInButton = "SAAThirdPersonFovInButton"; - } - public static Dictionary eliteKeyToDeviceKey = new Dictionary() { {"Key_Escape", DeviceKeys.ESC}, @@ -380,7 +387,7 @@ public class Mapping { public DeviceKeys key = DeviceKeys.NONE; public List modifiers = new List(); - + public void SetKey(string eliteKey) { if (Bind.eliteKeyToDeviceKey.ContainsKey(eliteKey)) @@ -388,6 +395,7 @@ public void SetKey(string eliteKey) key = Bind.eliteKeyToDeviceKey[eliteKey]; } } + public void AddModifier(string eliteKey) { if (Bind.eliteKeyToDeviceKey.ContainsKey(eliteKey)) @@ -395,16 +403,16 @@ public void AddModifier(string eliteKey) modifiers.Add(Bind.eliteKeyToDeviceKey[eliteKey]); } } - + public bool HasKey() { return key != null; } } - + private string command; public HashSet mappings = new HashSet(); - + public Bind(string command) { this.command = command; @@ -423,8 +431,10 @@ public class ControlGroup public List commands; public StatusState neededStatusState; - public ControlGroup(string colorGroupName, string[] commands) : this(colorGroupName, commands, null) { } - + public ControlGroup(string colorGroupName, string[] commands) : this(colorGroupName, commands, null) + { + } + public ControlGroup(string colorGroupName, string[] commands, StatusState neededStatusState) { this.colorGroupName = colorGroupName; @@ -436,6 +446,7 @@ public bool ConditionSatisfied(Status status) { return ConditionSatisfied(status.Flags, status.GuiFocus); } + public bool ConditionSatisfied(long flags, int guiFocus) { if (neededStatusState != null) @@ -446,7 +457,7 @@ public bool ConditionSatisfied(long flags, int guiFocus) return true; } } - + /// /// Class representing current controls configuration /// diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs index 48c154df5..74b12d625 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs @@ -2,15 +2,22 @@ namespace Aurora.Profiles.EliteDangerous.GSI.Nodes { - public class StatusState { long flagsSet = -1; long flagsNotSet = -1; int guiFocus = -1; private Func conditionCallback = null; - - public StatusState(long flagsSet, long flagsNotSet) : this(flagsSet, -1, flagsNotSet, null) {} + + public StatusState(long flagsSet, long flagsNotSet = -1) : this(flagsSet, -1, flagsNotSet, null) + { + } + + public StatusState(long flagsSet, long flagsNotSet, Func conditionCallback) : this(flagsSet, -1, + flagsNotSet, conditionCallback) + { + } + public StatusState(long flagsSet, int guiFocus, long flagsNotSet, Func conditionCallback) { this.flagsSet = flagsSet; @@ -18,26 +25,36 @@ public StatusState(long flagsSet, int guiFocus, long flagsNotSet, Func con this.flagsNotSet = flagsNotSet; this.conditionCallback = conditionCallback; } + public StatusState(Func conditionCallback) { this.conditionCallback = conditionCallback; } - + public bool ConditionSatisfied(Status status) { return ConditionSatisfied(status.Flags, status.GuiFocus); } - public bool ConditionSatisfied(long flags, int guiFocus) { - if(conditionCallback != null && !conditionCallback()) { + + public bool ConditionSatisfied(long flags, int guiFocus) + { + if (conditionCallback != null && !conditionCallback()) + { return false; } - if(this.guiFocus != -1 && this.guiFocus != guiFocus) { + + if (this.guiFocus != -1 && this.guiFocus != guiFocus) + { return false; } - if(this.flagsSet != -1 && !Flag.IsFlagSet(flags, this.flagsSet)) { + + if (this.flagsSet != -1 && !Flag.IsFlagSet(flags, this.flagsSet)) + { return false; } - if(this.flagsNotSet != -1 && Flag.IsFlagSet(flags, this.flagsNotSet)) { + + if (this.flagsNotSet != -1 && Flag.IsFlagSet(flags, this.flagsNotSet)) + { return false; } @@ -47,54 +64,61 @@ public bool ConditionSatisfied(long flags, int guiFocus) { public static class Flag { - public static readonly int NONE = -1; - public static readonly int DOCKED = 1; - public static readonly int LANDED_PLANET = 1 << 1; - public static readonly int LANDING_GEAR = 1 << 2; - public static readonly int SHIELDS_UP = 1 << 3; - public static readonly int SUPERCRUISE = 1 << 4; - public static readonly int FA_OFF = 1 << 5; - public static readonly int HARDPOINTS = 1 << 6; - public static readonly int IN_WING = 1 << 7; - public static readonly int SHIP_LIGHTS = 1 << 8; - public static readonly int CARGO_SCOOP = 1 << 9; - public static readonly int SILENT_RUNNING = 1 << 10; - public static readonly int SCOOPING = 1 << 11; - public static readonly int SRV_HANDBRAKE = 1 << 12; - public static readonly int SRV_TURRET = 1 << 13; - public static readonly int SRV_UNDER_SHIP = 1 << 14; - public static readonly int SRV_DRIVE_ASSIST = 1 << 15; - public static readonly int MASS_LOCK = 1 << 16; - public static readonly int FSD_CHARGING = 1 << 17; - public static readonly int FSD_COOLDOWN = 1 << 18; - public static readonly int LOW_FUEL = 1 << 19; // Less than 25% - public static readonly int OVERHEATING = 1 << 20; // More than 100% - public static readonly int HAS_LAT_LONG = 1 << 21; - public static readonly int IN_DANGER = 1 << 22; - public static readonly int INTERDICTION = 1 << 23; - public static readonly int IN_SHIP = 1 << 24; - public static readonly int IN_FIGHTER = 1 << 25; - public static readonly int IN_SRV = 1 << 26; - public static readonly int HUD_DISCOVERY_MODE = 1 << 27; - public static readonly int NIGHT_VISION = 1 << 28; - - public static bool IsFlagSet(long bitmask, long flag) { + public static readonly int NONE = -1; + public static readonly int DOCKED = 1; + public static readonly int LANDED_PLANET = 1 << 1; + public static readonly int LANDING_GEAR = 1 << 2; + public static readonly int SHIELDS_UP = 1 << 3; + public static readonly int SUPERCRUISE = 1 << 4; + public static readonly int FA_OFF = 1 << 5; + public static readonly int HARDPOINTS = 1 << 6; + public static readonly int IN_WING = 1 << 7; + public static readonly int SHIP_LIGHTS = 1 << 8; + public static readonly int CARGO_SCOOP = 1 << 9; + public static readonly int SILENT_RUNNING = 1 << 10; + public static readonly int SCOOPING = 1 << 11; + public static readonly int SRV_HANDBRAKE = 1 << 12; + public static readonly int SRV_TURRET = 1 << 13; + public static readonly int SRV_UNDER_SHIP = 1 << 14; + public static readonly int SRV_DRIVE_ASSIST = 1 << 15; + public static readonly int MASS_LOCK = 1 << 16; + public static readonly int FSD_CHARGING = 1 << 17; + public static readonly int FSD_COOLDOWN = 1 << 18; + public static readonly int LOW_FUEL = 1 << 19; // Less than 25% + public static readonly int OVERHEATING = 1 << 20; // More than 100% + public static readonly int HAS_LAT_LONG = 1 << 21; + public static readonly int IN_DANGER = 1 << 22; + public static readonly int INTERDICTION = 1 << 23; + public static readonly int IN_SHIP = 1 << 24; + public static readonly int IN_FIGHTER = 1 << 25; + public static readonly int IN_SRV = 1 << 26; + public static readonly int HUD_DISCOVERY_MODE = 1 << 27; + public static readonly int NIGHT_VISION = 1 << 28; + + public static bool IsFlagSet(long bitmask, long flag) + { return (bitmask & flag) == flag; } } - + /// /// Class representing player status /// public class Status : Node { - public string timestamp; + public DateTime timestamp; public string @event; public long Flags; public int[] Pips; public int FireGroup; public int GuiFocus; - public double Fuel; + public FuelClass Fuel; public double Cargo; + + public class FuelClass + { + public double FuelMain; + public double FuelReservoir; + } } } \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs index 6cce39675..b25d7def9 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GameEvent_EliteDangerous.cs @@ -6,6 +6,8 @@ using System.Xml; using Aurora.Profiles.EliteDangerous.GSI; using Aurora.Profiles.EliteDangerous.GSI.Nodes; +using Aurora.Profiles.EliteDangerous.Helpers; +using Newtonsoft.Json; namespace Aurora.Profiles.EliteDangerous { @@ -20,6 +22,7 @@ public class GameEvent_EliteDangerous : GameEvent_Generic "Elite Dangerous" ); private static readonly string statusFile = Path.Combine(journalFolder, "Status.json"); + private FileWatcher statusFileWatcher; private static readonly string bindingsFolder = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @@ -32,8 +35,11 @@ public class GameEvent_EliteDangerous : GameEvent_Generic private string currentBindFile = null; private FileSystemWatcher bindWatcher = null; - - public GameEvent_EliteDangerous() : base() {} + + public GameEvent_EliteDangerous() : base() + { + statusFileWatcher = new FileWatcher(statusFile, FileWatcher.ReadMode.FULL, new StatusReadCallback(this)); + } public void WatchBindFiles() { @@ -59,38 +65,6 @@ public void StopWatchingBindFiles() } } - public class DelayedMethodCaller - { - int _delay; - Timer _timer = new Timer(); - - public DelayedMethodCaller(int delay) - { - _delay = delay; - } - - public void CallMethod(Action action) - { - if (!_timer.Enabled) - { - _timer = new Timer(_delay) - { - AutoReset = false - }; - _timer.Elapsed += (object sender, ElapsedEventArgs e) => - { - action(); - }; - _timer.Start(); - } - else - { - _timer.Stop(); - _timer.Start(); - } - } - } - private void OnBindsFileChanged(object sender, FileSystemEventArgs e) { /* @@ -181,16 +155,49 @@ private void ParseBindFile() controls.bindToCommand = bindToCommand; } + public void UpdateStatus(Status newStatus) + { + Status status = (_game_state as GameState_EliteDangerous).Status; + + status.timestamp = newStatus.timestamp; + status.@event = newStatus.@event; + status.Flags = newStatus.Flags; + status.Pips = newStatus.Pips; + status.FireGroup = newStatus.FireGroup; + status.GuiFocus = newStatus.GuiFocus; + status.Fuel = newStatus.Fuel; + status.Cargo = newStatus.Cargo; + } + + private class StatusReadCallback : FileWatcher.FileReadCallback + { + private GameEvent_EliteDangerous @event; + public StatusReadCallback(GameEvent_EliteDangerous @event) + { + this.@event = @event; + } + public void OnRead(int lineNumber, string lineValue) + { + if (string.IsNullOrEmpty(lineValue)) return; + + Status newStatus = JsonConvert.DeserializeObject(lineValue); + + @event.UpdateStatus(newStatus); + } + } + public override void OnStart() { ReadBindFiles(); WatchBindFiles(); + statusFileWatcher.Start(); //TODO: Enable Journal API reading } public override void OnStop() { StopWatchingBindFiles(); + statusFileWatcher.Stop(); //TODO: Disable Journal API reading } } diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Helpers/FileWatcher.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Helpers/FileWatcher.cs new file mode 100644 index 000000000..35d5f45ff --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Helpers/FileWatcher.cs @@ -0,0 +1,101 @@ +using System; +using System.IO; +using System.Text; +using System.Threading; +using IronPython.Modules; + +namespace Aurora.Profiles.EliteDangerous.Helpers +{ + public class FileWatcher + { + public enum ReadMode { + TAIL, TAIL_END, FULL + }; + + public interface FileReadCallback { + void OnRead(int lineNumber, string lineValue); + } + + private readonly int READ_DELAY = 3; + private Thread watcherThread; + private string filename; + private ReadMode readMode; + private FileReadCallback readCallback; + private long lastFileWrite = 0; + + public FileWatcher(string filename, ReadMode readMode, FileReadCallback readCallback) + { + this.filename = filename; + this.readMode = readMode; + this.readCallback = readCallback; + } + + private void ReadFile() + { + FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); + StreamReader reader = new StreamReader(stream, Encoding.UTF8); + try + { + if (readMode == ReadMode.TAIL_END) + { + reader.ReadToEnd(); + } + while (true) + { + if(readMode == ReadMode.FULL) { + long writeTime = File.GetLastWriteTime(filename).Ticks; + if (lastFileWrite != writeTime) + { + stream.Position = 0; + reader.DiscardBufferedData(); + lastFileWrite = writeTime; + + readCallback.OnRead(0, reader.ReadToEnd()); + } + } + else + { + string line; + while ((line = reader.ReadLine()) != null) + { + readCallback.OnRead(0, line); + } + } + + Thread.Sleep(READ_DELAY); + } + } + finally + { + reader.Close(); + } + } + + public bool Start() + { + if (watcherThread == null) + { + watcherThread = new Thread(ReadFile); + watcherThread.Start(); + return true; + } + + return false; + } + + public bool Stop() + { + if (watcherThread != null) + { + watcherThread.Abort(); + watcherThread.Join(); + watcherThread = null; + + return true; + } + + return false; + } + } + +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Helpers/TimerHelpers.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Helpers/TimerHelpers.cs new file mode 100644 index 000000000..a18acb4eb --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Helpers/TimerHelpers.cs @@ -0,0 +1,37 @@ +using System; +using System.Timers; + +namespace Aurora.Profiles.EliteDangerous.Helpers +{ + public class DelayedMethodCaller + { + int _delay; + Timer _timer = new Timer(); + + public DelayedMethodCaller(int delay) + { + _delay = delay; + } + + public void CallMethod(Action action) + { + if (!_timer.Enabled) + { + _timer = new Timer(_delay) + { + AutoReset = false + }; + _timer.Elapsed += (object sender, ElapsedEventArgs e) => + { + action(); + }; + _timer.Start(); + } + else + { + _timer.Stop(); + _timer.Start(); + } + } + } +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs index 228d7bd0c..83f277e3d 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -11,68 +11,149 @@ namespace Aurora.Profiles.EliteDangerous.Layers { - public class EliteDangerousKeyBindsHandlerProperties : LayerHandlerProperties2Color + public class + EliteDangerousKeyBindsHandlerProperties : LayerHandlerProperties2Color { public Color? _HudModeCombatColor { get; set; } - public Color HudModeCombatColor { get { return Logic._HudModeCombatColor ?? _HudModeCombatColor ?? Color.Empty; } } - + + public Color HudModeCombatColor + { + get { return Logic._HudModeCombatColor ?? _HudModeCombatColor ?? Color.Empty; } + } + public Color? _HudModeDiscoveryColor { get; set; } - public Color HudModeDiscoveryColor { get { return Logic._HudModeDiscoveryColor ?? _HudModeDiscoveryColor ?? Color.Empty; } } - + + public Color HudModeDiscoveryColor + { + get { return Logic._HudModeDiscoveryColor ?? _HudModeDiscoveryColor ?? Color.Empty; } + } + public Color? _NoneColor { get; set; } - public Color NoneColor { get { return Logic._NoneColor ?? _NoneColor ?? Color.Empty; } } - + + public Color NoneColor + { + get { return Logic._NoneColor ?? _NoneColor ?? Color.Empty; } + } + public Color? _OtherColor { get; set; } - public Color OtherColor { get { return Logic._OtherColor ?? _OtherColor ?? Color.Empty; } } - + + public Color OtherColor + { + get { return Logic._OtherColor ?? _OtherColor ?? Color.Empty; } + } + public Color? _UiColor { get; set; } - public Color UiColor { get { return Logic._UiColor ?? _UiColor ?? Color.Empty; } } - + + public Color UiColor + { + get { return Logic._UiColor ?? _UiColor ?? Color.Empty; } + } + public Color? _UiAltColor { get; set; } - public Color UiAltColor { get { return Logic._UiAltColor ?? _UiAltColor ?? Color.Empty; } } - + + public Color UiAltColor + { + get { return Logic._UiAltColor ?? _UiAltColor ?? Color.Empty; } + } + public Color? _ShipStuffColor { get; set; } - public Color ShipStuffColor { get { return Logic._ShipStuffColor ?? _ShipStuffColor ?? Color.Empty; } } - + + public Color ShipStuffColor + { + get { return Logic._ShipStuffColor ?? _ShipStuffColor ?? Color.Empty; } + } + public Color? _CameraColor { get; set; } - public Color CameraColor { get { return Logic._CameraColor ?? _CameraColor ?? Color.Empty; } } - + + public Color CameraColor + { + get { return Logic._CameraColor ?? _CameraColor ?? Color.Empty; } + } + public Color? _DefenceColor { get; set; } - public Color DefenceColor { get { return Logic._DefenceColor ?? _DefenceColor ?? Color.Empty; } } - + + public Color DefenceColor + { + get { return Logic._DefenceColor ?? _DefenceColor ?? Color.Empty; } + } + public Color? _DefenceDimmedColor { get; set; } - public Color DefenceDimmedColor { get { return Logic._DefenceDimmedColor ?? _DefenceDimmedColor ?? Color.Empty; } } - + + public Color DefenceDimmedColor + { + get { return Logic._DefenceDimmedColor ?? _DefenceDimmedColor ?? Color.Empty; } + } + public Color? _OffenceColor { get; set; } - public Color OffenceColor { get { return Logic._OffenceColor ?? _OffenceColor ?? Color.Empty; } } - + + public Color OffenceColor + { + get { return Logic._OffenceColor ?? _OffenceColor ?? Color.Empty; } + } + public Color? _OffenceDimmedColor { get; set; } - public Color OffenceDimmedColor { get { return Logic._OffenceDimmedColor ?? _OffenceDimmedColor ?? Color.Empty; } } - + + public Color OffenceDimmedColor + { + get { return Logic._OffenceDimmedColor ?? _OffenceDimmedColor ?? Color.Empty; } + } + public Color? _MovementSpeedColor { get; set; } - public Color MovementSpeedColor { get { return Logic._MovementSpeedColor ?? _MovementSpeedColor ?? Color.Empty; } } - + + public Color MovementSpeedColor + { + get { return Logic._MovementSpeedColor ?? _MovementSpeedColor ?? Color.Empty; } + } + public Color? _MovementSpeedDimmedColor { get; set; } - public Color MovementSpeedDimmedColor { get { return Logic._MovementSpeedDimmedColor ?? _MovementSpeedDimmedColor ?? Color.Empty; } } - + + public Color MovementSpeedDimmedColor + { + get { return Logic._MovementSpeedDimmedColor ?? _MovementSpeedDimmedColor ?? Color.Empty; } + } + public Color? _MovementSecondaryColor { get; set; } - public Color MovementSecondaryColor { get { return Logic._MovementSecondaryColor ?? _MovementSecondaryColor ?? Color.Empty; } } - + + public Color MovementSecondaryColor + { + get { return Logic._MovementSecondaryColor ?? _MovementSecondaryColor ?? Color.Empty; } + } + public Color? _WingColor { get; set; } - public Color WingColor { get { return Logic._WingColor ?? _WingColor ?? Color.Empty; } } - + + public Color WingColor + { + get { return Logic._WingColor ?? _WingColor ?? Color.Empty; } + } + public Color? _NavigationColor { get; set; } - public Color NavigationColor { get { return Logic._NavigationColor ?? _NavigationColor ?? Color.Empty; } } - + + public Color NavigationColor + { + get { return Logic._NavigationColor ?? _NavigationColor ?? Color.Empty; } + } + public Color? _ModeEnableColor { get; set; } - public Color ModeEnableColor { get { return Logic._ModeEnableColor ?? _ModeEnableColor ?? Color.Empty; } } - + + public Color ModeEnableColor + { + get { return Logic._ModeEnableColor ?? _ModeEnableColor ?? Color.Empty; } + } + public Color? _ModeDisableColor { get; set; } - public Color ModeDisableColor { get { return Logic._ModeDisableColor ?? _ModeDisableColor ?? Color.Empty; } } - - public EliteDangerousKeyBindsHandlerProperties() : base() { } - public EliteDangerousKeyBindsHandlerProperties(bool assign_default = false) : base(assign_default) { } + public Color ModeDisableColor + { + get { return Logic._ModeDisableColor ?? _ModeDisableColor ?? Color.Empty; } + } + + public EliteDangerousKeyBindsHandlerProperties() : base() + { + } + + public EliteDangerousKeyBindsHandlerProperties(bool assign_default = false) : base(assign_default) + { + } public override void Default() { @@ -97,29 +178,30 @@ public override void Default() this._ModeEnableColor = Color.FromArgb(153, 167, 255); this._ModeDisableColor = Color.FromArgb(61, 88, 156); } - - public Color GetColorByVariableName(string colorVariableName) { + + public Color GetColorByVariableName(string colorVariableName) + { switch (@colorVariableName) { - case "HudModeCombatColor": return HudModeCombatColor; - case "HudModeDiscoveryColor": return HudModeDiscoveryColor; - case "NoneColor": return NoneColor; - case "OtherColor": return OtherColor; - case "UiColor": return UiColor; - case "UiAltColor": return UiAltColor; - case "ShipStuffColor": return ShipStuffColor; - case "CameraColor": return CameraColor; - case "DefenceColor": return DefenceColor; - case "DefenceDimmedColor": return DefenceDimmedColor; - case "OffenceColor": return OffenceColor; - case "OffenceDimmedColor": return OffenceDimmedColor; - case "MovementSpeedColor": return MovementSpeedColor; - case "MovementSpeedDimmedColor": return MovementSpeedDimmedColor; - case "MovementSecondaryColor": return MovementSecondaryColor; - case "WingColor": return WingColor; - case "NavigationColor": return NavigationColor; - case "ModeEnableColor": return ModeEnableColor; - case "ModeDisableColor": return ModeDisableColor; + case "HudModeCombatColor": return HudModeCombatColor; + case "HudModeDiscoveryColor": return HudModeDiscoveryColor; + case "NoneColor": return NoneColor; + case "OtherColor": return OtherColor; + case "UiColor": return UiColor; + case "UiAltColor": return UiAltColor; + case "ShipStuffColor": return ShipStuffColor; + case "CameraColor": return CameraColor; + case "DefenceColor": return DefenceColor; + case "DefenceDimmedColor": return DefenceDimmedColor; + case "OffenceColor": return OffenceColor; + case "OffenceDimmedColor": return OffenceDimmedColor; + case "MovementSpeedColor": return MovementSpeedColor; + case "MovementSpeedDimmedColor": return MovementSpeedDimmedColor; + case "MovementSecondaryColor": return MovementSecondaryColor; + case "WingColor": return WingColor; + case "NavigationColor": return NavigationColor; + case "ModeEnableColor": return ModeEnableColor; + case "ModeDisableColor": return ModeDisableColor; } return NoneColor; @@ -131,29 +213,227 @@ public class EliteDangerousKeyBindsLayerHandler : LayerHandler gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("MovementSpeedColor", new[] + { + Command.UseBoostJuice + }, new StatusState(Flag.NONE, + Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.LANDING_GEAR | Flag.CARGO_SCOOP + )), + new ControlGroup("MovementSecondaryColor", new[] + { + Command.RollLeftButton, Command.RollRightButton, Command.PitchUpButton, Command.PitchDownButton + }, new StatusState(Flag.NONE, + Flag.DOCKED | Flag.LANDED_PLANET + )), + new ControlGroup("MovementSecondaryColor", new[] + { + Command.LeftThrustButton, Command.RightThrustButton, Command.UpThrustButton, Command.DownThrustButton, + Command.ForwardThrustButton, Command.BackwardThrustButton + }, new StatusState(Flag.NONE, + Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE + )), + new ControlGroup("MovementSecondaryColor", new[] + { + Command.OrderFollow + }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), + new ControlGroup("UiColor", new[] + { + Command.FocusLeftPanel, Command.FocusCommsPanel, Command.QuickCommsPanel, + Command.FocusRadarPanel, Command.FocusRightPanel, Command.UI_Select, Command.PlayerHUDModeToggle + }), + new ControlGroup("UiColor", new[] + { + Command.UI_Left, Command.UI_Right, Command.UI_Up, Command.UI_Down + }, new StatusState( + Flag.DOCKED + )), + new ControlGroup("UiColor", new[] + { + Command.UI_Left, Command.UI_Right, Command.UI_Up, Command.UI_Down + }, new StatusState( + Flag.LANDED_PLANET + )), + new ControlGroup("UiColor", new[] + { + Command.OrderAggressiveBehaviour + }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("NavigationColor", new[] + { + Command.GalaxyMapOpen, Command.SystemMapOpen, Command.TargetNextRouteSystem + }), + new ControlGroup("NavigationColor", new[] + { + Command.HyperSuperCombination, Command.Supercruise, Command.Hyperspace + }, new StatusState(Flag.NONE, + Flag.DOCKED | Flag.LANDED_PLANET | Flag.MASS_LOCK | Flag.LANDING_GEAR | Flag.HARDPOINTS | + Flag.CARGO_SCOOP + )), + new ControlGroup("NavigationColor", new[] + { + Command.OrderRequestDock + }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), + new ControlGroup("ShipStuffColor", new[] + { + Command.ShipSpotLightToggle, Command.HeadlightsBuggyButton, Command.NightVisionToggle + }), + new ControlGroup("ShipStuffColor", new[] + { + Command.ToggleFlightAssist + }, new StatusState(Flag.NONE, + Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE + )), + + new ControlGroup("ShipStuffColor", new[] + { + Command.ToggleCargoScoop, Command.LandingGearToggle + }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.IN_FIGHTER)), + + new ControlGroup("ShipStuffColor", new[] + { + Command.ToggleCargoScoop_Buggy + }, new StatusState(Flag.IN_SRV, Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.IN_FIGHTER)), + + new ControlGroup("DefenceColor", new[] + { + Command.IncreaseSystemsPower, Command.ChargeECM + }, new StatusState(Flag.NONE, + Flag.DOCKED | Flag.LANDED_PLANET + )), + new ControlGroup("DefenceColor", new[] + { + Command.FireChaffLauncher + }, + new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE, + () => gameState.Journal.hasChaff)), + new ControlGroup("DefenceColor", new[] + { + Command.DeployHeatSink + }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET, () => gameState.Journal.hasHeatSink)), + new ControlGroup("DefenceColor", new[] + { + Command.UseShieldCell + }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET, () => gameState.Journal.hasShieldCellBank)), + new ControlGroup("DefenceColor", new[] + { + Command.OrderDefensiveBehaviour + }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("OffenceColor", new[] + { + Command.CycleFireGroupPrevious }), - new ControlGroup("MovementSpeedColor", new [] { - Bind.EliteBindName.ForwardKey, Bind.EliteBindName.BackwardKey, Bind.EliteBindName.IncreaseEnginesPower, Bind.EliteBindName.SetSpeedZero, - Bind.EliteBindName.SetSpeed25, Bind.EliteBindName.SetSpeed50, Bind.EliteBindName.SetSpeed75, Bind.EliteBindName.SetSpeed100 - }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET)), - new ControlGroup("MovementSpeedColor", new [] { - Bind.EliteBindName.SetSpeedMinus100, Bind.EliteBindName.SetSpeedMinus75, Bind.EliteBindName.SetSpeedMinus50, - Bind.EliteBindName.SetSpeedMinus25, Bind.EliteBindName.AutoBreakBuggyButton - }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE)), - new ControlGroup("MovementSpeedColor", new [] { - Bind.EliteBindName.OrderHoldPosition - }, new StatusState(() => - { - if(gameState != null) return gameState.Journal.fighterStatus != FighterStatus.None; - return false; - })) + new ControlGroup("OffenceColor", new[] + { + Command.IncreaseWeaponsPower, Command.CycleFireGroupNext, Command.SelectHighestThreat, + Command.CycleNextSubsystem, Command.CyclePreviousSubsystem, Command.CycleNextHostileTarget, + Command.CyclePreviousHostileTarget + }, new StatusState(Flag.NONE, + Flag.DOCKED | Flag.LANDED_PLANET + )), + new ControlGroup("OffenceColor", new[] + { + Command.DeployHardpointToggle + }, new StatusState(Flag.NONE, + Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE + )), + new ControlGroup("OffenceColor", new[] + { + Command.OrderFocusTarget + }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("WingColor", new[] + { + Command.TargetWingman0, Command.TargetWingman1, + Command.TargetWingman2, Command.SelectTargetsTarget, Command.WingNavLock + }, new StatusState(Flag.IN_WING + )), + new ControlGroup("WingColor", new[] + { + Command.OrderHoldFire + }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("ModeEnableColor", new[] + { + Command.ExplorationFSSEnter + }, new StatusState(Flag.SUPERCRUISE | Flag.HUD_DISCOVERY_MODE, Flag.DOCKED | Flag.LANDED_PLANET)) }; - + + private Dictionary blinkingKeys = new Dictionary() + { + { + Command.LandingGearToggle, new StatusState( + Flag.LANDING_GEAR, + Flag.DOCKED | Flag.LANDED_PLANET + ) + }, + { + Command.DeployHardpointToggle, new StatusState( + Flag.HARDPOINTS, + Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.IN_FIGHTER | Flag.IN_SRV + ) + }, + { + Command.ToggleCargoScoop, new StatusState( + Flag.CARGO_SCOOP, + Flag.DOCKED | Flag.LANDED_PLANET + ) + }, + { + Command.ToggleCargoScoop_Buggy, new StatusState( + Flag.CARGO_SCOOP, + Flag.DOCKED | Flag.LANDED_PLANET + ) + }, + { + Command.ShipSpotLightToggle, new StatusState( + Flag.SHIP_LIGHTS + ) + }, + { + Command.HeadlightsBuggyButton, new StatusState( + Flag.SHIP_LIGHTS + ) + }, + { + Command.NightVisionToggle, new StatusState( + Flag.NIGHT_VISION + ) + }, + { + Command.AutoBreakBuggyButton, new StatusState( + Flag.IN_SRV | Flag.SRV_HANDBRAKE + ) + } + }; + public EliteDangerousKeyBindsLayerHandler() : base() { _ID = "EliteDangerousKeyBinds"; @@ -166,7 +446,8 @@ protected override UserControl CreateControl() private float GetBlinkStep() { - float animationPosition = Utils.Time.GetMillisecondsSinceEpoch() % (10000L / blinkSpeed) / (10000.0f / blinkSpeed); + float animationPosition = + Utils.Time.GetMillisecondsSinceEpoch() % (10000L / blinkSpeed) / (10000.0f / blinkSpeed); float animationStep = animationPosition * 2; return animationStep > 1 ? 1F + (1F - animationStep) : animationStep; } @@ -174,12 +455,12 @@ private float GetBlinkStep() private Color GetBlinkingColor(Color baseColor) { return Utils.ColorUtils.BlendColors( - this.Properties.ShipStuffColor, + baseColor, Color.FromArgb( 0, - this.Properties.ShipStuffColor.R, - this.Properties.ShipStuffColor.G, - this.Properties.ShipStuffColor.B + baseColor.R, + baseColor.G, + baseColor.B ), GetBlinkStep() ); @@ -196,25 +477,23 @@ public override EffectLayer Render(IGameState state) } GSI.Nodes.Controls controls = (state as GameState_EliteDangerous).Controls; - foreach(KeyValuePair entry in controls.commandToBind) + foreach (KeyValuePair entry in controls.commandToBind) { foreach (ControlGroup group in commandGroups) { if (group.ConditionSatisfied(gameState.Status) && group.commands.Contains(entry.Key)) { + bool blinkingKey = blinkingKeys.ContainsKey(entry.Key) && + blinkingKeys[entry.Key].ConditionSatisfied(gameState.Status); + foreach (Bind.Mapping mapping in entry.Value.mappings) { - keyBindsLayer.Set(mapping.key, group.color); + keyBindsLayer.Set(mapping.key, blinkingKey ? GetBlinkingColor(group.color) : group.color); } } } } -// keyBindsLayer.Set(DeviceKeys.C, this.Properties.ShipStuffColor); -// keyBindsLayer.Set(DeviceKeys.V, this.Properties.DefenceColor); -// keyBindsLayer.Set(DeviceKeys.B, this.Properties.DefenceDimmedColor); -// keyBindsLayer.Set(DeviceKeys.A, GetBlinkingColor(Properties.ShipStuffColor)); - return keyBindsLayer; } @@ -224,4 +503,4 @@ public override void SetApplication(Application profile) base.SetApplication(profile); } } -} +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj index 30412bbe9..7cbe9c185 100755 --- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj +++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj @@ -461,6 +461,8 @@ + + Control_EliteDangerousBackgroundLayer.xaml From c7d8c014c61f98932c76739ec42813ab5fc35565 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Tue, 27 Aug 2019 00:23:48 +0300 Subject: [PATCH 015/445] Better storage and handling of control groups - added control groups for the galaxy and system maps --- .../EliteDangerous/GSI/Nodes/Controls.cs | 53 +++++++----- .../EliteDangerous/GSI/Nodes/Status.cs | 50 +++++++++++- .../EliteDangerousKeyBindsLayerHandler.cs | 80 +++++++++++++++---- 3 files changed, 146 insertions(+), 37 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs index c2760dadc..210fa8750 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs @@ -3,6 +3,7 @@ using System.Linq; using Aurora.Devices; using CSScriptLibrary; +using Microsoft.Scripting.Utils; namespace Aurora.Profiles.EliteDangerous.GSI.Nodes { @@ -424,37 +425,51 @@ public void AddMapping(Mapping mapping) } } - public class ControlGroup + public class ControlGroupSet : NeedsStatusState { - public string colorGroupName; - public Color color; - public List commands; - public StatusState neededStatusState; + public ControlGroup[] controlGroups; - public ControlGroup(string colorGroupName, string[] commands) : this(colorGroupName, commands, null) + public ControlGroupSet(ControlGroupSet copyFromSet, ControlGroup[] controlGroups, + StatusState neededStatusState = null) { + List controlGroupList = new List(); + controlGroupList.AddRange(copyFromSet.controlGroups); + controlGroupList.AddRange(controlGroups); + + this.controlGroups = controlGroupList.ToArray(); + + if (neededStatusState != null) + { + this.neededStatusState = neededStatusState; + } + else if (copyFromSet.neededStatusState != null) + { + this.neededStatusState = copyFromSet.neededStatusState; + } } - public ControlGroup(string colorGroupName, string[] commands, StatusState neededStatusState) + public ControlGroupSet(ControlGroup[] controlGroups, StatusState neededStatusState = null) : base( + neededStatusState) { - this.colorGroupName = colorGroupName; - this.commands = commands.ToList(); - this.neededStatusState = neededStatusState; + this.controlGroups = controlGroups; } + } - public bool ConditionSatisfied(Status status) + public class ControlGroup : NeedsStatusState + { + public string colorGroupName; + public Color color; + public List commands; + + public ControlGroup(string colorGroupName, string[] commands) : this(colorGroupName, commands, null) { - return ConditionSatisfied(status.Flags, status.GuiFocus); } - public bool ConditionSatisfied(long flags, int guiFocus) + public ControlGroup(string colorGroupName, string[] commands, StatusState neededStatusState) : base( + neededStatusState) { - if (neededStatusState != null) - { - return neededStatusState.ConditionSatisfied(flags, guiFocus); - } - - return true; + this.colorGroupName = colorGroupName; + this.commands = commands.ToList(); } } diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs index 74b12d625..4b67f07be 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs @@ -2,6 +2,36 @@ namespace Aurora.Profiles.EliteDangerous.GSI.Nodes { + + public class NeedsStatusState + { + public StatusState neededStatusState; + + public NeedsStatusState() + { + } + + public NeedsStatusState(StatusState neededStatusState) + { + this.neededStatusState = neededStatusState; + } + + public bool ConditionSatisfied(Status status) + { + return ConditionSatisfied(status.Flags, status.GuiFocus); + } + + public bool ConditionSatisfied(long flags, int guiFocus) + { + if (neededStatusState != null) + { + return neededStatusState.ConditionSatisfied(flags, guiFocus); + } + + return true; + } + } + public class StatusState { long flagsSet = -1; @@ -17,8 +47,11 @@ public StatusState(long flagsSet, long flagsNotSet, Func conditionCallback flagsNotSet, conditionCallback) { } + public StatusState(int guiFocus) : this(Flag.NONE, guiFocus, Flag.NONE) + { + } - public StatusState(long flagsSet, int guiFocus, long flagsNotSet, Func conditionCallback) + public StatusState(long flagsSet, int guiFocus, long flagsNotSet, Func conditionCallback = null) { this.flagsSet = flagsSet; this.guiFocus = guiFocus; @@ -101,6 +134,21 @@ public static bool IsFlagSet(long bitmask, long flag) } } + public static class GuiFocus { + public static readonly int NONE = 0; + public static readonly int PANEL_SYSTEMS = 1; + public static readonly int PANEL_NAV = 2; + public static readonly int PANEL_COMS = 3; + public static readonly int PANEL_ROLE = 4; + public static readonly int STATION_SERVICES = 5; + + public static readonly int MAP_GALAXY = 6; + public static readonly int MAP_SYSTEM = 7; + public static readonly int MAP_ORRERY = 8; + public static readonly int MODE_FSS = 9; + public static readonly int MODE_ADS = 10; + } + /// /// Class representing player status /// diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs index 83f277e3d..23e4b16f3 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using Aurora.EffectsEngine; using Aurora.Settings.Layers; using System.Drawing; @@ -213,7 +214,7 @@ public class EliteDangerousKeyBindsLayerHandler : LayerHandler gameState.Journal.hasHeatSink)), new ControlGroup("DefenceColor", new[] - { - Command.UseShieldCell - }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET, () => gameState.Journal.hasShieldCellBank)), + { + Command.UseShieldCell + }, + new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET, + () => gameState.Journal.hasShieldCellBank)), new ControlGroup("DefenceColor", new[] { Command.OrderDefensiveBehaviour @@ -384,6 +388,43 @@ public class EliteDangerousKeyBindsLayerHandler : LayerHandler blinkingKeys = new Dictionary() @@ -469,26 +510,31 @@ private Color GetBlinkingColor(Color baseColor) public override EffectLayer Render(IGameState state) { gameState = state as GameState_EliteDangerous; + GSI.Nodes.Controls controls = (state as GameState_EliteDangerous).Controls; + EffectLayer keyBindsLayer = new EffectLayer("Elite: Dangerous - Key Binds"); - foreach (ControlGroup group in commandGroups) + foreach (ControlGroupSet controlGroupSet in controlGroupSets) { - group.color = Properties.GetColorByVariableName(group.colorGroupName); - } + if (!controlGroupSet.ConditionSatisfied(gameState.Status)) continue; - GSI.Nodes.Controls controls = (state as GameState_EliteDangerous).Controls; - foreach (KeyValuePair entry in controls.commandToBind) - { - foreach (ControlGroup group in commandGroups) + foreach (ControlGroup controlGroup in controlGroupSet.controlGroups) { - if (group.ConditionSatisfied(gameState.Status) && group.commands.Contains(entry.Key)) + controlGroup.color = Properties.GetColorByVariableName(controlGroup.colorGroupName); + + if (!controlGroup.ConditionSatisfied(gameState.Status)) continue; + + foreach (string command in controlGroup.commands) { - bool blinkingKey = blinkingKeys.ContainsKey(entry.Key) && - blinkingKeys[entry.Key].ConditionSatisfied(gameState.Status); + if (!controls.commandToBind.ContainsKey(command)) continue; + + bool blinkingKey = blinkingKeys.ContainsKey(command) && + blinkingKeys[command].ConditionSatisfied(gameState.Status); - foreach (Bind.Mapping mapping in entry.Value.mappings) + foreach (Bind.Mapping mapping in controls.commandToBind[command].mappings) { - keyBindsLayer.Set(mapping.key, blinkingKey ? GetBlinkingColor(group.color) : group.color); + keyBindsLayer.Set(mapping.key, + blinkingKey ? GetBlinkingColor(controlGroup.color) : controlGroup.color); } } } From 0208093c2c2c8cafc6e7723fb4d7a3ed83c6612e Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Tue, 27 Aug 2019 00:49:02 +0300 Subject: [PATCH 016/445] Highlight modifier keys --- .../Layers/EliteDangerousKeyBindsLayerHandler.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs index 23e4b16f3..b649aa197 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -4,6 +4,7 @@ using Aurora.EffectsEngine; using Aurora.Settings.Layers; using System.Drawing; +using System.Linq; using System.Windows.Controls; using Aurora.Devices; using Aurora.Profiles.EliteDangerous.GSI; @@ -533,6 +534,20 @@ public override EffectLayer Render(IGameState state) foreach (Bind.Mapping mapping in controls.commandToBind[command].mappings) { + bool allModifiersPressed = true; + foreach (DeviceKeys modifierKey in mapping.modifiers) + { + keyBindsLayer.Set(modifierKey, Properties.ShipStuffColor); + //TODO: A correct check if a modifier key is pressed + if (Array.IndexOf(Global.InputEvents.PressedKeys, modifierKey) == -1) + { + allModifiersPressed = false; + break; + } + } + + if (!allModifiersPressed) continue; + keyBindsLayer.Set(mapping.key, blinkingKey ? GetBlinkingColor(controlGroup.color) : controlGroup.color); } From 858808011e7940c46155a470cd64dc1974ab7411 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Tue, 27 Aug 2019 00:54:47 +0300 Subject: [PATCH 017/445] Properly detect if all modifier keys are pressed before highlighting --- .../Layers/EliteDangerousKeyBindsLayerHandler.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs index b649aa197..c6f388f36 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -6,9 +6,11 @@ using System.Drawing; using System.Linq; using System.Windows.Controls; +using System.Windows.Input; using Aurora.Devices; using Aurora.Profiles.EliteDangerous.GSI; using Aurora.Profiles.EliteDangerous.GSI.Nodes; +using Aurora.Utils; using CSScriptLibrary; namespace Aurora.Profiles.EliteDangerous.Layers @@ -538,8 +540,7 @@ public override EffectLayer Render(IGameState state) foreach (DeviceKeys modifierKey in mapping.modifiers) { keyBindsLayer.Set(modifierKey, Properties.ShipStuffColor); - //TODO: A correct check if a modifier key is pressed - if (Array.IndexOf(Global.InputEvents.PressedKeys, modifierKey) == -1) + if (Array.IndexOf(Global.InputEvents.PressedKeys, KeyUtils.GetFormsKey(modifierKey)) == -1) { allModifiersPressed = false; break; From 015d42af327cd57e49f6dcb97efc2113fc0077a3 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Wed, 28 Aug 2019 19:49:18 +0300 Subject: [PATCH 018/445] Refactored where key and control group presets are stored - changed how game state is checked --- .../GSI/GameState_EliteDangerous.cs | 83 +++++- .../EliteDangerous/GSI/Nodes/Controls.cs | 22 +- .../EliteDangerous/GSI/Nodes/Status.cs | 139 ++------- .../EliteDangerousKeyBindsLayerHandler.cs | 272 +---------------- .../Profiles/EliteDangerous/Presets.cs | 276 ++++++++++++++++++ .../Project-Aurora/Project-Aurora.csproj | 1 + 6 files changed, 399 insertions(+), 394 deletions(-) create mode 100644 Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Presets.cs diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs index b68b0da8b..cb7bdc136 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/GameState_EliteDangerous.cs @@ -1,13 +1,85 @@ -using Aurora.Profiles.EliteDangerous.GSI.Nodes; +using System; +using Aurora.Profiles.EliteDangerous.GSI.Nodes; namespace Aurora.Profiles.EliteDangerous.GSI { + public class GameStateCondition + { + long flagsSet; + long flagsNotSet; + GuiFocus guiFocus; + private Func callback = null; + + public GameStateCondition(long flagsSet = -1, long flagsNotSet = -1, GuiFocus guiFocus = GuiFocus.UNSPECIFIED, + Func callback = null) + { + this.flagsSet = flagsSet; + this.guiFocus = guiFocus; + this.flagsNotSet = flagsNotSet; + this.callback = callback; + } + + public GameStateCondition(Func callback) + { + this.callback = callback; + } + + public bool IsSatisfied(GameState_EliteDangerous gameState) + { + if (callback != null && !callback(gameState)) + { + return false; + } + + if (guiFocus != GuiFocus.UNSPECIFIED && guiFocus != gameState.Status.GuiFocus) + { + return false; + } + + if (flagsSet != -1 && !Flag.IsFlagSet(gameState.Status.Flags, flagsSet)) + { + return false; + } + + if (flagsNotSet != -1 && Flag.IsFlagSet(gameState.Status.Flags, flagsNotSet)) + { + return false; + } + + return true; + } + } + + public class NeedsGameState + { + public GameStateCondition NeededGameStateCondition; + + public NeedsGameState() + { + } + + public NeedsGameState(GameStateCondition neededGameStateCondition) + { + this.NeededGameStateCondition = neededGameStateCondition; + } + + public bool IsSatisfied(GameState_EliteDangerous gameState) + { + if (NeededGameStateCondition != null) + { + return NeededGameStateCondition.IsSatisfied(gameState); + } + + return true; + } + } + public class GameState_EliteDangerous : GameState { private Status status; private Journal journal; private Nodes.Controls controls; - + public Journal Journal { get @@ -18,7 +90,7 @@ public Journal Journal return journal; } } - + public Status Status { get @@ -29,7 +101,7 @@ public Status Status return status; } } - + public Nodes.Controls Controls { get @@ -40,6 +112,7 @@ public Nodes.Controls Controls return controls; } } + /// /// Creates a default GameState_EliteDangerous instance. /// @@ -47,4 +120,4 @@ public GameState_EliteDangerous() : base() { } } -} +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs index 210fa8750..ad098fb4d 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Controls.cs @@ -425,12 +425,12 @@ public void AddMapping(Mapping mapping) } } - public class ControlGroupSet : NeedsStatusState + public class ControlGroupSet : NeedsGameState { public ControlGroup[] controlGroups; public ControlGroupSet(ControlGroupSet copyFromSet, ControlGroup[] controlGroups, - StatusState neededStatusState = null) + GameStateCondition neededGameStateCondition = null) { List controlGroupList = new List(); controlGroupList.AddRange(copyFromSet.controlGroups); @@ -438,24 +438,24 @@ public ControlGroupSet(ControlGroupSet copyFromSet, ControlGroup[] controlGroups this.controlGroups = controlGroupList.ToArray(); - if (neededStatusState != null) + if (neededGameStateCondition != null) { - this.neededStatusState = neededStatusState; + this.NeededGameStateCondition = neededGameStateCondition; } - else if (copyFromSet.neededStatusState != null) + else if (copyFromSet.NeededGameStateCondition != null) { - this.neededStatusState = copyFromSet.neededStatusState; + this.NeededGameStateCondition = copyFromSet.NeededGameStateCondition; } } - public ControlGroupSet(ControlGroup[] controlGroups, StatusState neededStatusState = null) : base( - neededStatusState) + public ControlGroupSet(ControlGroup[] controlGroups, GameStateCondition neededGameStateCondition = null) : base( + neededGameStateCondition) { this.controlGroups = controlGroups; } } - public class ControlGroup : NeedsStatusState + public class ControlGroup : NeedsGameState { public string colorGroupName; public Color color; @@ -465,8 +465,8 @@ public ControlGroup(string colorGroupName, string[] commands) : this(colorGroupN { } - public ControlGroup(string colorGroupName, string[] commands, StatusState neededStatusState) : base( - neededStatusState) + public ControlGroup(string colorGroupName, string[] commands, GameStateCondition neededGameStateCondition) : base( + neededGameStateCondition) { this.colorGroupName = colorGroupName; this.commands = commands.ToList(); diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs index 4b67f07be..0992417e0 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/GSI/Nodes/Status.cs @@ -2,102 +2,9 @@ namespace Aurora.Profiles.EliteDangerous.GSI.Nodes { - - public class NeedsStatusState - { - public StatusState neededStatusState; - - public NeedsStatusState() - { - } - - public NeedsStatusState(StatusState neededStatusState) - { - this.neededStatusState = neededStatusState; - } - - public bool ConditionSatisfied(Status status) - { - return ConditionSatisfied(status.Flags, status.GuiFocus); - } - - public bool ConditionSatisfied(long flags, int guiFocus) - { - if (neededStatusState != null) - { - return neededStatusState.ConditionSatisfied(flags, guiFocus); - } - - return true; - } - } - - public class StatusState - { - long flagsSet = -1; - long flagsNotSet = -1; - int guiFocus = -1; - private Func conditionCallback = null; - - public StatusState(long flagsSet, long flagsNotSet = -1) : this(flagsSet, -1, flagsNotSet, null) - { - } - - public StatusState(long flagsSet, long flagsNotSet, Func conditionCallback) : this(flagsSet, -1, - flagsNotSet, conditionCallback) - { - } - public StatusState(int guiFocus) : this(Flag.NONE, guiFocus, Flag.NONE) - { - } - - public StatusState(long flagsSet, int guiFocus, long flagsNotSet, Func conditionCallback = null) - { - this.flagsSet = flagsSet; - this.guiFocus = guiFocus; - this.flagsNotSet = flagsNotSet; - this.conditionCallback = conditionCallback; - } - - public StatusState(Func conditionCallback) - { - this.conditionCallback = conditionCallback; - } - - public bool ConditionSatisfied(Status status) - { - return ConditionSatisfied(status.Flags, status.GuiFocus); - } - - public bool ConditionSatisfied(long flags, int guiFocus) - { - if (conditionCallback != null && !conditionCallback()) - { - return false; - } - - if (this.guiFocus != -1 && this.guiFocus != guiFocus) - { - return false; - } - - if (this.flagsSet != -1 && !Flag.IsFlagSet(flags, this.flagsSet)) - { - return false; - } - - if (this.flagsNotSet != -1 && Flag.IsFlagSet(flags, this.flagsNotSet)) - { - return false; - } - - return true; - } - } - public static class Flag { - public static readonly int NONE = -1; + public static readonly int UNSPECIFIED = -1; public static readonly int DOCKED = 1; public static readonly int LANDED_PLANET = 1 << 1; public static readonly int LANDING_GEAR = 1 << 2; @@ -134,21 +41,29 @@ public static bool IsFlagSet(long bitmask, long flag) } } - public static class GuiFocus { - public static readonly int NONE = 0; - public static readonly int PANEL_SYSTEMS = 1; - public static readonly int PANEL_NAV = 2; - public static readonly int PANEL_COMS = 3; - public static readonly int PANEL_ROLE = 4; - public static readonly int STATION_SERVICES = 5; - - public static readonly int MAP_GALAXY = 6; - public static readonly int MAP_SYSTEM = 7; - public static readonly int MAP_ORRERY = 8; - public static readonly int MODE_FSS = 9; - public static readonly int MODE_ADS = 10; + public enum GuiFocus + { + UNSPECIFIED = -1, + NONE = 0, + PANEL_SYSTEMS = 1, + PANEL_NAV = 2, + PANEL_COMS = 3, + PANEL_ROLE = 4, + STATION_SERVICES = 5, + + MAP_GALAXY = 6, + MAP_SYSTEM = 7, + MAP_ORRERY = 8, + MODE_FSS = 9, + MODE_ADS = 10 } + public class Fuel + { + public double FuelMain; + public double FuelReservoir; + } + /// /// Class representing player status /// @@ -159,14 +74,8 @@ public class Status : Node public long Flags; public int[] Pips; public int FireGroup; - public int GuiFocus; - public FuelClass Fuel; + public GuiFocus GuiFocus; + public Fuel Fuel; public double Cargo; - - public class FuelClass - { - public double FuelMain; - public double FuelReservoir; - } } } \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs index c6f388f36..7a2008eb7 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/EliteDangerousKeyBindsLayerHandler.cs @@ -215,267 +215,12 @@ public Color GetColorByVariableName(string colorVariableName) public class EliteDangerousKeyBindsLayerHandler : LayerHandler { private int blinkSpeed = 20; - public static GameState_EliteDangerous gameState = null; - - private static ControlGroupSet CONTROLS_MAIN = new ControlGroupSet(new ControlGroup[] - { - new ControlGroup("CameraColor", new[] - { - Command.PhotoCameraToggle, Command.PhotoCameraToggle_Buggy, Command.VanityCameraScrollLeft, - Command.VanityCameraScrollRight, Command.ToggleFreeCam, Command.FreeCamToggleHUD, - Command.FixCameraRelativeToggle, Command.FixCameraWorldToggle - }), - new ControlGroup("MovementSpeedColor", new[] - { - Command.ForwardKey, Command.BackwardKey, Command.IncreaseEnginesPower, Command.SetSpeedZero, - Command.SetSpeed25, Command.SetSpeed50, Command.SetSpeed75, Command.SetSpeed100 - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET - )), - new ControlGroup("MovementSpeedColor", new[] - { - Command.SetSpeedMinus100, Command.SetSpeedMinus75, Command.SetSpeedMinus50, - Command.SetSpeedMinus25, Command.AutoBreakBuggyButton - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE - )), - new ControlGroup("MovementSpeedColor", new[] - { - Command.OrderHoldPosition - }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), - - new ControlGroup("MovementSpeedColor", new[] - { - Command.UseBoostJuice - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.LANDING_GEAR | Flag.CARGO_SCOOP - )), - new ControlGroup("MovementSecondaryColor", new[] - { - Command.RollLeftButton, Command.RollRightButton, Command.PitchUpButton, Command.PitchDownButton - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET - )), - new ControlGroup("MovementSecondaryColor", new[] - { - Command.LeftThrustButton, Command.RightThrustButton, Command.UpThrustButton, - Command.DownThrustButton, - Command.ForwardThrustButton, Command.BackwardThrustButton - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE - )), - new ControlGroup("MovementSecondaryColor", new[] - { - Command.OrderFollow - }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), - new ControlGroup("UiColor", new[] - { - Command.FocusLeftPanel, Command.FocusCommsPanel, Command.QuickCommsPanel, - Command.FocusRadarPanel, Command.FocusRightPanel, Command.UI_Select, Command.PlayerHUDModeToggle - }), - new ControlGroup("UiColor", new[] - { - Command.UI_Left, Command.UI_Right, Command.UI_Up, Command.UI_Down - }, new StatusState( - Flag.DOCKED - )), - new ControlGroup("UiColor", new[] - { - Command.UI_Left, Command.UI_Right, Command.UI_Up, Command.UI_Down - }, new StatusState( - Flag.LANDED_PLANET - )), - new ControlGroup("UiColor", new[] - { - Command.OrderAggressiveBehaviour - }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), - - new ControlGroup("NavigationColor", new[] - { - Command.GalaxyMapOpen, Command.SystemMapOpen, Command.TargetNextRouteSystem - }), - new ControlGroup("NavigationColor", new[] - { - Command.HyperSuperCombination, Command.Supercruise, Command.Hyperspace - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET | Flag.MASS_LOCK | Flag.LANDING_GEAR | Flag.HARDPOINTS | - Flag.CARGO_SCOOP - )), - new ControlGroup("NavigationColor", new[] - { - Command.OrderRequestDock - }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), - new ControlGroup("ShipStuffColor", new[] - { - Command.ShipSpotLightToggle, Command.HeadlightsBuggyButton, Command.NightVisionToggle - }), - new ControlGroup("ShipStuffColor", new[] - { - Command.ToggleFlightAssist - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE - )), - - new ControlGroup("ShipStuffColor", new[] - { - Command.ToggleCargoScoop, Command.LandingGearToggle - }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.IN_FIGHTER)), - - new ControlGroup("ShipStuffColor", new[] - { - Command.ToggleCargoScoop_Buggy - }, new StatusState(Flag.IN_SRV, Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.IN_FIGHTER)), - - new ControlGroup("DefenceColor", new[] - { - Command.IncreaseSystemsPower, Command.ChargeECM - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET - )), - new ControlGroup("DefenceColor", new[] - { - Command.FireChaffLauncher - }, - new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE, - () => gameState.Journal.hasChaff)), - new ControlGroup("DefenceColor", new[] - { - Command.DeployHeatSink - }, new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET, () => gameState.Journal.hasHeatSink)), - new ControlGroup("DefenceColor", new[] - { - Command.UseShieldCell - }, - new StatusState(Flag.NONE, Flag.DOCKED | Flag.LANDED_PLANET, - () => gameState.Journal.hasShieldCellBank)), - new ControlGroup("DefenceColor", new[] - { - Command.OrderDefensiveBehaviour - }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), - - new ControlGroup("OffenceColor", new[] - { - Command.CycleFireGroupPrevious - }), - new ControlGroup("OffenceColor", new[] - { - Command.IncreaseWeaponsPower, Command.CycleFireGroupNext, Command.SelectHighestThreat, - Command.CycleNextSubsystem, Command.CyclePreviousSubsystem, Command.CycleNextHostileTarget, - Command.CyclePreviousHostileTarget - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET - )), - new ControlGroup("OffenceColor", new[] - { - Command.DeployHardpointToggle - }, new StatusState(Flag.NONE, - Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE - )), - new ControlGroup("OffenceColor", new[] - { - Command.OrderFocusTarget - }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), - - new ControlGroup("WingColor", new[] - { - Command.TargetWingman0, Command.TargetWingman1, - Command.TargetWingman2, Command.SelectTargetsTarget, Command.WingNavLock - }, new StatusState(Flag.IN_WING - )), - new ControlGroup("WingColor", new[] - { - Command.OrderHoldFire - }, new StatusState(() => gameState.Journal.fighterStatus != FighterStatus.None)), - - new ControlGroup("ModeEnableColor", new[] - { - Command.ExplorationFSSEnter - }, new StatusState(Flag.SUPERCRUISE | Flag.HUD_DISCOVERY_MODE, Flag.DOCKED | Flag.LANDED_PLANET)) - }, new StatusState(GuiFocus.NONE)); - - private static ControlGroupSet CONTROLS_SYSTEM_MAP = new ControlGroupSet(new[] - { - new ControlGroup("MovementSpeedColor", new[] - { - Command.CamTranslateForward, Command.CamTranslateBackward, Command.CamTranslateLeft, - Command.CamTranslateRight - }), - new ControlGroup("MovementSecondaryColor", new[] - { - Command.CamZoomIn, Command.CamZoomOut - }), - new ControlGroup("UiColor", new[] - { - Command.UI_Back, Command.UI_Select - }), - new ControlGroup("NavigationColor", new[] - { - Command.GalaxyMapOpen, Command.SystemMapOpen - }) - }, new StatusState(GuiFocus.MAP_SYSTEM)); - - private static ControlGroupSet CONTROLS_GALAXY_MAP = new ControlGroupSet(CONTROLS_SYSTEM_MAP, new[] - { - new ControlGroup("MovementSecondaryColor", new[] - { - Command.CamPitchUp, Command.CamPitchDown, Command.CamTranslateUp, Command.CamTranslateDown, - Command.CamYawLeft, Command.CamYawRight - }) - }, new StatusState(GuiFocus.MAP_GALAXY)); private ControlGroupSet[] controlGroupSets = { - CONTROLS_MAIN, - CONTROLS_SYSTEM_MAP, - CONTROLS_GALAXY_MAP - }; - - private Dictionary blinkingKeys = new Dictionary() - { - { - Command.LandingGearToggle, new StatusState( - Flag.LANDING_GEAR, - Flag.DOCKED | Flag.LANDED_PLANET - ) - }, - { - Command.DeployHardpointToggle, new StatusState( - Flag.HARDPOINTS, - Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.IN_FIGHTER | Flag.IN_SRV - ) - }, - { - Command.ToggleCargoScoop, new StatusState( - Flag.CARGO_SCOOP, - Flag.DOCKED | Flag.LANDED_PLANET - ) - }, - { - Command.ToggleCargoScoop_Buggy, new StatusState( - Flag.CARGO_SCOOP, - Flag.DOCKED | Flag.LANDED_PLANET - ) - }, - { - Command.ShipSpotLightToggle, new StatusState( - Flag.SHIP_LIGHTS - ) - }, - { - Command.HeadlightsBuggyButton, new StatusState( - Flag.SHIP_LIGHTS - ) - }, - { - Command.NightVisionToggle, new StatusState( - Flag.NIGHT_VISION - ) - }, - { - Command.AutoBreakBuggyButton, new StatusState( - Flag.IN_SRV | Flag.SRV_HANDBRAKE - ) - } + ControlGroupSets.CONTROLS_MAIN, + ControlGroupSets.CONTROLS_SYSTEM_MAP, + ControlGroupSets.CONTROLS_GALAXY_MAP }; public EliteDangerousKeyBindsLayerHandler() : base() @@ -512,27 +257,28 @@ private Color GetBlinkingColor(Color baseColor) public override EffectLayer Render(IGameState state) { - gameState = state as GameState_EliteDangerous; + GameState_EliteDangerous gameState = state as GameState_EliteDangerous; + GSI.Nodes.Controls controls = (state as GameState_EliteDangerous).Controls; EffectLayer keyBindsLayer = new EffectLayer("Elite: Dangerous - Key Binds"); foreach (ControlGroupSet controlGroupSet in controlGroupSets) { - if (!controlGroupSet.ConditionSatisfied(gameState.Status)) continue; + if (!controlGroupSet.IsSatisfied(gameState)) continue; foreach (ControlGroup controlGroup in controlGroupSet.controlGroups) { controlGroup.color = Properties.GetColorByVariableName(controlGroup.colorGroupName); - if (!controlGroup.ConditionSatisfied(gameState.Status)) continue; + if (!controlGroup.IsSatisfied(gameState)) continue; foreach (string command in controlGroup.commands) { if (!controls.commandToBind.ContainsKey(command)) continue; - bool blinkingKey = blinkingKeys.ContainsKey(command) && - blinkingKeys[command].ConditionSatisfied(gameState.Status); + bool blinkingKey = KeyPresets.BLINKING_KEYS.ContainsKey(command) && + KeyPresets.BLINKING_KEYS[command].IsSatisfied(gameState); foreach (Bind.Mapping mapping in controls.commandToBind[command].mappings) { diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Presets.cs b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Presets.cs new file mode 100644 index 000000000..b733600bd --- /dev/null +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Presets.cs @@ -0,0 +1,276 @@ +using System.Collections.Generic; +using Aurora.Profiles.EliteDangerous.GSI; +using Aurora.Profiles.EliteDangerous.GSI.Nodes; + +namespace Aurora.Profiles.EliteDangerous +{ + public class ControlGroupSets + { + public static ControlGroupSet CONTROLS_MAIN = new ControlGroupSet(new[] + { + new ControlGroup("CameraColor", new[] + { + Command.PhotoCameraToggle, Command.PhotoCameraToggle_Buggy, Command.VanityCameraScrollLeft, + Command.VanityCameraScrollRight, Command.ToggleFreeCam, Command.FreeCamToggleHUD, + Command.FixCameraRelativeToggle, Command.FixCameraWorldToggle + }), + new ControlGroup("MovementSpeedColor", new[] + { + Command.ForwardKey, Command.BackwardKey, Command.IncreaseEnginesPower, Command.SetSpeedZero, + Command.SetSpeed25, Command.SetSpeed50, Command.SetSpeed75, Command.SetSpeed100 + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET + )), + new ControlGroup("MovementSpeedColor", new[] + { + Command.SetSpeedMinus100, Command.SetSpeedMinus75, Command.SetSpeedMinus50, + Command.SetSpeedMinus25, Command.AutoBreakBuggyButton + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE + )), + new ControlGroup("MovementSpeedColor", new[] + { + Command.OrderHoldPosition + }, new GameStateCondition(callback: gameState => gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("MovementSpeedColor", new[] + { + Command.UseBoostJuice + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.LANDING_GEAR | Flag.CARGO_SCOOP + )), + new ControlGroup("MovementSecondaryColor", new[] + { + Command.RollLeftButton, Command.RollRightButton, Command.PitchUpButton, Command.PitchDownButton + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET + )), + new ControlGroup("MovementSecondaryColor", new[] + { + Command.LeftThrustButton, Command.RightThrustButton, Command.UpThrustButton, + Command.DownThrustButton, + Command.ForwardThrustButton, Command.BackwardThrustButton + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE + )), + new ControlGroup("MovementSecondaryColor", new[] + { + Command.OrderFollow + }, new GameStateCondition(callback: gameState => gameState.Journal.fighterStatus != FighterStatus.None)), + new ControlGroup("UiColor", new[] + { + Command.FocusLeftPanel, Command.FocusCommsPanel, Command.QuickCommsPanel, + Command.FocusRadarPanel, Command.FocusRightPanel, Command.UI_Select, Command.PlayerHUDModeToggle + }), + new ControlGroup("UiColor", new[] + { + Command.UI_Left, Command.UI_Right, Command.UI_Up, Command.UI_Down + }, new GameStateCondition(flagsSet: + Flag.DOCKED + )), + new ControlGroup("UiColor", new[] + { + Command.UI_Left, Command.UI_Right, Command.UI_Up, Command.UI_Down + }, new GameStateCondition(flagsSet: + Flag.LANDED_PLANET + )), + new ControlGroup("UiColor", new[] + { + Command.OrderAggressiveBehaviour + }, new GameStateCondition(callback: gameState => gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("NavigationColor", new[] + { + Command.GalaxyMapOpen, Command.SystemMapOpen, Command.TargetNextRouteSystem + }), + new ControlGroup("NavigationColor", new[] + { + Command.HyperSuperCombination, Command.Supercruise, Command.Hyperspace + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.MASS_LOCK | Flag.LANDING_GEAR | Flag.HARDPOINTS | + Flag.CARGO_SCOOP + )), + new ControlGroup("NavigationColor", new[] + { + Command.OrderRequestDock + }, new GameStateCondition(callback: gameState => gameState.Journal.fighterStatus != FighterStatus.None)), + new ControlGroup("ShipStuffColor", new[] + { + Command.ShipSpotLightToggle, Command.HeadlightsBuggyButton, Command.NightVisionToggle + }), + new ControlGroup("ShipStuffColor", new[] + { + Command.ToggleFlightAssist + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE + )), + + new ControlGroup("ShipStuffColor", new[] + { + Command.ToggleCargoScoop, Command.LandingGearToggle + }, + new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.IN_FIGHTER)), + + new ControlGroup("ShipStuffColor", new[] + { + Command.ToggleCargoScoop_Buggy + }, + new GameStateCondition(flagsSet: Flag.IN_SRV, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.IN_FIGHTER)), + + new ControlGroup("DefenceColor", new[] + { + Command.IncreaseSystemsPower, Command.ChargeECM + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET + )), + new ControlGroup("DefenceColor", new[] + { + Command.FireChaffLauncher + }, + new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE, + callback: gameState => gameState.Journal.hasChaff)), + new ControlGroup("DefenceColor", new[] + { + Command.DeployHeatSink + }, + new GameStateCondition(flagsSet: Flag.UNSPECIFIED, flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET, + callback: gameState => gameState.Journal.hasHeatSink)), + new ControlGroup("DefenceColor", new[] + { + Command.UseShieldCell + }, + new GameStateCondition(flagsSet: Flag.UNSPECIFIED, flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET, + callback: gameState => gameState.Journal.hasShieldCellBank)), + new ControlGroup("DefenceColor", new[] + { + Command.OrderDefensiveBehaviour + }, new GameStateCondition(callback: gameState => gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("OffenceColor", new[] + { + Command.CycleFireGroupPrevious + }), + new ControlGroup("OffenceColor", new[] + { + Command.IncreaseWeaponsPower, Command.CycleFireGroupNext, Command.SelectHighestThreat, + Command.CycleNextSubsystem, Command.CyclePreviousSubsystem, Command.CycleNextHostileTarget, + Command.CyclePreviousHostileTarget + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET + )), + new ControlGroup("OffenceColor", new[] + { + Command.DeployHardpointToggle + }, new GameStateCondition(flagsSet: Flag.UNSPECIFIED, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE + )), + new ControlGroup("OffenceColor", new[] + { + Command.OrderFocusTarget + }, new GameStateCondition(callback: gameState => gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("WingColor", new[] + { + Command.TargetWingman0, Command.TargetWingman1, + Command.TargetWingman2, Command.SelectTargetsTarget, Command.WingNavLock + }, new GameStateCondition(flagsSet: Flag.IN_WING + )), + new ControlGroup("WingColor", new[] + { + Command.OrderHoldFire + }, new GameStateCondition(callback: gameState => gameState.Journal.fighterStatus != FighterStatus.None)), + + new ControlGroup("ModeEnableColor", new[] + { + Command.ExplorationFSSEnter + }, + new GameStateCondition(flagsSet: Flag.SUPERCRUISE | Flag.HUD_DISCOVERY_MODE, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET)) + }, new GameStateCondition(guiFocus: GuiFocus.NONE)); + + public static ControlGroupSet CONTROLS_SYSTEM_MAP = new ControlGroupSet(new[] + { + new ControlGroup("MovementSpeedColor", new[] + { + Command.CamTranslateForward, Command.CamTranslateBackward, Command.CamTranslateLeft, + Command.CamTranslateRight + }), + new ControlGroup("MovementSecondaryColor", new[] + { + Command.CamZoomIn, Command.CamZoomOut + }), + new ControlGroup("UiColor", new[] + { + Command.UI_Back, Command.UI_Select + }), + new ControlGroup("NavigationColor", new[] + { + Command.GalaxyMapOpen, Command.SystemMapOpen + }) + }, new GameStateCondition(guiFocus: GuiFocus.MAP_SYSTEM)); + + public static ControlGroupSet CONTROLS_GALAXY_MAP = new ControlGroupSet(CONTROLS_SYSTEM_MAP, new[] + { + new ControlGroup("MovementSecondaryColor", new[] + { + Command.CamPitchUp, Command.CamPitchDown, Command.CamTranslateUp, Command.CamTranslateDown, + Command.CamYawLeft, Command.CamYawRight + }) + }, new GameStateCondition(guiFocus: GuiFocus.MAP_GALAXY)); + } + + public class KeyPresets + { + public static Dictionary BLINKING_KEYS = + new Dictionary() + { + { + Command.LandingGearToggle, new GameStateCondition(flagsSet: + Flag.LANDING_GEAR, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET + ) + }, + { + Command.DeployHardpointToggle, new GameStateCondition(flagsSet: + Flag.HARDPOINTS, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET | Flag.SUPERCRUISE | Flag.IN_FIGHTER | Flag.IN_SRV + ) + }, + { + Command.ToggleCargoScoop, new GameStateCondition(flagsSet: + Flag.CARGO_SCOOP, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET + ) + }, + { + Command.ToggleCargoScoop_Buggy, new GameStateCondition(flagsSet: + Flag.CARGO_SCOOP, + flagsNotSet: Flag.DOCKED | Flag.LANDED_PLANET + ) + }, + { + Command.ShipSpotLightToggle, new GameStateCondition(flagsSet: + Flag.SHIP_LIGHTS + ) + }, + { + Command.HeadlightsBuggyButton, new GameStateCondition(flagsSet: + Flag.SHIP_LIGHTS + ) + }, + { + Command.NightVisionToggle, new GameStateCondition(flagsSet: + Flag.NIGHT_VISION + ) + }, + { + Command.AutoBreakBuggyButton, new GameStateCondition(flagsSet: + Flag.IN_SRV | Flag.SRV_HANDBRAKE + ) + } + }; + } +} \ No newline at end of file diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj index 7cbe9c185..95405fc5e 100755 --- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj +++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj @@ -451,6 +451,7 @@ + Control_EliteDangerous.xaml From de128be0efde17db6177162efee4c9a3e869cb28 Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Wed, 28 Aug 2019 19:53:25 +0300 Subject: [PATCH 019/445] Fixed missed merge conflict notation --- Project-Aurora/Project-Aurora/Project-Aurora.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj index 78e3410cc..606c0b10a 100755 --- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj +++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj @@ -472,7 +472,6 @@ -<<<<<<< HEAD Control_EliteDangerous.xaml From e49c185cff147214221c32102cf78f530d2933bf Mon Sep 17 00:00:00 2001 From: Arturs Ziborovs Date: Wed, 28 Aug 2019 20:12:07 +0300 Subject: [PATCH 020/445] Cleaned up color settings a bit --- .../Control_EliteDangerousKeyBindsLayer.xaml | 82 ++++++++----------- ...ontrol_EliteDangerousKeyBindsLayer.xaml.cs | 65 ++++----------- .../EliteDangerousKeyBindsLayerHandler.cs | 47 +---------- 3 files changed, 52 insertions(+), 142 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml index 3cc8c1b8b..40f985238 100644 --- a/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml +++ b/Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Layers/Control_EliteDangerousKeyBindsLayer.xaml @@ -18,6 +18,8 @@ + + @@ -25,52 +27,40 @@ - -