39 , playsingle_controller_(pc)
40 , whiteboard_manager_(pc.get_whiteboard())
144 symbols[
"hotkey"] = hk;
268 if (!i.
valid())
return false;
269 return i->move_interrupted();
312 std::string error_log;
315 if(!error_log.empty() || savegame.
child_or_empty(
"snapshot")[
"replay_pos"].to_int(-1) < 0 ) {
virtual bool can_execute_command(const hotkey::hotkey_command &command, int index=-1) const override
Check if a command can be executed.
void label_terrain(mouse_handler &mousehandler, bool team_only)
virtual void update_shroud_now() override
const team & viewing_team() const
void delete_upcoming_commands()
virtual void toggle_shroud_updates() override
std::shared_ptr< wb::manager > whiteboard_manager_
virtual void label_settings() override
std::map< std::string, t_string > string_map
This class represents a single unit of a specific type.
virtual void ai_formula() override
const unit_map & get_units() const
virtual void custom_command() override
virtual void recruit() override
game_events::wmi_manager & get_wml_menu_items()
virtual void user_command() override
virtual void load_autosave(const std::string &filename) override
virtual void replay_exit() override
Stores all information related to functions that can be bound to hotkeys.
void update_shroud_now(int side_num)
const gamemap & get_map() const
virtual void end_unit_turn() override
virtual void clear_messages() override
HOTKEY_COMMAND command
The command associated with this hotkey.
std::string id
The unique ID.
virtual void whiteboard_suppose_dead() override
static std::string _(const char *str)
void create_unit(mouse_handler &mousehandler)
Creates a unit (in debug mode via hotkey or context menu).
std::string get_saves_dir()
void read_save_file(const std::string &dir, const std::string &name, config &cfg, std::string *error_log)
Read the complete config information out of a savefile.
virtual bool can_execute_command(const hotkey::hotkey_command &command, int index=-1) const override
Check if a command can be executed.
item_ptr get_item(const std::string &id) const
Gets the menu item with the specified ID.
play_controller & play_controller_
References to parent object / constituents.
An extension of play_controller::hotkey_handler, which has support for SP wesnoth features like white...
replay_controller * get_replay_controller() const override
map_location get_selected_hex() const
std::string get_names(const std::string &id)
Returns a comma-separated string of hotkey names.
virtual hotkey::ACTION_STATE get_action_state(hotkey::HOTKEY_COMMAND command, int index) const override
const map_location & get_last_hex() const
void toggle_shroud_updates(int side_num)
virtual void clear_messages() override
virtual void end_turn() override
virtual void unit_hold_position() override
std::string label
What to show in the filter's drop-down list.
Applies the planned unit map for the duration of the struct's life.
virtual void whiteboard_bump_down_action() override
void recall(int side_num, const map_location &last_hex)
events::menu_handler & menu_handler_
std::shared_ptr< wml_menu_item > item_ptr
wml_menu_item pointers
void end_unit_turn(mouse_handler &mousehandler, int side_num)
void recruit(int side_num, const map_location &last_hex)
Declarations for a container for wml_menu_item.
const terrain_label * get_label(const map_location &loc, const std::string &team_name) const
virtual void whiteboard_toggle() override
static const std::string wml_menu_hotkey_prefix
const color_t NORMAL_COLOR
virtual void rename_unit() override
virtual void clear_labels() override
Encapsulates the map of the game.
bool auto_shroud_updates() const
bool shrouded(const map_location &loc) const
Returns true if location (x,y) is covered in shroud.
virtual void recall() override
unit_iterator find(std::size_t id)
virtual bool is_networked_mp() const
virtual void load_autosave(const std::string &filename)
void continue_move(mouse_handler &mousehandler, int side_num)
bool can_execute_command(const hotkey::hotkey_command &cmd, int index) const
void announce(const std::string &msg, const color_t &color=font::GOOD_COLOR, const announce_options &options=announce_options())
Announce a message prominently.
virtual void create_unit() override
void unit_hold_position(mouse_handler &mousehandler, int side_num)
bool can_use_synced_wml_menu() const
bool on_board(const map_location &loc) const
Tell if a location is on the map.
void change_side(mouse_handler &mousehandler)
Declarations for File-IO.
events::mouse_handler & mouse_handler_
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
void kill_unit(mouse_handler &mousehandler)
hotkey_handler(playsingle_controller &, saved_game &)
bool is_local_human() const
To store label data Class implements logic for rendering.
virtual void continue_move() override
unit_map::iterator current_unit()
const map_location & get_location() const
The current map location this unit is at.
virtual hotkey::ACTION_STATE get_action_state(hotkey::HOTKEY_COMMAND command, int index) const override
void set_player_type_changed()
virtual void whiteboard_bump_up_action() override
int current_side() const
Returns the number of the side whose turn it is.
virtual void change_side() override
virtual void whiteboard_execute_all_actions() override
game_display * gui() const
virtual void whiteboard_delete_action() override
void show_error_message(const std::string &msg, bool message_use_markup)
Shows an error message to the user.
virtual void kill_unit() override
const config & child_or_empty(config_key_type key) const
Returns the first child with the given key, or an empty config if there is none.
A config object defines a single node in a WML file, with access to child nodes.
virtual void repeat_recruit() override
virtual void label_terrain(bool) override
void repeat_recruit(int side_num, const map_location &last_hex)
playsingle_controller & playsingle_controller_
virtual void whiteboard_execute_action() override
std::pair< std::string, unsigned > item
static const hotkey_command & get_command_by_command(HOTKEY_COMMAND command)
the execute_command argument was changed from HOTKEY_COMMAND to hotkey_command, to be able to call it...
bool viewing_team_is_playing() const