diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index 498c10d9..c63cefa9 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -2542,11 +2542,12 @@ namespace CodeImp.DoomBuilder.Windows //mxd private void itemShortcutReference_Click(object sender, EventArgs e) { - string columnLabels = "Action
Shortcut
Modifiers
Description"; - string categoryPadding = ""; - string categoryStart = ""; - string categoryEnd = ""; - string fileName = "GZDB Keyboard Reference.html"; + const string columnLabels = "Action
Shortcut
Modifiers
Description"; + const string categoryPadding = ""; + const string categoryStart = ""; + const string categoryEnd = "
[to top]
"; + const string fileName = "GZDB Actions Reference.html"; + Actions.Action[] actions = General.Actions.GetAllActions(); Dictionary> sortedActions = new Dictionary>(); @@ -2559,20 +2560,37 @@ namespace CodeImp.DoomBuilder.Windows System.Text.StringBuilder html = new System.Text.StringBuilder(); //head - html.AppendLine("" + - "" + - "" + - "" + - "
" + - "" + - ""); + html.AppendLine("" + Environment.NewLine + + "" + Environment.NewLine + + "GZDoom Builder Actions Reference" + Environment.NewLine + + "" + Environment.NewLine + + "
" + Environment.NewLine); + + //table header + html.AppendLine("
GZDoom Builder Shortcut Reference
" + Environment.NewLine + + ""); + + //categories navigator + List catnames = new List(sortedActions.Count); + int counter = 0; + int numActions = 0; + foreach(KeyValuePair> category in sortedActions) { + catnames.Add("" + General.Actions.Categories[category.Key] + ""); + numActions += category.Value.Count; + } + + html.AppendLine("" + Environment.NewLine); //add descriptions + counter = 0; foreach(KeyValuePair> category in sortedActions) { //add category title html.AppendLine(categoryPadding); - html.AppendLine(categoryStart + General.Actions.Categories[category.Key] + categoryEnd); + html.AppendLine(categoryStart + "" + General.Actions.Categories[category.Key] + categoryEnd); html.AppendLine(columnLabels); + counter++; Dictionary actionsByTitle = new Dictionary(); List actionTitles = new List();
GZDoom Builder Actions Reference
Total number of actions: " + numActions + "
Jump to: "); + html.AppendLine(string.Join(" | ", catnames.ToArray())); + html.AppendLine("