diff --git a/src/play_controller.cpp b/src/play_controller.cpp index c62c1aa240fe..b0f95962513c 100644 --- a/src/play_controller.cpp +++ b/src/play_controller.cpp @@ -734,7 +734,7 @@ void play_controller::do_init_side(bool is_replay, bool only_visual) { loading_game_ = false; check_victory(); - resources::whiteboard->on_init_side(); + whiteboard_manager_->on_init_side(); } //builds the snapshot config from its members and their configs respectively @@ -792,7 +792,7 @@ config play_controller::to_config() const void play_controller::finish_side_turn(){ - resources::whiteboard->on_finish_side_turn(player_number_); + whiteboard_manager_->on_finish_side_turn(player_number_); gameboard_.end_turn(player_number_); diff --git a/src/playsingle_controller.cpp b/src/playsingle_controller.cpp index 11aa07ee81a0..757e99d0ed0a 100644 --- a/src/playsingle_controller.cpp +++ b/src/playsingle_controller.cpp @@ -112,21 +112,21 @@ void playsingle_controller::init_gui(){ void playsingle_controller::recruit(){ if (!browse_) menu_handler_.recruit(player_number_, mouse_handler_.get_last_hex()); - else if (resources::whiteboard->is_active()) + else if (whiteboard_manager_->is_active()) menu_handler_.recruit(resources::screen->viewing_side(), mouse_handler_.get_last_hex()); } void playsingle_controller::repeat_recruit(){ if (!browse_) menu_handler_.repeat_recruit(player_number_, mouse_handler_.get_last_hex()); - else if (resources::whiteboard->is_active()) + else if (whiteboard_manager_->is_active()) menu_handler_.repeat_recruit(resources::screen->viewing_side(), mouse_handler_.get_last_hex()); } void playsingle_controller::recall(){ if (!browse_) menu_handler_.recall(player_number_, mouse_handler_.get_last_hex()); - else if (resources::whiteboard->is_active()) + else if (whiteboard_manager_->is_active()) menu_handler_.recall(resources::screen->viewing_side(), mouse_handler_.get_last_hex()); } @@ -223,9 +223,9 @@ void playsingle_controller::clear_messages(){ } void playsingle_controller::whiteboard_toggle() { - resources::whiteboard->set_active(!resources::whiteboard->is_active()); + whiteboard_manager_->set_active(!whiteboard_manager_->is_active()); - if (resources::whiteboard->is_active()) { + if (whiteboard_manager_->is_active()) { std::string hk = hotkey::get_names(hotkey::hotkey_command::get_command_by_command(hotkey::HOTKEY_WB_TOGGLE).command); utils::string_map symbols; symbols["hotkey"] = hk; @@ -236,7 +236,7 @@ void playsingle_controller::whiteboard_toggle() { gui_->announce(_("Planning mode deactivated!"), font::NORMAL_COLOR); } //@todo Stop printing whiteboard help in the chat once we have better documentation/help - resources::whiteboard->print_help_once(); + whiteboard_manager_->print_help_once(); } void playsingle_controller::whiteboard_execute_action(){ @@ -617,7 +617,7 @@ LEVEL_RESULT playsingle_controller::play_scenario( possible_end_play_signal playsingle_controller::play_turn() { - resources::whiteboard->on_gamestate_change(); + whiteboard_manager_->on_gamestate_change(); gui_->new_turn(); gui_->invalidate_game_status(); events::raise_draw_event(); @@ -926,7 +926,7 @@ hotkey::ACTION_STATE playsingle_controller::get_action_state(hotkey::HOTKEY_COMM { switch(command) { case hotkey::HOTKEY_WB_TOGGLE: - return resources::whiteboard->is_active() ? hotkey::ACTION_ON : hotkey::ACTION_OFF; + return whiteboard_manager_->is_active() ? hotkey::ACTION_ON : hotkey::ACTION_OFF; default: return play_controller::get_action_state(command, index); } @@ -1055,7 +1055,7 @@ bool playsingle_controller::can_execute_command(const hotkey::hotkey_command& cm case hotkey::HOTKEY_RECRUIT: case hotkey::HOTKEY_REPEAT_RECRUIT: case hotkey::HOTKEY_RECALL: - return (!browse_ || resources::whiteboard->is_active()) && !linger_ && !events::commands_disabled; + return (!browse_ || whiteboard_manager_->is_active()) && !linger_ && !events::commands_disabled; case hotkey::HOTKEY_ENDTURN: return (!browse_ || linger_) && !events::commands_disabled; @@ -1101,12 +1101,12 @@ bool playsingle_controller::can_execute_command(const hotkey::hotkey_command& cm return !is_observer(); case hotkey::HOTKEY_WB_EXECUTE_ACTION: case hotkey::HOTKEY_WB_EXECUTE_ALL_ACTIONS: - return resources::whiteboard->can_enable_execution_hotkeys(); + return whiteboard_manager_->can_enable_execution_hotkeys(); case hotkey::HOTKEY_WB_DELETE_ACTION: - return resources::whiteboard->can_enable_modifier_hotkeys(); + return whiteboard_manager_->can_enable_modifier_hotkeys(); case hotkey::HOTKEY_WB_BUMP_UP_ACTION: case hotkey::HOTKEY_WB_BUMP_DOWN_ACTION: - return resources::whiteboard->can_enable_reorder_hotkeys(); + return whiteboard_manager_->can_enable_reorder_hotkeys(); case hotkey::HOTKEY_WB_SUPPOSE_DEAD: { //@todo re-enable this once we figure out a decent UI for suppose_dead