Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
drawlist.h
Go to the documentation of this file.
1 #ifndef _DRAWLIST_H_
2 #define _DRAWLIST_H_
3 
4 #include <stdlib.h>
5 #include <string>
6 #include "cmd/unit_generic.h"
7 #include "navscreenoccupied.h"
8 #include "gui/glut_support.h"
9 
10 //#include "masks.h"
11 #include "navscreen.h"
12 #include "navitemtypes.h"
13 
15 {
16 public:
17  int type;
18  float size;
19  float x;
20  float y;
21 
24 
25  navdrawnode();
26  navdrawnode( int type, float size, float x, float y, navdrawnode *nextitem );
27  navdrawnode( int type, float size, float x, float y, Unit *source, navdrawnode *nextitem );
28 };
29 
30 void drawdescription( Unit *source,
31  float x,
32  float y,
33  float size_x,
34  float size_y,
35  bool ignore_occupied_areas,
36  navscreenoccupied *screenoccupation,
37  const GFXColor &col );
38 void drawdescription( string text,
39  float x,
40  float y,
41  float size_x,
42  float size_y,
43  bool ignore_occupied_areas,
44  navscreenoccupied *screenoccupation,
45  const GFXColor &col );
46 
47 void drawlistitem( int type,
48  float size,
49  float x,
50  float y,
51  Unit *source,
52  navscreenoccupied *screenoccupation,
53  bool inmouserange,
54  bool currentistail,
55  float unselectedalpha,
56  GFXColor *factioncolours );
57 
58 class navdrawlist //not really a list... it inserts at head, and reads head first. like a stack, but it isnt popping. its just going through it, and whiping.
59 {
60  int n_contents;
61  bool inmouserange;
62  bool localcolours;
63  navdrawnode *head;
64  navdrawnode *tail;
65  GFXColor *factioncolours;
66  navscreenoccupied *screenoccupation;
67 
68 //this is a restatement of that found in the navscreen
69  float screenskipby4[4]; //0 = x-small 1 = x-large 2 = y-small 3 = y-large
70 
71 //10 sectors for text on the nav screen.
72 //10 sectors across, divided into 32 sections top/down.
73 
74 public:
75  void insert( int type, float size, float x, float y );
76  void insert( int type, float size, float x, float y, Unit *source );
77  void wipe();
78  void rotate();
79  void draw();
80  int get_n_contents();
82  Unit * gettailunit();
83  navdrawlist( bool mouse, navscreenoccupied *screenoccupation, GFXColor *factioncolours );
84  ~navdrawlist();
85 };
86 
87 #endif
88