Add a pause button to Symbian as it has no way of going back.

This commit is contained in:
Sacha 2013-02-12 14:39:18 +10:00
parent 4e5250ab92
commit 66433a7386
2 changed files with 18 additions and 2 deletions

View File

@ -32,6 +32,9 @@ TouchButton buttonLeft(&ui_atlas, I_DIR, I_ARROW, PAD_BUTTON_LEFT, 0);
TouchButton buttonUp(&ui_atlas, I_DIR, I_ARROW, PAD_BUTTON_UP, 90);
TouchButton buttonRight(&ui_atlas, I_DIR, I_ARROW, PAD_BUTTON_RIGHT, 180);
TouchButton buttonDown(&ui_atlas, I_DIR, I_ARROW, PAD_BUTTON_DOWN, 270);
#ifdef __SYMBIAN32__
TouchButton buttonPause(&ui_atlas, I_RECT, I_ARROW, PAD_BUTTON_BACK, 90);
#endif
TouchStick leftStick(&ui_atlas, I_STICKBG, I_STICK, 0);
@ -72,6 +75,10 @@ void LayoutGamepad(int w, int h)
buttonLShoulder.setPos(button_spacing + 10 * controlScale, 15 * controlScale, controlScale);
buttonRShoulder.setPos(w - button_spacing - 10 * controlScale, 15 * controlScale, controlScale);
#ifdef __SYMBIAN32__
buttonPause.setPos(halfW, 15 * controlScale, controlScale);
#endif
leftStick.setPos(stickX, stickY, controlScale);
}
@ -94,6 +101,10 @@ void UpdateGamepad(InputState &input_state)
buttonLShoulder.update(input_state);
buttonRShoulder.update(input_state);
#ifdef __SYMBIAN32__
buttonPause.update(input_state);
#endif
if (g_Config.bShowAnalogStick)
leftStick.update(input_state);
}
@ -117,6 +128,10 @@ void DrawGamepad(DrawBuffer &db)
buttonLShoulder.draw(db, color, colorOverlay);
buttonRShoulder.draw(db, color, colorOverlay);
#ifdef __SYMBIAN32__
buttonPause.draw(db, color, colorOverlay);
#endif
if (g_Config.bShowAnalogStick)
leftStick.draw(db, color);
}

View File

@ -170,7 +170,7 @@ void MenuScreen::render() {
VLinear vlinear(dp_xres + xoff, 95, 20);
if (UIButton(GEN_ID, vlinear, w, "Load...", ALIGN_RIGHT)) {
#if defined(USING_QT_UI) && defined(__SYMBIAN32__)
#if defined(USING_QT_UI)
QString fileName = QFileDialog::getOpenFileName(NULL, "Load ROM", g_Config.currentDirectory.c_str(), "PSP ROMs (*.iso *.cso *.pbp *.elf)");
if (QFile::exists(fileName)) {
QDir newPath;
@ -462,7 +462,8 @@ static const char *credits[] =
"Android SDK + NDK",
#elif defined(BLACKBERRY)
"Blackberry NDK",
#elif defined(USING_QT_UI)
#endif
#if defined(USING_QT_UI)
"Qt",
#else
"SDL",