Skip to content

Commit

Permalink
Merge pull request #1693 from ivan-mogilko/360--addhelptopanectx
Browse files Browse the repository at this point in the history
Editor: added Help command for pane's tab context menu
  • Loading branch information
ivan-mogilko authored Jun 20, 2022
2 parents 9f09192 + 4fa083c commit e8a1af3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Editor/AGS.Editor/GUI/TabbedDocumentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ private void AttachTabContextMenu(ContentDocument document)
{
menu.Items.Add(new ToolStripMenuItem("Navigate (In Tree)", null, onClick, MENU_ITEM_NAVIGATE));
}
menu.Items.Add(new ToolStripMenuItem("Help", GUIController.Instance.ImageList.Images["MenuIconDynamicHelp"],
new EventHandler(TreeContextMenuOnHelp), Keys.F1));
document.Control.DockingContainer.TabPageContextMenuStrip = menu;
}

Expand Down Expand Up @@ -506,10 +508,16 @@ private void TreeContextMenuEventHandler(object sender, EventArgs e)
else if (item.Name == MENU_ITEM_NAVIGATE)
{
Factory.GUIController.ProjectTree.SelectNode(null, document.TreeNodeID);

}
}

private void TreeContextMenuOnHelp(object sender, EventArgs e)
{
ToolStripMenuItem item = (ToolStripMenuItem)sender;
ContentDocument document = (ContentDocument)item.Owner.Tag;
Factory.GUIController.LaunchHelpForKeyword(document.Control.HelpKeyword);
}

private void btnClose_Click(object sender, EventArgs e)
{
if (_currentPane != null)
Expand Down

0 comments on commit e8a1af3

Please sign in to comment.