X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Ftextscroller.cpp;h=491e1ddb3421e13f45e61f8775420bdb129d8043;hb=a351cbfc2a547e3407cf78fbcc93e585cac486d4;hp=17b848ea59aa3a2dac8ee90f40c50c7d416c76b9;hpb=f385db90dcb9888695e012f4f2f54e6f145c1023;p=supertux.git diff --git a/src/supertux/textscroller.cpp b/src/supertux/textscroller.cpp index 17b848ea5..491e1ddb3 100644 --- a/src/supertux/textscroller.cpp +++ b/src/supertux/textscroller.cpp @@ -87,13 +87,13 @@ TextScroller::~TextScroller() void TextScroller::setup() { - sound_manager->play_music(music); + SoundManager::current()->play_music(music); } void TextScroller::update(float elapsed_time) { - Controller *controller = g_input_manager->get_controller(); + Controller* controller = InputManager::current()->get_controller(); if(controller->hold(Controller::UP)) { speed = -defaultspeed*5; } else if(controller->hold(Controller::DOWN)) { @@ -106,8 +106,9 @@ TextScroller::update(float elapsed_time) || controller->pressed(Controller::MENU_SELECT) )&& !(controller->pressed(Controller::UP))) // prevent skipping if jump with up is enabled scroll += SCROLL; - if(controller->pressed(Controller::PAUSE_MENU)) { - g_screen_manager->pop_screen(std::unique_ptr(new FadeOut(0.5))); + if(controller->pressed(Controller::START) || + controller->pressed(Controller::ESCAPE)) { + ScreenManager::current()->pop_screen(std::unique_ptr(new FadeOut(0.5))); } scroll += speed * elapsed_time; @@ -136,7 +137,7 @@ TextScroller::draw(DrawingContext& context) if(y < 0 && !fading ) { fading = true; - g_screen_manager->pop_screen(std::unique_ptr(new FadeOut(0.5))); + ScreenManager::current()->pop_screen(std::unique_ptr(new FadeOut(0.5))); } }