Skip to content

Commit

Permalink
Moved new help entry point to a common location
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Apr 16, 2017
1 parent 3719367 commit d5b74a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/gui/dialogs/title_screen.cpp
Expand Up @@ -29,7 +29,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"
Expand Down Expand Up @@ -294,11 +293,6 @@ void title_screen::pre_show(window& win)
//
register_button(win, "help", hotkey::HOTKEY_HELP, [](window& w) {
help::help_manager help_manager(&game_config_manager::get()->game_config());

if(gui2::new_widgets) {
gui2::dialogs::help_browser::display(w.video());
}

help::show_help(w.video());
});

Expand Down
7 changes: 7 additions & 0 deletions src/help/help.cpp
Expand Up @@ -26,7 +26,9 @@
#include "font/constants.hpp" // for relative_size
#include "game_preferences.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
Expand Down Expand Up @@ -176,6 +178,11 @@ void show_help(CVideo& video, const section &toplevel_sec,
const std::string& show_topic,
int xloc, int yloc)
{
if(gui2::new_widgets) {
gui2::dialogs::help_browser::display(video);
return;
}

const events::event_context dialog_events_context;
const gui::dialog_manager manager;

Expand Down

0 comments on commit d5b74a3

Please sign in to comment.