Add sample implementatiomn for ticket 263, add text to hover over karts, in follow the leader
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11242 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -20,12 +20,16 @@
|
||||
#include "audio/music_manager.hpp"
|
||||
#include "challenges/unlock_manager.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "items/powerup_manager.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "states_screens/race_gui_base.hpp"
|
||||
#include "tracks/track.hpp"
|
||||
#include "utils/translation.hpp"
|
||||
|
||||
#include <ISceneManager.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
FollowTheLeaderRace::FollowTheLeaderRace() : LinearWorld()
|
||||
{
|
||||
@@ -48,6 +52,24 @@ FollowTheLeaderRace::~FollowTheLeaderRace()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void FollowTheLeaderRace::init()
|
||||
{
|
||||
LinearWorld::init();
|
||||
|
||||
core::dimension2d<u32> textsize = GUIEngine::getFont()->getDimension(_("Leader"));
|
||||
scene::ISceneManager* sm = irr_driver->getSceneManager();
|
||||
sm->addBillboardTextSceneNode(GUIEngine::getFont(),
|
||||
_("Leader"),
|
||||
getKart(0)->getNode(),
|
||||
core::dimension2df(textsize.Width/55.0f,
|
||||
textsize.Height/55.0f),
|
||||
core::vector3df(0.0f, 1.5f, 0.0f),
|
||||
-1 /* id */,
|
||||
video::SColor(255, 255, 225, 0),
|
||||
video::SColor(255, 255, 89, 0));
|
||||
}
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark clock events
|
||||
|
||||
Reference in New Issue
Block a user