Add "Add Item" and F1 menu key accelerator on Linux

Patch from @x-qq

Closes #195
This commit is contained in:
2020-02-02 22:38:42 -05:00
parent bb2f7fab22
commit 7e73a21f5c
3 changed files with 28 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ void OpenBoESceneditMenu::add_persistent_menu_items(tgui::MenuBar::Ptr& menubar)
{ { "Outdoors", "Edit Area Descriptions" }, eMenu::OUT_AREAS },
{ { "Outdoors", "Set Starting Location" }, eMenu::OUT_START },
{ { "Help", "Index" }, eMenu::HELP_TOC },
{ { "Help", "Index F1" }, eMenu::HELP_TOC },
{ { "Help", "About Blades Scenario Editor" }, eMenu::ABOUT },
{ { "Help", "Getting Started" }, eMenu::HELP_START },
{ { "Help", "Testing Your Scenario" }, eMenu::HELP_TEST },
@@ -154,6 +154,14 @@ bool OpenBoESceneditMenu::handle_keypressed_event(const sf::Event& event) const
}
}
switch(event.key.code) {
case sf::Keyboard::F1:
handle_menu_choice(eMenu::HELP_TOC);
event_was_consumed = true;
break;
default: break;
}
return event_was_consumed;
}