feat: add command help

This commit is contained in:
Anna
2022-02-07 00:50:30 -05:00
parent c034e66354
commit 956b1daaad
7 changed files with 187 additions and 9 deletions
+18
View File
@@ -20,6 +20,7 @@ internal class Configuration : IPluginConfiguration {
public bool MoreCompactPretty;
public bool ShowNoviceNetwork;
public bool SidebarTabView;
public CommandHelpSide CommandHelpSide = CommandHelpSide.None;
public bool CanMove = true;
public bool CanResize = true;
public bool ShowTitleBar;
@@ -43,6 +44,7 @@ internal class Configuration : IPluginConfiguration {
this.MoreCompactPretty = other.MoreCompactPretty;
this.ShowNoviceNetwork = other.ShowNoviceNetwork;
this.SidebarTabView = other.SidebarTabView;
this.CommandHelpSide = other.CommandHelpSide;
this.CanMove = other.CanMove;
this.CanResize = other.CanResize;
this.ShowTitleBar = other.ShowTitleBar;
@@ -169,3 +171,19 @@ internal class Tab {
};
}
}
[Serializable]
internal enum CommandHelpSide {
None,
Left,
Right,
}
internal static class CommandHelpSideExt {
internal static string Name(this CommandHelpSide side) => side switch {
CommandHelpSide.None => Language.CommandHelpSide_None,
CommandHelpSide.Left => Language.CommandHelpSide_Left,
CommandHelpSide.Right => Language.CommandHelpSide_Right,
_ => throw new ArgumentOutOfRangeException(nameof(side), side, null),
};
}