Implement is_replay() in playsingle_controller

This commit is contained in:
Charles Dang 2016-02-24 01:06:20 +11:00
parent cca804e78d
commit 1c0085616a
2 changed files with 3 additions and 3 deletions

View file

@ -290,7 +290,7 @@ bool playsingle_controller::hotkey_handler::can_execute_command(const hotkey::ho
case hotkey::HOTKEY_REPLAY_RESET:
return playsingle_controller_.get_replay_controller() && playsingle_controller_.get_replay_controller()->can_execute_command(cmd, index);
case hotkey::HOTKEY_REPLAY_EXIT:
return playsingle_controller_.get_replay_controller() != NULL;
return playsingle_controller_.is_replay();
default: return play_controller::hotkey_handler::can_execute_command(cmd, index);
}
return res;

View file

@ -59,8 +59,8 @@ public:
bool get_player_type_changed() const { return player_type_changed_; }
void set_player_type_changed() { player_type_changed_ = true; }
virtual bool should_return_to_play_side();
replay_controller * get_replay_controller()
{ return mp_replay_.get(); }
replay_controller * get_replay_controller() { return mp_replay_.get(); }
bool is_replay() { return get_replay_controller() != NULL; }
void enable_replay(bool is_unit_test = false);
void on_replay_end(bool is_unit_test);
protected: