Ease debugging GPWin/GPLose/FeatureUnlocked scenes
This commit is contained in:
parent
173ee0d510
commit
ed97fca7b3
@ -35,6 +35,14 @@
|
||||
<spacer width="10" height="10" />
|
||||
|
||||
<buttonbar id="menu_bottomrow" x="0" y="0" width="38%" height="100%" align="center">
|
||||
<icon-button id="test_gpwin" width="64" height="64" icon="gui/main_options.png" extend_label="50"
|
||||
text="TEST: GPWin" label_location="hover"/>
|
||||
<icon-button id="test_gplose" width="64" height="64" icon="gui/main_options.png" extend_label="50"
|
||||
text="TEST: GPLose" label_location="hover"/>
|
||||
<icon-button id="test_unlocked" width="64" height="64" icon="gui/main_options.png" extend_label="50"
|
||||
text="TEST: Unlocked" label_location="hover"/>
|
||||
<icon-button id="test_unlocked2" width="64" height="64" icon="gui/main_options.png" extend_label="50"
|
||||
text="TEST: Unlocked 2" label_location="hover"/>
|
||||
<icon-button id="options" width="64" height="64" icon="gui/main_options.png" extend_label="50"
|
||||
I18N="Main menu button" text="Options" label_location="hover"/>
|
||||
<icon-button id="help" width="64" height="64" icon="gui/main_help.png" extend_label="50"
|
||||
|
@ -80,6 +80,13 @@ void MainMenuScreen::loadedFromFile()
|
||||
{
|
||||
LabelWidget* w = getWidget<LabelWidget>("info_addons");
|
||||
w->setScrollSpeed(15);
|
||||
|
||||
#if DEBUG_MENU_ITEM != 1
|
||||
RibbonWidget* rw = getWidget<RibbonWidget>("menu_bottomrow");
|
||||
rw->removeChildNamed("test_gpwin");
|
||||
rw->removeChildNamed("test_gplose");
|
||||
rw->removeChildNamed("test_unlocked");
|
||||
#endif
|
||||
} // loadedFromFile
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -230,14 +237,12 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
*/
|
||||
|
||||
#if DEBUG_MENU_ITEM
|
||||
if (selection == "gpEditor")
|
||||
if (selection == "test_gpwin")
|
||||
{
|
||||
// The DEBUG item
|
||||
StoryModeStatus* sms = PlayerManager::getCurrentPlayer()->getStoryModeStatus();
|
||||
sms->unlockFeature(const_cast<ChallengeStatus*>(sms->getChallengeStatus("gp1")),
|
||||
RaceManager::DIFFICULTY_HARD);
|
||||
|
||||
// GP WIN
|
||||
StateManager::get()->enterGameState();
|
||||
race_manager->setMinorMode(RaceManager::MINOR_MODE_CUTSCENE);
|
||||
race_manager->setNumKarts(0);
|
||||
@ -248,9 +253,9 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
StateManager::get()->pushScreen(scene);
|
||||
const std::string winners[] = { "elephpant", "nolok", "pidgin" };
|
||||
scene->setKarts(winners);
|
||||
|
||||
// GP Lose
|
||||
/*
|
||||
}
|
||||
else if (selection == "test_gplose")
|
||||
{
|
||||
StateManager::get()->enterGameState();
|
||||
race_manager->setMinorMode(RaceManager::MINOR_MODE_CUTSCENE);
|
||||
race_manager->setNumKarts(0);
|
||||
@ -265,10 +270,13 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
//losers.push_back("wilber");
|
||||
//losers.push_back("tux");
|
||||
scene->setKarts(losers);
|
||||
*/
|
||||
|
||||
/*
|
||||
// FEATURE UNLOCKED
|
||||
}
|
||||
else if (selection == "test_unlocked" || selection == "test_unlocked2")
|
||||
{
|
||||
StoryModeStatus* sms = PlayerManager::getCurrentPlayer()->getStoryModeStatus();
|
||||
sms->unlockFeature(const_cast<ChallengeStatus*>(sms->getChallengeStatus("gp1")),
|
||||
RaceManager::DIFFICULTY_HARD);
|
||||
|
||||
StateManager::get()->enterGameState();
|
||||
race_manager->setMinorMode(RaceManager::MINOR_MODE_CUTSCENE);
|
||||
race_manager->setNumKarts(0);
|
||||
@ -284,12 +292,8 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
((CutsceneWorld*)World::getWorld())->setParts(parts);
|
||||
|
||||
scene->addTrophy(RaceManager::DIFFICULTY_EASY);
|
||||
//StateManager::get()->pushScreen(scene);
|
||||
|
||||
static int i = 1;
|
||||
i++;
|
||||
|
||||
if (i % 2 == 0)
|
||||
if (selection == "test_unlocked")
|
||||
{
|
||||
// the passed kart will not be modified, that's why I allow myself
|
||||
// to use const_cast
|
||||
@ -299,9 +303,10 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
),
|
||||
L"Unlocked"
|
||||
);
|
||||
scene->addUnlockedTrack(track_manager->getTrack("lighthouse"));
|
||||
StateManager::get()->pushScreen(scene);
|
||||
}
|
||||
else if (i % 2 == 1)
|
||||
else if (selection == "test_unlocked2")
|
||||
{
|
||||
std::vector<video::ITexture*> textures;
|
||||
textures.push_back(irr_driver->getTexture(
|
||||
@ -321,7 +326,6 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
|
||||
StateManager::get()->pushScreen(scene);
|
||||
}
|
||||
*/
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user