~ubuntu-branches/ubuntu/maverick/btanks/maverick

« back to all changes in this revision

Viewing changes to engine/menu/medals.h

  • Committer: Bazaar Package Importer
  • Author(s): Ansgar Burchardt
  • Date: 2010-01-17 00:02:57 UTC
  • mfrom: (4.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100117000257-iw6esnvsz1rvp6kb
Tags: 0.9.8083-2
* Fix build failure when building only arch-specific package.
* debian/control: Add DM-Upload-Allowed: yes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef BTANKS_MENU_MEDALS_H__
 
2
#define BTANKS_MENU_MEDALS_H__
 
3
 
 
4
#include "container.h"
 
5
 
 
6
namespace sdlx {
 
7
        class Surface;
 
8
}
 
9
 
 
10
class Campaign;
 
11
class Label;
 
12
class Tooltip;
 
13
class Image;
 
14
class Box;
 
15
 
 
16
class Medals : public Container {
 
17
public: 
 
18
        Medals(int w, int h); 
 
19
        bool onKey(const SDL_keysym sym);
 
20
        bool onMouse(const int button, const bool pressed, const int x, const int y);
 
21
        virtual void hide(const bool hide = true);
 
22
        void set(const Campaign * c);
 
23
        virtual void render(sdlx::Surface &surface, const int x, const int y) const;
 
24
        
 
25
        void tick(const float dt);
 
26
        
 
27
        void left();
 
28
        void right();
 
29
 
 
30
private: 
 
31
        void update();
 
32
        void validate();
 
33
        void get_medals(const std::string &id, int &now, int &total) const;
 
34
        
 
35
        int _w, _h;
 
36
 
 
37
        const Campaign * campaign;
 
38
        std::vector<Image *> tiles;
 
39
        int active;
 
40
 
 
41
        Box *background;
 
42
        Label * title, *numbers;
 
43
        Tooltip * hint;
 
44
        Image *b_left, *b_right;
 
45
        
 
46
        float length;
 
47
        float dir_x;
 
48
};
 
49
 
 
50
#endif
 
51