cleanup some includes
This commit is contained in:
parent
cf49294c9a
commit
8efc1da970
21 changed files with 28 additions and 59 deletions
|
@ -20,7 +20,6 @@
|
|||
#include "dialogs.hpp"
|
||||
#include "filesystem.hpp"
|
||||
#include "formatter.hpp"
|
||||
#include "game_display.hpp"
|
||||
#include "game_preferences.hpp"
|
||||
#include "gettext.hpp"
|
||||
#include "gui/dialogs/addon_connect.hpp"
|
||||
|
@ -37,6 +36,7 @@
|
|||
#include "marked-up_text.hpp"
|
||||
#include "serialization/parser.hpp"
|
||||
#include "version.hpp"
|
||||
#include "video.hpp"
|
||||
#include "wml_separators.hpp"
|
||||
#include "formula_string_utils.hpp"
|
||||
#include "addon/client.hpp"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "addon/manager.hpp"
|
||||
#include "addon/state.hpp"
|
||||
#include "dialogs.hpp"
|
||||
#include "display.hpp"
|
||||
#include "filesystem.hpp"
|
||||
#include "formatter.hpp"
|
||||
#include "formula_string_utils.hpp"
|
||||
|
@ -36,8 +35,10 @@
|
|||
#include "gui/widgets/window.hpp"
|
||||
#include "gui/widgets/settings.hpp"
|
||||
#include "help/help_button.hpp"
|
||||
#include "image.hpp"
|
||||
#include "log.hpp"
|
||||
#include "marked-up_text.hpp"
|
||||
#include "video.hpp"
|
||||
#include "wml_separators.hpp"
|
||||
#include "wml_exception.hpp"
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "quit_confirmation.hpp"
|
||||
#include "preferences.hpp"
|
||||
#include "video.hpp"
|
||||
#include "display.hpp"
|
||||
#if defined _WIN32
|
||||
#include "desktop/windows_tray_notification.hpp"
|
||||
#endif
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
#include "wml_separators.hpp"
|
||||
#include "formula_string_utils.hpp"
|
||||
#include "widgets/multimenu.hpp"
|
||||
#include "sdl/utils.hpp"
|
||||
#include "sdl/rect.hpp"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
|
|
@ -39,7 +39,9 @@
|
|||
#include "formula_string_utils.hpp"
|
||||
#include "terrain_type_data.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
#include "sdl/rect.hpp"
|
||||
#include "sdl/utils.hpp"
|
||||
#include "video.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
#include "formula_string_utils.hpp"
|
||||
#include "scripting/plugins/context.hpp"
|
||||
#include "scripting/plugins/manager.hpp"
|
||||
#include "team.hpp"
|
||||
#include "sdl/utils.hpp"
|
||||
#include "sdl/rect.hpp"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#include "message.hpp"
|
||||
#include "../../game_end_exceptions.hpp"
|
||||
#include "../../gettext.hpp"
|
||||
#include "../../resources.hpp"
|
||||
#include "../../game_display.hpp"
|
||||
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
@ -69,7 +67,7 @@ tsynced_choice_wait::~tsynced_choice_wait()
|
|||
mgr_.changed_event_.detach_handler(this);
|
||||
}
|
||||
|
||||
void tsynced_choice_wait::pre_show(CVideo& /*video*/, twindow& window)
|
||||
void tsynced_choice_wait::pre_show(CVideo& video, twindow& window)
|
||||
{
|
||||
window_ = &window;
|
||||
message_ = find_widget<tlabel>(&window, "lblMessage", false, true);
|
||||
|
@ -80,7 +78,7 @@ void tsynced_choice_wait::pre_show(CVideo& /*video*/, twindow& window)
|
|||
|
||||
connect_signal_mouse_left_click(
|
||||
quit_button,
|
||||
boost::bind(&tsynced_choice_wait::on_btn_quit_game, this)
|
||||
boost::bind(&tsynced_choice_wait::on_btn_quit_game, this, boost::ref(video))
|
||||
);
|
||||
|
||||
message_->set_label(mgr_.wait_message());
|
||||
|
@ -99,9 +97,9 @@ void tsynced_choice_wait::handle_generic_event(const std::string& event_name)
|
|||
}
|
||||
}
|
||||
|
||||
void tsynced_choice_wait::on_btn_quit_game()
|
||||
void tsynced_choice_wait::on_btn_quit_game(CVideo& video)
|
||||
{
|
||||
const int res = gui2::show_message(resources::screen->video(), _("Quit"),
|
||||
const int res = gui2::show_message(video, _("Quit"),
|
||||
_("Do you really want to quit?"), gui2::tmessage::yes_no_buttons);
|
||||
if (res != gui2::twindow::CANCEL) {
|
||||
throw_quit_game_exception();
|
||||
|
|
|
@ -38,7 +38,7 @@ private:
|
|||
void pre_show(CVideo& video, twindow& window);
|
||||
|
||||
virtual void handle_generic_event(const std::string& event_name);
|
||||
void on_btn_quit_game();
|
||||
void on_btn_quit_game(CVideo& video);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "gui/dialogs/title_screen.hpp"
|
||||
|
||||
#include "display.hpp"
|
||||
#include "game_config.hpp"
|
||||
#include "game_preferences.hpp"
|
||||
#include "gettext.hpp"
|
||||
|
@ -39,6 +38,7 @@
|
|||
#include "gui/widgets/settings.hpp"
|
||||
#include "gui/widgets/window.hpp"
|
||||
#include "utils/foreach.tpp"
|
||||
#include "video.hpp"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "log.hpp"
|
||||
#include "preferences.hpp"
|
||||
#include "game_end_exceptions.hpp"
|
||||
|
||||
#include "display.hpp"
|
||||
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
|
|
@ -16,8 +16,11 @@
|
|||
#define COMMAND_EXECUTOR_HPP_INCLUDED
|
||||
|
||||
#include "hotkey_command.hpp"
|
||||
#include "display.hpp"
|
||||
#include "game_end_exceptions.hpp"
|
||||
#include "events.hpp"
|
||||
|
||||
class display;
|
||||
class CVideo;
|
||||
|
||||
namespace hotkey {
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "actions/create.hpp"
|
||||
#include "formula_string_utils.hpp"
|
||||
#include "game_display.hpp"
|
||||
#include "game_errors.hpp"
|
||||
#include "game_events/menu_item.hpp"
|
||||
#include "game_events/wmi_container.hpp"
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
#include "video.hpp"
|
||||
#include "image.hpp"
|
||||
#include "text.hpp"
|
||||
#if SDL_VERSION_ATLEAST(2,0,0)
|
||||
#include "display.hpp"
|
||||
#endif
|
||||
|
||||
#include <SDL_events.h>
|
||||
#include <SDL_image.h>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#ifndef MOUSE_EVENTS_H_INCLUDED
|
||||
#define MOUSE_EVENTS_H_INCLUDED
|
||||
|
||||
#include "game_display.hpp" // for game_display
|
||||
#include "game_display.hpp" // for game_display -> display conversion.
|
||||
#include "map_location.hpp" // for map_location
|
||||
#include "mouse_handler_base.hpp" // for mouse_handler_base
|
||||
#include "pathfind/pathfind.hpp" // for marked_route, paths
|
||||
|
@ -26,6 +26,7 @@
|
|||
#include <vector> // for vector
|
||||
#include "SDL_events.h" // for SDL_MouseButtonEvent
|
||||
|
||||
class game_display;
|
||||
class battle_context; // lines 23-23
|
||||
class play_controller;
|
||||
class team;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "quit_confirmation.hpp"
|
||||
#include "gettext.hpp"
|
||||
#include "display.hpp"
|
||||
#include "video.hpp"
|
||||
#include "gui/dialogs/message.hpp"
|
||||
#include "gui/widgets/window.hpp"
|
||||
#include "resources.hpp"
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
|
||||
#include "format_time_summary.hpp"
|
||||
#include "formula_string_utils.hpp"
|
||||
#include "game_display.hpp"
|
||||
#include "game_end_exceptions.hpp"
|
||||
#include "game_preferences.hpp"
|
||||
#include "gettext.hpp"
|
||||
#include "log.hpp"
|
||||
#include "serialization/binary_or_text.hpp"
|
||||
#include "serialization/parser.hpp"
|
||||
#include "team.hpp"
|
||||
|
||||
#include "filesystem.hpp"
|
||||
#include "config.hpp"
|
||||
|
|
|
@ -424,38 +424,6 @@ void dialog_frame::draw()
|
|||
dirty_ = false;
|
||||
}
|
||||
|
||||
} //end namespace gui
|
||||
|
||||
namespace {
|
||||
|
||||
struct help_handler : public hotkey::command_executor
|
||||
{
|
||||
help_handler(display& disp, const std::string& topic) : disp_(disp), topic_(topic)
|
||||
{}
|
||||
|
||||
private:
|
||||
void show_help()
|
||||
{
|
||||
if(topic_.empty() == false) {
|
||||
help::show_help(disp_.video(),topic_);
|
||||
}
|
||||
}
|
||||
|
||||
bool can_execute_command(const hotkey::hotkey_command& cmd, int /*index*/) const
|
||||
{
|
||||
hotkey::HOTKEY_COMMAND command = cmd.id;
|
||||
return (topic_.empty() == false && command == hotkey::HOTKEY_HELP) || command == hotkey::HOTKEY_SCREENSHOT;
|
||||
}
|
||||
|
||||
display& disp_;
|
||||
std::string topic_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
int show_dialog(CVideo& video, surface image,
|
||||
const std::string& caption, const std::string& message,
|
||||
DIALOG_TYPE type,
|
||||
|
|
|
@ -14,13 +14,10 @@
|
|||
#include "global.hpp"
|
||||
#include "synced_checkup.hpp"
|
||||
#include "log.hpp"
|
||||
#include "map_location.hpp"
|
||||
#include "unit_map.hpp"
|
||||
#include "unit.hpp"
|
||||
#include "replay.hpp"
|
||||
#include "synced_user_choice.hpp"
|
||||
#include "resources.hpp"
|
||||
#include "game_display.hpp"
|
||||
|
||||
static lg::log_domain log_replay("replay");
|
||||
#define DBG_REPLAY LOG_STREAM(debug, log_replay)
|
||||
#define LOG_REPLAY LOG_STREAM(info, log_replay)
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "log.hpp" // for LOG_STREAM, general, logger, etc
|
||||
#include "network.hpp" // for describe_versions
|
||||
#include "preferences.hpp" // for core_id, etc
|
||||
#include "preferences_display.hpp" // for display_manager
|
||||
#include "scripting/application_lua_kernel.hpp"
|
||||
#include "scripting/plugins/context.hpp"
|
||||
#include "scripting/plugins/manager.hpp"
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "global.hpp"
|
||||
#include "wml_exception.hpp"
|
||||
|
||||
#include "display.hpp"
|
||||
#include "gettext.hpp"
|
||||
#include "gui/dialogs/message.hpp"
|
||||
#include "formula_string_utils.hpp"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
class display;
|
||||
class CVideo;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue