-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUI_Info.h
More file actions
133 lines (98 loc) · 4.39 KB
/
Copy pathUI_Info.h
File metadata and controls
133 lines (98 loc) · 4.39 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#ifndef UI_INFO_H
#define UI_INFO_H
#include "CMUgraphicsLib\CMUgraphics.h"
// User Interface information file.
// This file contains info that is needed by Input and Output classes to
// handle the user interface
#define NumHorizontalCells 11
#define NumVerticalCells 5
#define MaxPlayerCount 2
#define MaxAvailableCommands 10
enum GUI_MODE // Graphical user interface mode
{
MODE_DESIGN, // Design mode (startup mode)
MODE_PLAY // Play mode
};
enum DESIGN_MODE_ITEMS // The items of the Design Mode (you should add more items)
{
// Note: Items MUST be ordered here as they appear in menu
// If you want to change the menu items order, change the order here
ITM_SET_FLAG_CELL,
ITM_EXIT,
ITM_SWITCH_TO_PLAY_MODE,
ITM_ADD_ANTENNA,
ITM_ADD_BELT,
ITM_ADD_WATER_PIT,
ITM_ADD_DANGER_ZONE,
ITM_ADD_WORKSHOP,
ITM_ADD_ROTATING_GEAR_CLOCKWISE,
ITM_ADD_ROTATING_GEAR_COUNTER_CLOCKWISE,
ITM_COPY_GAME_OBJECT,
ITM_CUT_GAME_OBJRCT,
ITM_PASTE_GAME_OBJECT,
ITM_DELETE_GAME_OBJECT,
ITM_SAVE_GRID,
ITM_LOAD_and_OPEN_GRID,
///TODO: Add more items names here #######DONE
DESIGN_ITM_COUNT // no. of items ==> This should be the last line in this enum
};
enum PLAY_MODE_ITEMS // The items of the Play Mode (you should add more items)
{
// Note: Items are ordered here as they appear in menu
// If you want to change the menu items order, change the order here
///TODO: Add more items names here
ITM_EXECUTE_COMMANDS,
ITM_SELECT_COMMAND,
ITM_REBOOT_AND_REPAIR,
ITM_SWITCH_TO_DESIGN_MODE,
ITM_USE_CONSUMABLE,
ITM_NEW_GAME,
ITM_EXIT_1,
ITM_EXIT_2,
PLAY_ITM_COUNT // no. of items ==> This should be the last line in this enum
};
__declspec(selectany) // This line to prevent "redefinition error"
struct UI_Info // User Interface Info.
{
GUI_MODE InterfaceMode;
int width, height, // Window width and height
wx , wy, // Window starting coordinates
ToolBarHeight, // Tool Bar Height (distance from top of window to bottom line of toolbar)
CommandsBarHeight, // Commands Bar Height (distance from bottom of window to bottom line of commands bar)
StatusBarHeight, // Status Bar Height
MenuItemWidth, // Width of each item in toolbar menu
CommandItemWidth; // Width of the saved commands in the commands bar (not the available commands)
int CellHeight; // Height of 1 CELL
int CellWidth; // Width of 1 CELL
color MsgColor; // Messages color (usually used in statusbar)
color PlayerInfoColor; // Players' Info color (used in the toolbar - right-indented)
color CommandBarTextColor; // Commands Bar text color
color CellColor; // Default Cell color
color ToolBarColor; // Toolbar color (toolbar background)
color StatusBarColor; // Statusbar color (statusbar background)
color CommandBarColor; // Commands Bar background color
color GridLineColor; // Color of the Lines separating adjacent cells
int CellNumFont; // Font size of cell numbers
color CellNumColor; // Cell number color
color BeltColor; // Color of the belt
color FlagColor; // Color of the flag
color FlagPoleColor; // Color of the flag pole (the vertical part of the flag)
color DangerZoneCellColor; // Color of the danger zone cells
color WaterPitsCellColor; // Color of the water pits cells
int SpaceBetweenCommandsSlots; // Space between the slots of the saved commands in the commands bar
int AvailableCommandsXOffset; // Size of the horizontal space before drawing the available commands
int AvailableCommandsYOffset; // Size of the vertical space between the start of the command bar and the cards of available commands
// will be used in detecting selected command from the user click
int BeltXOffset; // Size of the horizontal space before drawing the belt
int BeltYOffset; // Size of the vertical space before drawing the belt
int BeltLineWidth; // Width of the belt line
int FlagWidth; // Width of the flag
int FlagHeight; // Height of the flag
int FlagPoleWidth; // Width of the flag pole
int FlagPoleHeight; // Height of the flag pole
color PlayerColors[MaxPlayerCount]; // Color of each player
int CommandItemsCount; // Number of commands the player can use
int AvailableCommandsCount; // Number of available commands the player can select from
///TODO: Add more members if needed
} UI ; // create a global object UI
#endif