End Credits: simplified a callback binding

This commit is contained in:
Charles Dang 2017-03-15 18:54:42 +11:00
parent 1ba7bbcadf
commit 5e5e134e5e
2 changed files with 3 additions and 3 deletions

View file

@ -77,7 +77,7 @@ void end_credits::pre_show(window& window)
// Delay a little before beginning the scrolling
last_scroll_ = SDL_GetTicks() + 3000;
connect_signal_pre_key_press(window, std::bind(&end_credits::key_press_callback, this, _3, _4, _5));
connect_signal_pre_key_press(window, std::bind(&end_credits::key_press_callback, this, _5));
std::stringstream ss;
std::stringstream focus_ss;
@ -152,7 +152,7 @@ void end_credits::timer_callback()
}
}
void end_credits::key_press_callback(bool&, bool&, const SDL_Keycode key)
void end_credits::key_press_callback(const SDL_Keycode key)
{
if(key == SDLK_UP && scroll_speed_ < 400) {
scroll_speed_ <<= 1;

View file

@ -50,7 +50,7 @@ private:
void pre_show(window& window);
void timer_callback();
void key_press_callback(bool&, bool&, const SDL_Keycode key);
void key_press_callback(const SDL_Keycode key);
const std::string& focus_on_;