-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu_Notes.txt
More file actions
68 lines (60 loc) · 1.56 KB
/
Copy pathMenu_Notes.txt
File metadata and controls
68 lines (60 loc) · 1.56 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
Json File -> In-Game Menu
Menu behavior (description):
all items are stacked along the specified direction, firsly buttons, then submenus.Items are cut off if they're too long perpendicular to the direction, but scroll bars appear parallel to the direction.
Menu behavior:
size = (22,11)
direction = down
buttons = [(3,3),(6,2)]
submenus = [(12,12)]
+------------------+-+
| +-+ | |
| | | |S|
| +-+ |C|
| |R|
| +----+ |O|
| +----+ |L|
| |L|
| +----------+ | |
+------------------+-+
Menu behavior:
size=(24,12);
direction = down;
submenus = [
{size=(22,3),direction=right,buttons=[(1,1),(1,1),(1,1),(1,1),(2,1),(1,1),(1,1)]},
{size=(22,7),direction=down,buttons=[(10,1),(40,1),(10,1)]}
]
+----------------------+
|+--------------------+|
|| + + + + ++ + + ||
|+--------------------+|
|+--------------------+|
|| +--------+ ||
|| ||
||--------------------||
|| ||
|| +--------+ ||
|+--------------------+|
+----------------------+
class MenuMaster
{
Menu menus[]
enum menuOptions {exit=0, ...}
}
class Menu
{
Submenu submenus[]
FixedMenubutton buttons[]
Rect size
enum direction {up, down, left, right}
// other stuff relating to how it looks
string imagePath
int borderThickness
int itemSeparationDistance
}
class MenuButton
{
Rect size
int menuOption // refers to the MenuMaster
int shortcut // optional keyboard shortcut
// MenuButtons are going to have to have some way of figuring out frames from a spritesheet + frame file.
}