Moved new help entry point to a common location
This commit is contained in:
parent
28dd0f8a68
commit
f52bb4f098
2 changed files with 8 additions and 6 deletions
|
@ -29,7 +29,6 @@
|
|||
#include "gui/dialogs/achievements_dialog.hpp"
|
||||
#include "gui/dialogs/core_selection.hpp"
|
||||
#include "gui/dialogs/debug_clock.hpp"
|
||||
#include "gui/dialogs/game_version_dialog.hpp"
|
||||
#include "gui/dialogs/help_browser.hpp"
|
||||
#include "gui/dialogs/lua_interpreter.hpp"
|
||||
#include "gui/dialogs/message.hpp"
|
||||
|
@ -38,6 +37,7 @@
|
|||
#include "gui/dialogs/preferences_dialog.hpp"
|
||||
#include "gui/dialogs/screenshot_notification.hpp"
|
||||
#include "gui/dialogs/simple_item_selector.hpp"
|
||||
#include "gui/dialogs/game_version_dialog.hpp"
|
||||
#include "gui/dialogs/gui_test_dialog.hpp"
|
||||
#include "language.hpp"
|
||||
#include "log.hpp"
|
||||
|
@ -247,11 +247,6 @@ void title_screen::init_callbacks()
|
|||
//
|
||||
register_button("help", hotkey::HOTKEY_HELP, []() {
|
||||
help::help_manager help_manager(&game_config_manager::get()->game_config());
|
||||
|
||||
if(gui2::new_widgets) {
|
||||
gui2::dialogs::help_browser::display();
|
||||
}
|
||||
|
||||
help::show_help();
|
||||
});
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include "preferences/preferences.hpp"
|
||||
#include "game_config_manager.hpp"
|
||||
#include "gettext.hpp" // for _
|
||||
#include "gui/dialogs/help_browser.hpp"
|
||||
#include "gui/widgets/settings.hpp"
|
||||
#include "help/help_browser.hpp" // for help_browser
|
||||
#include "help/help_impl.hpp" // for hidden_symbol, toplevel, etc
|
||||
#include "key.hpp" // for CKey
|
||||
|
@ -204,6 +206,11 @@ void show_with_toplevel(const section &toplevel_sec,
|
|||
const std::string& show_topic,
|
||||
int xloc, int yloc)
|
||||
{
|
||||
if(gui2::new_widgets) {
|
||||
gui2::dialogs::help_browser::display();
|
||||
return;
|
||||
}
|
||||
|
||||
const events::event_context dialog_events_context;
|
||||
const gui::dialog_manager manager;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue