Moved new help entry point to a common location
This commit is contained in:
parent
0630ca6d9a
commit
ec5cdb4fe4
2 changed files with 8 additions and 6 deletions
|
@ -26,8 +26,8 @@
|
|||
#include "gui/core/timer.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/game_version_dialog.hpp"
|
||||
#include "gui/dialogs/language_selection.hpp"
|
||||
#include "gui/dialogs/lua_interpreter.hpp"
|
||||
#include "gui/dialogs/message.hpp"
|
||||
|
@ -284,11 +284,6 @@ void title_screen::pre_show(window& win)
|
|||
//
|
||||
register_button(win, "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();
|
||||
});
|
||||
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
#include "font/constants.hpp" // for relative_size
|
||||
#include "preferences/game.hpp"
|
||||
#include "gettext.hpp" // for _
|
||||
#include "gui/dialogs/help_browser.hpp"
|
||||
#include "gui/dialogs/transient_message.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
|
||||
|
@ -176,6 +178,11 @@ void show_help(const section &toplevel_sec,
|
|||
{
|
||||
CVideo& video = CVideo::get_singleton();
|
||||
|
||||
if(gui2::new_widgets) {
|
||||
gui2::dialogs::help_browser::display(video);
|
||||
return;
|
||||
}
|
||||
|
||||
const events::event_context dialog_events_context;
|
||||
const gui::dialog_manager manager;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue