diff --git a/src/CustomSierraJsonConverter.cs b/src/CustomSierraJsonConverter.cs index af8755e..ac10afb 100644 --- a/src/CustomSierraJsonConverter.cs +++ b/src/CustomSierraJsonConverter.cs @@ -1,8 +1,6 @@ using SierraHOTAS.Models; using SierraJSON; using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq; namespace SierraHOTAS @@ -140,6 +138,7 @@ private static void SerializeButton(HOTASButton button) // if (prop.Name == nameof(button.RepeatCount) && (int)prop.GetValue(button) == 0) continue; if (prop.Name == nameof(button.IsShift) && (bool)prop.GetValue(button) == false) continue; if (prop.Name == nameof(button.IsOneShot) && (bool)prop.GetValue(button) == false) continue; + if (prop.Name == nameof(button.ActionId) && !button.ActionCatalogItem.Actions.Any()) continue; Serializer.WriteKeyValue(prop.Name, value); } diff --git a/src/Views/ModeOverlayWindow.xaml b/src/Views/ModeOverlayWindow.xaml index efe2fd4..77a1b3e 100644 --- a/src/Views/ModeOverlayWindow.xaml +++ b/src/Views/ModeOverlayWindow.xaml @@ -7,19 +7,21 @@ mc:Ignorable="d" Title="" Height="25" - Width="98"> + Width="200"> - + + - - + + + diff --git a/src/Views/ModeOverlayWindow.xaml.cs b/src/Views/ModeOverlayWindow.xaml.cs index 6aafd08..e6b974b 100644 --- a/src/Views/ModeOverlayWindow.xaml.cs +++ b/src/Views/ModeOverlayWindow.xaml.cs @@ -138,7 +138,7 @@ private void SetModeName(int mode) { _appDispatcher.Invoke(() => { - Width = 98; + Width = 115; txtMessage.Text = _modeDictionary[mode].ModeName; SetWidthFromContent(); }); @@ -154,7 +154,7 @@ private void SetWidthFromContent() Brushes.Gold, 1.25); - Width = (int)formattedText.Width + 98; + Width = (int)formattedText.Width + 115; } } }