-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUWindowPulldownMenuItem.uc
74 lines (61 loc) · 1.42 KB
/
UWindowPulldownMenuItem.uc
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
//=============================================================================
// UWindowPulldownMenuItem
//=============================================================================
class UWindowPulldownMenuItem extends UWindowList;
var string Caption;
var Texture Graphic;
var byte HotKey;
var UWindowPulldownMenu SubMenu;
var bool bChecked;
var bool bDisabled;
var UWindowPulldownMenu Owner;
var float ItemTop;
function UWindowPulldownMenu CreateSubMenu(class<UWindowPulldownMenu> MenuClass, optional UWindowWindow InOwnerWindow)
{
SubMenu = UWindowPulldownMenu(Owner.ParentWindow.CreateWindow(MenuClass, 0, 0, 100, 100, InOwnerWindow));
SubMenu.HideWindow();
SubMenu.Owner = Self;
return SubMenu;
}
function Select()
{
if(SubMenu != None)
{
SubMenu.WinLeft = Owner.WinLeft + Owner.WinWidth - Owner.HBORDER;
SubMenu.WinTop = ItemTop - Owner.VBORDER;
SubMenu.ShowWindow();
}
}
function SetCaption(string C)
{
local string Junk, Junk2;
Caption = C;
HotKey = Owner.ParseAmpersand(C, Junk, Junk2, False);
}
function DeSelect()
{
if(SubMenu != None)
{
SubMenu.DeSelect();
SubMenu.HideWindow();
}
}
function CloseUp()
{
Owner.CloseUp();
}
function UWindowMenuBar GetMenuBar()
{
return Owner.GetMenuBar();
}
defaultproperties
{
Caption=""
Graphic=None
HotKey=0
SubMenu=None
bChecked=False
bDisabled=False
Owner=None
ItemTop=0.000000
}