1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
#ifndef SHOPSCREEN_H
#define SHOPSCREEN_H
#include <ClanLib/display.h>
#include "cascreen.h"
#include "utils/trophymath.h"
#include "guibox.h"
class Player;
class CAImageHueSelector;
class CAImageSelector;
class CAImageView;
class CACarUpgrades;
/** The shop screen shown after every race where players can buy upgrade and new cars
@author Matthieu Lecesne
*/
class ShopScreen : public CAScreen
{
public:
ShopScreen(Player* player, CL_Surface* background, CL_Surface* button, CL_Font* font, CACarUpgrades* carRes);
virtual ~ShopScreen();
virtual int run();
virtual void buildScreen();
virtual void on_key_released (const CL_InputEvent &key);
private:
void updateText();
//! the human player
Player* m_player;
//! The Background Surface
CL_Surface* m_background;
//! The button use
CL_Surface* m_button;
//! The font use for display car information
CL_Font* m_font;
//! Upgrades ressources manager
CACarUpgrades* m_carRes;
//! Left border position.
int left;
//! Right border position.
int right;
//! Top border position.
int top;
//! Bottom border position.
int bottom;
//! Car image selector.
CAImageSelector* m_carImage;
//! the 3 bottom boxes (upgrades)
CAImageView* m_imageView[3];
// ! the continue box
CAImageView* m_continue;
//! the widget which have focus
CAWidget* m_focus;
//! White Box
GUIBox m_guiBox;
int m_barHeight;
std::string m_text;
bool m_confirmMode;
int m_cursor;
bool m_isAbleToBuy;
const int m_curWidth;
public:
CL_Slot slot;
};
#endif
|