Moved new help entry point to a common location
This commit is contained in:
parent
231a8ccbf2
commit
c514c95a1f
2 changed files with 7 additions and 6 deletions
|
@ -28,7 +28,6 @@
|
|||
#include "gui/dialogs/core_selection.hpp"
|
||||
#include "gui/dialogs/debug_clock.hpp"
|
||||
#include "gui/dialogs/game_version.hpp"
|
||||
#include "gui/dialogs/help_browser.hpp"
|
||||
#include "gui/dialogs/language_selection.hpp"
|
||||
#include "gui/dialogs/lua_interpreter.hpp"
|
||||
#include "gui/dialogs/message.hpp"
|
||||
|
@ -283,11 +282,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