19#ifndef HEADER_FEATURE_UNLOCKED_HPP
20#define HEADER_FEATURE_UNLOCKED_HPP
22#include "graphics/irr_driver.hpp"
23#include "guiengine/screen.hpp"
24#include "race/race_manager.hpp"
25#include "utils/ptr_vector.hpp"
30 namespace scene {
class ISceneNode;
class ICameraSceneNode;
31 class ILightSceneNode; }
60 std::string m_unlock_model;
65 std::vector<std::shared_ptr<SP::SPTexture> > m_sp_pictures;
75 scene::ISceneNode* m_side_1;
76 scene::ISceneNode* m_side_2;
80 irr::core::stringw m_unlock_message;
82 UnlockedThing(
const std::string &model,
const irr::core::stringw &msg);
93 const irr::core::stringw &msg);
101 UnlockedThing(std::vector<irr::video::ITexture*> picts,
float w,
float h,
102 const irr::core::stringw &msg);
122 void continueButtonPressed();
126 virtual void onCutsceneEnd() OVERRIDE;
135 void init() OVERRIDE;
141 const
int playerID) OVERRIDE;
143 void findWhatWasUnlocked(
RaceManager::Difficulty difficulty,
155 const irr::core::stringw &msg);
161 float w,
float h, irr::core::stringw msg);
163 void addUnlockedTrack(const
Track* track);
the description of one challenge
Definition: challenge_data.hpp:35
Screen shown when a feature has been unlocked.
Definition: feature_unlocked.hpp:49
void tearDown() OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: feature_unlocked.cpp:483
virtual void loadedFromFile() OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: feature_unlocked.cpp:180
void addUnlockedKart(const KartProperties *unlocked_kart)
Call before showing up the screen to make a kart come out of the chest.
Definition: feature_unlocked.cpp:307
void eventCallback(GUIEngine::Widget *widget, const std::string &name, const int playerID) OVERRIDE
will be called everytime something happens.
Definition: feature_unlocked.cpp:764
void addUnlockedPicture(irr::video::ITexture *picture, float w, float h, const irr::core::stringw &msg)
Call before showing up the screen to make a picture come out of the chest 'addUnlockedThings' will in...
Definition: feature_unlocked.cpp:321
virtual bool onEscapePressed() OVERRIDE
override from base class to handle escape press
Definition: feature_unlocked.cpp:735
void init() OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: feature_unlocked.cpp:351
virtual MusicInformation * getInGameMenuMusic() const OVERRIDE
Definition: feature_unlocked.cpp:776
void addUnlockedPictures(std::vector< irr::video::ITexture * > pictures, float w, float h, irr::core::stringw msg)
Call before showing up the screen to make a picture slideshow come out of the chest 'addUnlockedThing...
Definition: feature_unlocked.cpp:341
PtrVector< KartModel > m_all_kart_models
To store the copy of the KartModel for each unlocked kart.
Definition: feature_unlocked.hpp:111
float m_key_angle
Angle of the key (from 0 to 1, simply traces progression)
Definition: feature_unlocked.hpp:120
void addTrophy(RaceManager::Difficulty difficulty, bool is_grandprix)
Call before showing up the screen to make whatever the passed challenges unlocked come out of the che...
Definition: feature_unlocked.cpp:240
float m_global_time
Global evolution of time.
Definition: feature_unlocked.hpp:114
float m_key_pos
Key position from origin (where the chest is)
Definition: feature_unlocked.hpp:117
PtrVector< UnlockedThing, HOLD > m_unlocked_stuff
The list of all unlocked things.
Definition: feature_unlocked.hpp:108
void onUpdate(float dt) OVERRIDE
implement optional callback from parent class GUIEngine::Screen
Definition: feature_unlocked.cpp:501
Definition: screen.hpp:344
Declares a class to be a singleton.
Definition: screen.hpp:59
Simple class that hold the data relevant to a 'grand_prix', aka.
Definition: grand_prix_data.hpp:36
This class stores a 3D kart model.
Definition: kart_model.hpp:168
This class stores the properties of a kart.
Definition: kart_properties.hpp:60
Definition: ptr_vector.hpp:44
The race manager has two functions: 1) it stores information about the race the user selected (e....
Definition: race_manager.hpp:88
Definition: track.hpp:114
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33
Whichever of these is non-null decides what comes out of the chest.
Definition: feature_unlocked.hpp:56
const KartProperties * m_unlocked_kart
Will be non-null if this unlocked thing is a kart.
Definition: feature_unlocked.hpp:58
float m_w
Will be set if this unlocked thing is a picture.
Definition: feature_unlocked.hpp:68
std::vector< irr::video::ITexture * > m_pictures
Will be non-empty if this unlocked thing is one or many pictures.
Definition: feature_unlocked.hpp:63
scene::ISceneNode * m_root_gift_node
Contains whatever is in the chest.
Definition: feature_unlocked.hpp:73
int m_curr_image
used for slideshows
Definition: feature_unlocked.hpp:70