replay: Set 'skip animation' button when pressing its hotkey

This commit is contained in:
josteph 2017-11-06 00:25:48 +00:00 committed by Charles Dang
parent 50c9b526a7
commit 3b13fd0fc3
2 changed files with 10 additions and 1 deletions

View File

@ -1263,3 +1263,12 @@ void play_controller::show_objectives() const
gui2::show_transient_message(gui_->video(), get_scenario_name(), (objectives.empty() ? no_objectives : objectives), "", true);
t.reset_objectives_changed();
}
void play_controller::toggle_skipping_replay()
{
skip_replay_ = !skip_replay_;
const std::shared_ptr<gui::button> skip_animation_button = get_display().find_action_button("skip-animation");
if (skip_animation_button) {
skip_animation_button->set_check(skip_replay_);
}
}

View File

@ -186,7 +186,7 @@ public:
config to_config() const;
bool is_skipping_replay() const { return skip_replay_; }
void toggle_skipping_replay() { skip_replay_ = !skip_replay_; }
void toggle_skipping_replay();
bool is_linger_mode() const { return linger_; }
void do_autosave();