]> icculus.org git repositories - divverent/nexuiz.git/blob - scmenu/source/custom/visible.qm
Adding my current version of the scmenu to the nexuiz cvs.
[divverent/nexuiz.git] / scmenu / source / custom / visible.qm
1 // Property of Alientrap/AK
2 // custom/visible.qm
3
4 // uses .target to determine the target window
5
6 void() Nex_Action_MakeOnlyVisible_Destroy =
7 {
8         String_EntityFree( self, target );
9 };
10
11 void() Nex_Action_MakeOnlyVisible_Action =
12 {
13         Nex_MakeOnlyVisible( Menu_GetItem( self.target ) );
14 };
15
16 void() Nex_Action_MakeOnlyVisible =
17 {
18         String_EntityZone( self, target );
19
20         self.destroy = Nex_Action_MakeOnlyVisible_Destroy;
21         self.action = Nex_Action_MakeOnlyVisible_Action;
22 };
23
24 // makes the first child as only item in the window visible
25 void() Nex_Action_MakeFirstVisible =
26 {
27         Nex_MakeOnlyVisible( self._child );
28 };
29
30 // like MakeOnlyVisible, but also jumps to the window
31 void() Nex_Action_JumpToPage_Destroy =
32 {
33         String_EntityFree( self, target );
34 };
35
36 void() Nex_Action_JumpToPage_Action =
37 {
38         local entity lItem;
39         lItem = Menu_GetItem( self.target );
40         Nex_MakeOnlyVisible( lItem );
41         Menu_JumpToWindow( lItem, false, false );
42 };
43
44 void() Nex_Action_JumpToPage =
45 {
46         String_EntityZone( self, target );
47
48         self.action = Nex_Action_JumpToPage_Action;
49         self.destroy = Nex_Action_JumpToPage_Destroy;
50 };
51
52 // sets the link field of Normal::Panel
53 void() Nex_Action_SetNormalPanelLink_Destroy =
54 {
55         String_EntityFree( self, target );
56 };
57
58 void() Nex_Action_SetNormalPanelLink_Action =
59 {
60         local entity lItem;
61
62         lItem = Menu_GetItem( "Normal::Panel" );
63         String_EntitySet( lItem, link, self.target );
64
65         Raise_Update( lItem );
66         Menu_UpdateRunFlags();
67         Menu_JumpToWindow( lItem._link, false, false );
68 };
69
70 void() Nex_Action_SetNormalPanelLink =
71 {
72         String_EntityZone( self, target );
73
74         self.destroy = Nex_Action_SetNormalPanelLink_Destroy;
75         self.action = Nex_Action_SetNormalPanelLink_Action;
76 };
77
78 // sets the link field of Normal::Panel on reinit
79 void() Nex_Action_SetLinkOnReinit_Destroy =
80 {
81         String_EntityFree( self, target );
82 };
83
84 void() Nex_Action_SetLinkOnReinitk_Reinit =
85 {
86         String_EntitySet( Menu_GetItem( "Normal::Panel" ), link, self.target );
87 };
88
89 void() Nex_Action_SetLinkOnReinit =
90 {
91         String_EntityZone( self, target );
92
93         self.destroy = Nex_Action_SetLinkOnReinit_Destroy;
94         self.reinit = Nex_Action_SetLinkOnReinitk_Reinit;
95 };
96