-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinc__r2menu_h.pas
More file actions
68 lines (53 loc) · 1.67 KB
/
inc__r2menu_h.pas
File metadata and controls
68 lines (53 loc) · 1.67 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
{*******************************************************************************
NFK [R2]
Render Library / Menu object
Header
Contains:
...
*******************************************************************************}
const
mLabel = 1;
mPicture = 2;
//------------------------------------------------------------------------------
type
r2menuLabel = class
public
Text: string; // title aka caption
Font: byte;
Color: cardinal;
Effect: cardinal;
Left : integer; //[Left;Top;Width;Height]
Top: integer;
State: byte;
end;
//------------------------------------------------------------------------------
type
r2menuItem = class
public
mType: byte; //[mLabel;mPicture]
mState: byte; //[Pressed;Hover;Normal]
procedure OnClick(Sender: r2menuLabel);
procedure OnMouseIn(Sender: r2menuLabel);
procedure OnMouseOut(Sender: r2menuLabel);
end;
//------------------------------------------------------------------------------
type
r2menuScreen = class
public
script: TStringList;
Caption: string;
mLabels: array [0..100] of r2menuLabel;
ItemOrder: array [0..100] of r2menuItem;
itemsCount: byte;
procedure AddItem(Text: string; Font: string; Color: cardinal; Effect: cardinal; Region: TRect; Stete: byte);
end;
//------------------------------------------------------------------------------
type
r2menu = class
public
Screens: array [0..99] of r2menuScreen;
procedure AddScreen(var Caption: string; scriptFile: string);
procedure DrawMenu(menuIndex: byte);
private
function lastIndex(): shortint;
end;