1 #ifndef BTAKS_SHOP_ITEM_H___
2 #define BTAKS_SHOP_ITEM_H___
3 
4 #include "container.h"
5 #include "campaign.h"
6 
7 class Label;
8 class Animation;
9 class AnimationModel;
10 class Pose;
11 class Button;
12 
13 struct ShopItem : public Container {
14 public:
15 	ShopItem(const Campaign &campaign, const Campaign::ShopItem &item, const int w);
16 	void revalidate(const Campaign &campaign, const Campaign::ShopItem &item, const bool active);
17 	virtual void render(sdlx::Surface &surface, const int x, const int y) const;
18 	virtual void tick(const float dt);
19 
wasSoldShopItem20 	const bool wasSold() const { return sold; }
21 
22 private:
23 	Label *_name, *_price, *_amount;
24 	Button * _b_plus, *_b_minus;
25 	bool _active;
26 	const Animation *_animation;
27 	const AnimationModel *_animation_model;
28 	const sdlx::Surface *_surface;
29 	const Pose * _pose;
30 
31 	int xbase, ybase;
32 
33 	float t, dir_speed, dir_t;
34 	bool sold;
35 };
36 
37 #endif
38 
39