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"/>
|
||||
|
||||
<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">
|
||||
<icon-button id="novice" width="128" height="128" icon="gui/difficulty_easy.png"
|
||||
I18N="Difficulty" text="Novice"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Modify this file to change the last-modified date when you add/remove a file.
|
||||
# This will then trigger a new cmake run automatically.
|
||||
# This will then trigger a new cmake run automatically.
|
||||
file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp")
|
||||
file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp")
|
||||
file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*")
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "states_screens/online_screen.hpp"
|
||||
#include "states_screens/options_screen_video.hpp"
|
||||
#include "states_screens/state_manager.hpp"
|
||||
#include "states_screens/track_info_screen.hpp"
|
||||
#include "states_screens/user_screen.hpp"
|
||||
#if DEBUG_MENU_ITEM
|
||||
#include "states_screens/feature_unlocked.hpp"
|
||||
@ -332,10 +333,18 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
#endif
|
||||
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
|
||||
s->setMultiplayer(false);
|
||||
s->setFromOverworld(false);
|
||||
StateManager::get()->pushScreen( s );
|
||||
#endif
|
||||
}
|
||||
else if (selection == "multiplayer")
|
||||
{
|
||||
|
@ -142,12 +142,6 @@ void RaceSetupScreen::eventCallback(Widget* widget, const std::string& name, con
|
||||
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")
|
||||
{
|
||||
StateManager::get()->escapePressed();
|
||||
@ -209,16 +203,6 @@ void RaceSetupScreen::onGameModeChanged()
|
||||
RaceManager::MinorRaceModeType gamemode =
|
||||
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
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -240,17 +224,6 @@ void RaceSetupScreen::init()
|
||||
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");
|
||||
assert( w2 != NULL );
|
||||
w2->clearItems();
|
||||
|
@ -28,9 +28,9 @@
|
||||
#include "race/grand_prix_data.hpp"
|
||||
#include "race/grand_prix_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/random_gp_dialog.hpp"
|
||||
#include "states_screens/dialogs/track_info_dialog.hpp"
|
||||
#include "tracks/track.hpp"
|
||||
#include "tracks/track_manager.hpp"
|
||||
#include "utils/translation.hpp"
|
||||
@ -81,14 +81,8 @@ void TracksScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
|
||||
if (clicked_track)
|
||||
{
|
||||
ITexture* screenshot =
|
||||
irr_driver->getTexture(clicked_track->getScreenshotFile(),
|
||||
"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);
|
||||
TrackInfoScreen::getInstance()->setTrack(clicked_track);
|
||||
StateManager::get()->pushScreen(TrackInfoScreen::getInstance());
|
||||
} // if clicked_track
|
||||
|
||||
} // selection=="random_track"
|
||||
@ -104,14 +98,8 @@ void TracksScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
Track* clicked_track = track_manager->getTrack(selection);
|
||||
if (clicked_track)
|
||||
{
|
||||
ITexture* screenshot =
|
||||
irr_driver->getTexture(clicked_track->getScreenshotFile(),
|
||||
"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);
|
||||
TrackInfoScreen::getInstance()->setTrack(clicked_track);
|
||||
StateManager::get()->pushScreen(TrackInfoScreen::getInstance());
|
||||
}
|
||||
}
|
||||
} // name=="tracks"
|
||||
|
@ -401,6 +401,7 @@ private:
|
||||
/** The number of laps the track will be raced in a random GP.
|
||||
* m_actual_number_of_laps is initialised with this value.*/
|
||||
int m_default_number_of_laps;
|
||||
|
||||
/** The number of laps that is predefined in a track info dialog. */
|
||||
int m_actual_number_of_laps;
|
||||
|
||||
@ -419,7 +420,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
bool reverseAvailable() { return m_reverse_available; }
|
||||
bool reverseAvailable() const { return m_reverse_available; }
|
||||
void handleAnimatedTextures(scene::ISceneNode *node, const XMLNode &xml);
|
||||
|
||||
static const float NOHIT;
|
||||
|
Loading…
Reference in New Issue
Block a user