Forgot to actually add the new files :(
This commit is contained in:
parent
0de942b5f3
commit
c9936ffb97
@ -6,18 +6,6 @@
|
|||||||
|
|
||||||
<spacer proportion="1" width="25"/>
|
<spacer proportion="1" width="25"/>
|
||||||
|
|
||||||
<div layout="horizontal-row" width="100%" height="50" align="center">
|
|
||||||
<bright proportion="1" height="100%"
|
|
||||||
I18N="In race setup menu" text="Number of AI karts" text_align="right" />
|
|
||||||
<spacer width="50" height="25"/>
|
|
||||||
<!--
|
|
||||||
<spinner id="aikartamount" proportion="3" height="100%" min_value="0" max_value="8" icon="gui/karts%i.png"/> -->
|
|
||||||
<!-- The maximum is set by stk from data/stk_config.xml. -->
|
|
||||||
<spinner id="aikartamount" proportion="1" height="100%" min_value="0" wrap_around="true"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<spacer proportion="1" width="25"/>
|
|
||||||
|
|
||||||
<ribbon id="difficulty" height="135" width="65%" align="center">
|
<ribbon id="difficulty" height="135" width="65%" align="center">
|
||||||
<icon-button id="novice" width="128" height="128" icon="gui/difficulty_easy.png"
|
<icon-button id="novice" width="128" height="128" icon="gui/difficulty_easy.png"
|
||||||
I18N="Difficulty" text="Novice"/>
|
I18N="Difficulty" text="Novice"/>
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include "states_screens/online_screen.hpp"
|
#include "states_screens/online_screen.hpp"
|
||||||
#include "states_screens/options_screen_video.hpp"
|
#include "states_screens/options_screen_video.hpp"
|
||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
|
#include "states_screens/track_info_screen.hpp"
|
||||||
#include "states_screens/user_screen.hpp"
|
#include "states_screens/user_screen.hpp"
|
||||||
#if DEBUG_MENU_ITEM
|
#if DEBUG_MENU_ITEM
|
||||||
#include "states_screens/feature_unlocked.hpp"
|
#include "states_screens/feature_unlocked.hpp"
|
||||||
@ -332,10 +333,18 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
|||||||
#endif
|
#endif
|
||||||
if (selection == "new")
|
if (selection == "new")
|
||||||
{
|
{
|
||||||
|
#undef XX
|
||||||
|
#ifdef XX
|
||||||
|
Track *track = track_manager->getTrack("olivermath");
|
||||||
|
TrackInfoScreen *tis = TrackInfoScreen::getInstance();
|
||||||
|
tis->setTrack(track);
|
||||||
|
StateManager::get()->pushScreen(tis);
|
||||||
|
#else
|
||||||
KartSelectionScreen* s = OfflineKartSelectionScreen::getInstance(); //FIXME : that was for tests
|
KartSelectionScreen* s = OfflineKartSelectionScreen::getInstance(); //FIXME : that was for tests
|
||||||
s->setMultiplayer(false);
|
s->setMultiplayer(false);
|
||||||
s->setFromOverworld(false);
|
s->setFromOverworld(false);
|
||||||
StateManager::get()->pushScreen( s );
|
StateManager::get()->pushScreen( s );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (selection == "multiplayer")
|
else if (selection == "multiplayer")
|
||||||
{
|
{
|
||||||
|
@ -142,12 +142,6 @@ void RaceSetupScreen::eventCallback(Widget* widget, const std::string& name, con
|
|||||||
unlock_manager->playLockSound();
|
unlock_manager->playLockSound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (name == "aikartamount")
|
|
||||||
{
|
|
||||||
SpinnerWidget* w = dynamic_cast<SpinnerWidget*>(widget);
|
|
||||||
race_manager->setNumKarts( race_manager->getNumLocalPlayers() + w->getValue() );
|
|
||||||
UserConfigParams::m_num_karts = race_manager->getNumLocalPlayers() + w->getValue();
|
|
||||||
}
|
|
||||||
else if (name == "back")
|
else if (name == "back")
|
||||||
{
|
{
|
||||||
StateManager::get()->escapePressed();
|
StateManager::get()->escapePressed();
|
||||||
@ -209,16 +203,6 @@ void RaceSetupScreen::onGameModeChanged()
|
|||||||
RaceManager::MinorRaceModeType gamemode =
|
RaceManager::MinorRaceModeType gamemode =
|
||||||
RaceManager::getModeIDFromInternalName(gamemode_str);
|
RaceManager::getModeIDFromInternalName(gamemode_str);
|
||||||
|
|
||||||
// deactivate the AI karts count widget for modes for which we have no AI
|
|
||||||
SpinnerWidget* kartamount = getWidget<SpinnerWidget>("aikartamount");
|
|
||||||
if (!RaceManager::hasAI(gamemode))
|
|
||||||
{
|
|
||||||
kartamount->setDeactivated();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
kartamount->setActivated();
|
|
||||||
}
|
|
||||||
} // onGameModeChanged
|
} // onGameModeChanged
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@ -240,17 +224,6 @@ void RaceSetupScreen::init()
|
|||||||
w->setSelection( UserConfigParams::m_difficulty, PLAYER_ID_GAME_MASTER );
|
w->setSelection( UserConfigParams::m_difficulty, PLAYER_ID_GAME_MASTER );
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinnerWidget* kartamount = getWidget<SpinnerWidget>("aikartamount");
|
|
||||||
kartamount->setActivated();
|
|
||||||
|
|
||||||
// Avoid negative numbers (which can happen if e.g. the number of karts
|
|
||||||
// in a previous race was lower than the number of players now.
|
|
||||||
int num_ai = UserConfigParams::m_num_karts-race_manager->getNumLocalPlayers();
|
|
||||||
if(num_ai<0) num_ai = 0;
|
|
||||||
kartamount->setValue(num_ai);
|
|
||||||
kartamount->setMax(stk_config->m_max_karts - race_manager->getNumLocalPlayers() );
|
|
||||||
race_manager->setNumKarts(num_ai + race_manager->getNumLocalPlayers());
|
|
||||||
|
|
||||||
DynamicRibbonWidget* w2 = getWidget<DynamicRibbonWidget>("gamemode");
|
DynamicRibbonWidget* w2 = getWidget<DynamicRibbonWidget>("gamemode");
|
||||||
assert( w2 != NULL );
|
assert( w2 != NULL );
|
||||||
w2->clearItems();
|
w2->clearItems();
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
#include "race/grand_prix_data.hpp"
|
#include "race/grand_prix_data.hpp"
|
||||||
#include "race/grand_prix_manager.hpp"
|
#include "race/grand_prix_manager.hpp"
|
||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
|
#include "states_screens/track_info_screen.hpp"
|
||||||
#include "states_screens/dialogs/gp_info_dialog.hpp"
|
#include "states_screens/dialogs/gp_info_dialog.hpp"
|
||||||
#include "states_screens/dialogs/random_gp_dialog.hpp"
|
#include "states_screens/dialogs/random_gp_dialog.hpp"
|
||||||
#include "states_screens/dialogs/track_info_dialog.hpp"
|
|
||||||
#include "tracks/track.hpp"
|
#include "tracks/track.hpp"
|
||||||
#include "tracks/track_manager.hpp"
|
#include "tracks/track_manager.hpp"
|
||||||
#include "utils/translation.hpp"
|
#include "utils/translation.hpp"
|
||||||
@ -81,14 +81,8 @@ void TracksScreen::eventCallback(Widget* widget, const std::string& name,
|
|||||||
|
|
||||||
if (clicked_track)
|
if (clicked_track)
|
||||||
{
|
{
|
||||||
ITexture* screenshot =
|
TrackInfoScreen::getInstance()->setTrack(clicked_track);
|
||||||
irr_driver->getTexture(clicked_track->getScreenshotFile(),
|
StateManager::get()->pushScreen(TrackInfoScreen::getInstance());
|
||||||
"While loading screenshot for track '%s':",
|
|
||||||
clicked_track->getFilename() );
|
|
||||||
|
|
||||||
new TrackInfoDialog(selection, clicked_track->getIdent(),
|
|
||||||
translations->fribidize(clicked_track->getName()),
|
|
||||||
screenshot, 0.8f, 0.7f);
|
|
||||||
} // if clicked_track
|
} // if clicked_track
|
||||||
|
|
||||||
} // selection=="random_track"
|
} // selection=="random_track"
|
||||||
@ -104,14 +98,8 @@ void TracksScreen::eventCallback(Widget* widget, const std::string& name,
|
|||||||
Track* clicked_track = track_manager->getTrack(selection);
|
Track* clicked_track = track_manager->getTrack(selection);
|
||||||
if (clicked_track)
|
if (clicked_track)
|
||||||
{
|
{
|
||||||
ITexture* screenshot =
|
TrackInfoScreen::getInstance()->setTrack(clicked_track);
|
||||||
irr_driver->getTexture(clicked_track->getScreenshotFile(),
|
StateManager::get()->pushScreen(TrackInfoScreen::getInstance());
|
||||||
"While loading screenshot for track '%s'",
|
|
||||||
clicked_track->getFilename());
|
|
||||||
|
|
||||||
new TrackInfoDialog(selection, clicked_track->getIdent(),
|
|
||||||
translations->fribidize(clicked_track->getName()),
|
|
||||||
screenshot, 0.8f, 0.7f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // name=="tracks"
|
} // name=="tracks"
|
||||||
|
@ -401,6 +401,7 @@ private:
|
|||||||
/** The number of laps the track will be raced in a random GP.
|
/** The number of laps the track will be raced in a random GP.
|
||||||
* m_actual_number_of_laps is initialised with this value.*/
|
* m_actual_number_of_laps is initialised with this value.*/
|
||||||
int m_default_number_of_laps;
|
int m_default_number_of_laps;
|
||||||
|
|
||||||
/** The number of laps that is predefined in a track info dialog. */
|
/** The number of laps that is predefined in a track info dialog. */
|
||||||
int m_actual_number_of_laps;
|
int m_actual_number_of_laps;
|
||||||
|
|
||||||
@ -419,7 +420,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
bool reverseAvailable() { return m_reverse_available; }
|
bool reverseAvailable() const { return m_reverse_available; }
|
||||||
void handleAnimatedTextures(scene::ISceneNode *node, const XMLNode &xml);
|
void handleAnimatedTextures(scene::ISceneNode *node, const XMLNode &xml);
|
||||||
|
|
||||||
static const float NOHIT;
|
static const float NOHIT;
|
||||||
|
Loading…
Reference in New Issue
Block a user