From fe1c6984ad0b5f288ff29be3230c9745410a3e80 Mon Sep 17 00:00:00 2001 From: rez Date: Wed, 15 Aug 2012 23:27:53 +0000 Subject: [PATCH] added pageup/pagedown shortcut for setup --- neercs/video/render.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/neercs/video/render.cpp b/neercs/video/render.cpp index f5b3a04..4374e25 100644 --- a/neercs/video/render.cpp +++ b/neercs/video/render.cpp @@ -590,6 +590,37 @@ void Render::TickDraw(float seconds) } timer_key = timer; } + if (Input::GetButtonState(280/*SDLK_PAGEUP*/)&&(timer-timer_key>timer_key_repeat)) + { + if (m_setup) + { + if (!setup_switch) + { + setup_option = 0; + } + else + { + setup_item = 0; + } + } + timer_key = timer; + } + if (Input::GetButtonState(281/*SDLK_PAGEDOWN*/)&&(timer-timer_key>timer_key_repeat)) + { + if (m_setup) + { + if (!setup_switch) + { + setup_option = setup_option_n - 1; + setup_item = 0; + } + else + { + setup_item = setup_item_n - 1; + } + } + timer_key = timer; + } if (Input::GetButtonState(276/*SDLK_LEFT*/)&&(timer-timer_key>timer_key_repeat)) { if (m_setup && setup_switch)