options menu completed
This commit is contained in:
@@ -266,17 +266,18 @@ void Title::init(bool demo, Uint8 subsection)
|
||||
mMenu.options->addItem(mLang->getText(59), 0, 5); // (0) DIFFICULTY
|
||||
mMenu.options->addItem(mLang->getText(62), 0, 0, true, false, true); // (1) PLAYER 1 CONTROLS
|
||||
mMenu.options->addItem(mLang->getText(69), 0, 0, false, false); // (2) KEYBOARD
|
||||
mMenu.options->addItem(mLang->getText(63), 0, 0, true, false, true); // (3) PLAYER 2 CONTROLS
|
||||
mMenu.options->addItem(mLang->getText(63), 0, 0, true, false, true); // (3) PLAYER 2 CONTROLS
|
||||
mMenu.options->addItem(mLang->getText(70), 0, 5, false, false); // (4) GAME CONTROLLER
|
||||
mMenu.options->addItem(mLang->getText(8), 0, 5); // (5) LANGUAGE
|
||||
mMenu.options->addItem(mLang->getText(58), 0, 0, true, false, true); // (6) DISPLAY MODE
|
||||
mMenu.options->addItem(mLang->getText(58), 0, 0, true, false, true); // (6) DISPLAY MODE
|
||||
mMenu.options->addItem(mLang->getText(4), 0, 0, false, false); // (7) WINDOWED
|
||||
mMenu.options->addItem(mLang->getText(7)); // (8) WINDOW SIZE
|
||||
mMenu.options->addItem(mLang->getText(60)); // (9) FILTER
|
||||
mMenu.options->addItem(mLang->getText(61), 0, 5); // (10) VSYNC
|
||||
mMenu.options->addItem(mLang->getText(9)); // (11) ACCEPT
|
||||
mMenu.options->addItem(mLang->getText(10)); // (12) CANCEL
|
||||
mMenu.options->setDefaultActionWhenCancel(9);
|
||||
mMenu.options->addItem(mLang->getText(2), 0, 5); // (11) HOW TO PLAY
|
||||
mMenu.options->addItem(mLang->getText(9)); // (12) ACCEPT
|
||||
mMenu.options->addItem(mLang->getText(10)); // (13) CANCEL
|
||||
mMenu.options->setDefaultActionWhenCancel(13);
|
||||
mMenu.options->setBackgroundColor(0x30, 0x30, 0x40, 192);
|
||||
mMenu.options->setSelectorColor(0xe5, 0x1c, 0x23, 255);
|
||||
mMenu.options->setSelectorTextColor(0xFF, 0xF1, 0x76);
|
||||
@@ -353,8 +354,12 @@ void Title::updateMenuLabels()
|
||||
break;
|
||||
}
|
||||
|
||||
i = 2;
|
||||
i++;
|
||||
// PLAYER 1 CONTROLS
|
||||
mMenu.options->setItemCaption(i, mLang->getText(62));
|
||||
|
||||
i++;
|
||||
// PLAYER 1 CONTROLS - OPTIONS
|
||||
switch (mOptions->player1Input)
|
||||
{
|
||||
case INPUT_USE_KEYBOARD:
|
||||
@@ -370,8 +375,12 @@ void Title::updateMenuLabels()
|
||||
break;
|
||||
}
|
||||
|
||||
i = 4;
|
||||
i++;
|
||||
// PLAYER 2 CONTROLS
|
||||
mMenu.options->setItemCaption(i, mLang->getText(63));
|
||||
|
||||
i++;
|
||||
// PLAYER 2 CONTROLS - OPTIONS
|
||||
switch (mOptions->player2Input)
|
||||
{
|
||||
case INPUT_USE_KEYBOARD:
|
||||
@@ -408,8 +417,12 @@ void Title::updateMenuLabels()
|
||||
break;
|
||||
}
|
||||
|
||||
i = 7;
|
||||
i++;
|
||||
// DISPLAY MODE
|
||||
mMenu.options->setItemCaption(i, mLang->getText(58));
|
||||
|
||||
i++;
|
||||
// DISPLAY MODE - OPTIONS
|
||||
switch (mOptions->fullScreenMode)
|
||||
{
|
||||
case 0:
|
||||
@@ -435,7 +448,7 @@ void Title::updateMenuLabels()
|
||||
|
||||
i++;
|
||||
// FILTER
|
||||
if (mOptions->filter == FILTER_BILINEAL)
|
||||
if (mOptions->filter == FILTER_LINEAL)
|
||||
mMenu.options->setItemCaption(i, mLang->getText(60) + ": " + mLang->getText(71)); // BILINEAL
|
||||
else
|
||||
mMenu.options->setItemCaption(i, mLang->getText(60) + ": " + mLang->getText(72)); // LINEAL
|
||||
@@ -447,6 +460,10 @@ void Title::updateMenuLabels()
|
||||
else
|
||||
mMenu.options->setItemCaption(i, mLang->getText(61) + ": " + mLang->getText(74)); // OFF
|
||||
|
||||
i++;
|
||||
// HOW TO PLAY
|
||||
mMenu.options->setItemCaption(i, mLang->getText(2));
|
||||
|
||||
i++;
|
||||
// ACCEPT
|
||||
mMenu.options->setItemCaption(i, mLang->getText(9)); // ACCEPT
|
||||
@@ -462,8 +479,7 @@ void Title::updateMenuLabels()
|
||||
mMenu.title->setItemCaption(0, mLang->getText(51)); // 1 PLAYER
|
||||
mMenu.title->setItemCaption(1, mLang->getText(52)); // 2 PLAYERS
|
||||
mMenu.title->setItemCaption(2, mLang->getText(1)); // OPTIONS
|
||||
//mMenu.title->setItemCaption(3, mLang->getText(2)); // HOW TO PLAY
|
||||
mMenu.title->setItemCaption(3, mLang->getText(3)); // QUIT
|
||||
mMenu.title->setItemCaption(3, mLang->getText(3)); // QUIT
|
||||
|
||||
mMenu.title->centerMenuOnX(SCREEN_CENTER_X);
|
||||
mMenu.title->centerMenuElementsOnX();
|
||||
@@ -707,13 +723,7 @@ section_t Title::run(Uint8 subsection)
|
||||
case 2: // OPTIONS
|
||||
mMenu.active = mMenu.options;
|
||||
mOptionsPrevious = *mOptions;
|
||||
//mOptions->fullScreenModePrevious = mOptions->fullScreenMode;
|
||||
//mOptions->windowSizePrevious = mOptions->windowSize;
|
||||
//mOptions->languagePrevious = mOptions->language;
|
||||
break;
|
||||
//case 3: // HOW TO PLAY
|
||||
// runInstructions(INSTRUCTIONS_MODE_MANUAL);
|
||||
// break;
|
||||
case 3: // QUIT
|
||||
mPostFade = 2;
|
||||
mFade->activateFade();
|
||||
@@ -773,10 +783,10 @@ section_t Title::run(Uint8 subsection)
|
||||
updateMenuLabels();
|
||||
break;
|
||||
case 9: // FILTER
|
||||
if (mOptions->filter == FILTER_BILINEAL)
|
||||
mOptions->filter = FILTER_LINEAL;
|
||||
if (mOptions->filter == FILTER_LINEAL)
|
||||
mOptions->filter = FILTER_NEAREST;
|
||||
else
|
||||
mOptions->filter = FILTER_BILINEAL;
|
||||
mOptions->filter = FILTER_LINEAL;
|
||||
updateMenuLabels();
|
||||
break;
|
||||
case 10: // VSYNC
|
||||
@@ -786,16 +796,16 @@ section_t Title::run(Uint8 subsection)
|
||||
mOptions->vSync = true;
|
||||
updateMenuLabels();
|
||||
break;
|
||||
case 11: // ACCEPT
|
||||
case 11: // HOW TO PLAY
|
||||
runInstructions(INSTRUCTIONS_MODE_MANUAL);
|
||||
break;
|
||||
case 12: // ACCEPT
|
||||
applyOptions();
|
||||
mMenu.active->reset();
|
||||
mMenu.active = mMenu.title;
|
||||
break;
|
||||
case 12: // CANCEL
|
||||
case 13: // CANCEL
|
||||
mOptions = &mOptionsPrevious;
|
||||
//mOptions->fullScreenMode = mOptions->fullScreenModePrevious;
|
||||
//mOptions->windowSize = mOptions->windowSizePrevious;
|
||||
//mOptions->language = mOptions->languagePrevious;
|
||||
updateMenuLabels();
|
||||
mMenu.active->reset();
|
||||
mMenu.active = mMenu.title;
|
||||
@@ -825,11 +835,17 @@ section_t Title::run(Uint8 subsection)
|
||||
// Dibuja los objetos
|
||||
if (mMenu.active->getName() != "OPTIONS")
|
||||
{
|
||||
// Bitmaps con el logo/titulo del juego
|
||||
mCoffeeBitmap->render();
|
||||
mCrisisBitmap->render();
|
||||
|
||||
// Texto con el copyright y versión
|
||||
mText2->writeDX(TXT_CENTER | TXT_SHADOW, SCREEN_CENTER_X, SCREEN_HEIGHT - (BLOCK * 2), TEXT_COPYRIGHT, 1, noColor, 1, shdwTxtColor);
|
||||
}
|
||||
|
||||
if (mMenuVisible == true)
|
||||
mMenu.active->render();
|
||||
|
||||
mDustBitmapR->animate(0);
|
||||
mDustBitmapL->animate(0);
|
||||
mDustBitmapR->render();
|
||||
@@ -839,9 +855,6 @@ section_t Title::run(Uint8 subsection)
|
||||
if ((mCounter % 50 > 14) && (mMenuVisible == false))
|
||||
mText->writeDX(TXT_CENTER | TXT_SHADOW, SCREEN_CENTER_X, PLAY_AREA_THIRD_QUARTER_Y + BLOCK, mLang->getText(23), 1, noColor, 1, shdwTxtColor);
|
||||
|
||||
// Texto con el copyright y versión
|
||||
mText2->writeDX(TXT_CENTER | TXT_SHADOW, SCREEN_CENTER_X, SCREEN_HEIGHT - (BLOCK * 2), TEXT_COPYRIGHT, 1, noColor, 1, shdwTxtColor);
|
||||
|
||||
// Fade
|
||||
mFade->render();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user