-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUI_Info.h
97 lines (73 loc) · 3.04 KB
/
UI_Info.h
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
#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 9
#define MaxPlayerCount 4
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_ADD_LADDER,
ITM_ADD_SNAKE,
ITM_ADD_CARD,
ITM_COPY_CARD, /**/
ITM_CUT_CARD, /**/
ITM_PASTE_CARD, /**/
ITM_DELETE_GAME_OBJECT, /**/
ITM_SAVE_GRID, /**/
ITM_OPEN_GRID, /**/
ITM_SWITCH_TO_PLAY_MODE,
ITM_EXIT_DESIGN_MODE,
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
ITM_ROLL_DICE,
ITM_INPUT_DICE_VALUE, /**/
ITM_NEW_GAME, /**/
ITM_SWITCH_TO_DESIGN_MODE,
ITM_EXIT_PLAY_MODE, /**/
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
StatusBarHeight, // Status Bar Height
ToolBarHeight, // Tool Bar Height (distance from top of window to bottom line of toolbar)
MenuItemWidth; // Width of each item in toolbar menu
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 CellColor_HasCard; // Cell color if it has a card
color CellColor_NoCard; // Cell color if it does not have card
color ToolBarColor; // Toolbar color (toolbar background)
color StatusBarColor; // Statusbar color (statusbar background)
color GridLineColor; // Color of the Lines separating adjacent cells
int CellNumFont; // Font size of cell numbers
color CellNumColor; // Cell number color
int CardNumFont; // Font size of card numbers
color CardNumColor; // Card number color
int LadderXOffset; // Size of the horizontal space before drawing the ladder
int LadderYOffset; // Size of the vertical space before drawing the ladder
int LadderlineWidth; // Width of the lines of the ladder
color LadderColor; // Ladder color
int SnakelineWidth; // Width of the line and polygon of the snake
color SnakeColor; // Snake color
color PlayerColors[MaxPlayerCount]; // Color of each player
} UI ; // create a global object UI
#endif