End Credits: delay slightly before beginning scroll

This commit is contained in:
Charles Dang 2016-09-11 23:46:03 +11:00
parent 8604d811e0
commit 352e5f2600
2 changed files with 6 additions and 3 deletions

View file

@ -56,7 +56,10 @@ tend_credits::~tend_credits()
void tend_credits::pre_show(twindow& window)
{
timer_id_ = add_timer(10, std::bind(&tend_credits::timer_callback, this, std::ref(window)), true);
// Delay a little before beginning the scrolling
add_timer(1000, [this](size_t) {
timer_id_ = add_timer(10, std::bind(&tend_credits::timer_callback, this), true);
});
#if 0
connect_signal_pre_key_press(window, std::bind(&tend_credits::key_press_callback, this, _3, _4, _5));
@ -91,7 +94,7 @@ void tend_credits::pre_show(twindow& window)
}
}
void tend_credits::timer_callback(twindow&)
void tend_credits::timer_callback()
{
text_widget_->scroll_vertical_scrollbar(tscrollbar_::ITEM_FORWARD);
}

View file

@ -46,7 +46,7 @@ private:
/** Inherited from tdialog. */
void pre_show(twindow& window);
void timer_callback(twindow&);
void timer_callback();
#if 0
void key_press_callback(bool&, bool&, const SDLKey key);
#endif