Added GP lose animation (not yet shown when actually playing, for now click on the 'network' button to see it as usual)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5454 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
8a22990d7f
commit
1bdca718cb
5
data/gui/grand_prix_win.stkgui
Normal file
5
data/gui/grand_prix_win.stkgui
Normal file
@ -0,0 +1,5 @@
|
||||
<stkgui>
|
||||
|
||||
<button id="continue" x="20" y="-40" width="250" height="35" align="left" text="Continue"/>
|
||||
|
||||
</stkgui>
|
BIN
data/models/gplose.b3d
Normal file
BIN
data/models/gplose.b3d
Normal file
Binary file not shown.
BIN
data/models/gplose_door.b3d
Normal file
BIN
data/models/gplose_door.b3d
Normal file
Binary file not shown.
@ -280,8 +280,10 @@ supertuxkart_SOURCES = \
|
||||
states_screens/arenas_screen.hpp \
|
||||
states_screens/feature_unlocked.cpp \
|
||||
states_screens/feature_unlocked.hpp \
|
||||
states_screens/grand_prix_over.cpp \
|
||||
states_screens/grand_prix_over.hpp \
|
||||
src/states_screens/grand_prix_lose.cpp \
|
||||
src/states_screens/grand_prix_lose.hpp \
|
||||
src/states_screens/grand_prix_win.cpp \
|
||||
src/states_screens/grand_prix_win.hpp \
|
||||
states_screens/help_screen_1.cpp \
|
||||
states_screens/help_screen_1.hpp \
|
||||
states_screens/help_screen_2.cpp \
|
||||
|
@ -429,6 +429,7 @@ namespace GUIEngine
|
||||
|
||||
int font_height;
|
||||
int small_font_height;
|
||||
int title_font_height;
|
||||
}
|
||||
using namespace Private;
|
||||
|
||||
@ -496,6 +497,12 @@ namespace GUIEngine
|
||||
return g_focus_for_player[playerID]->isSameIrrlichtWidgetAs(w);
|
||||
}
|
||||
|
||||
int getTitleFontHeight()
|
||||
{
|
||||
return Private::title_font_height;
|
||||
}
|
||||
|
||||
|
||||
int getFontHeight()
|
||||
{
|
||||
return Private::font_height;
|
||||
@ -677,7 +684,8 @@ namespace GUIEngine
|
||||
sfont2->setKerningWidth(-18);
|
||||
sfont2->m_black_border = true;
|
||||
g_title_font = sfont2;
|
||||
|
||||
Private::title_font_height = g_title_font->getDimension( L"X" ).Height;
|
||||
|
||||
|
||||
if (g_font != NULL) g_skin->setFont(g_font);
|
||||
|
||||
|
@ -148,6 +148,9 @@ namespace GUIEngine
|
||||
*/
|
||||
inline Skin* getSkin() { return Private::g_skin; }
|
||||
|
||||
/** \return the height of the title font in pixels */
|
||||
int getTitleFontHeight();
|
||||
|
||||
/** \return the height of the font in pixels */
|
||||
int getFontHeight();
|
||||
|
||||
|
@ -33,7 +33,8 @@
|
||||
#include "modes/world.hpp"
|
||||
#include "modes/three_strikes_battle.hpp"
|
||||
#include "network/network_manager.hpp"
|
||||
#include "states_screens/grand_prix_over.hpp"
|
||||
#include "states_screens/grand_prix_lose.hpp"
|
||||
#include "states_screens/grand_prix_win.hpp"
|
||||
#include "states_screens/kart_selection.hpp"
|
||||
#include "states_screens/main_menu_screen.hpp"
|
||||
#include "states_screens/state_manager.hpp"
|
||||
@ -397,14 +398,18 @@ void RaceManager::exitRace()
|
||||
unlock_manager->grandPrixFinished();
|
||||
|
||||
StateManager::get()->resetAndGoToScreen( MainMenuScreen::getInstance() );
|
||||
StateManager::get()->pushScreen ( GrandPrixOver::getInstance() );
|
||||
|
||||
// TODO: show lose screen when losing
|
||||
StateManager::get()->pushScreen ( GrandPrixWin::getInstance() );
|
||||
|
||||
std::string winners[3];
|
||||
for (unsigned int i=0; i < m_kart_status.size(); ++i)
|
||||
{
|
||||
if(UserConfigParams::m_verbosity>=5)
|
||||
{
|
||||
std::cout << m_kart_status[i].m_ident << " has GP final rank "
|
||||
<< m_kart_status[i].m_gp_rank << std::endl;
|
||||
}
|
||||
|
||||
const int rank = m_kart_status[i].m_gp_rank;
|
||||
if (rank >= 0 && rank < 3)
|
||||
@ -413,7 +418,7 @@ void RaceManager::exitRace()
|
||||
}
|
||||
}
|
||||
|
||||
GrandPrixOver::getInstance()->setKarts(winners);
|
||||
GrandPrixWin::getInstance()->setKarts(winners);
|
||||
}
|
||||
|
||||
World::deleteWorld();
|
||||
|
Loading…
Reference in New Issue
Block a user