]> icculus.org git repositories - divverent/nexuiz.git/blob - data/menuqc/custom/visible.qm
Revert first change in the trunk.
[divverent/nexuiz.git] / data / menuqc / 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_JumpToPlayerSetup;
59 void() Nex_Action_SetNormalPanelLink_Action =
60 {
61         local entity lItem;
62
63         if(self.target == "CreateGame" && cvar_string("_cl_name") == "Player")
64         {
65                 Nex_Action_JumpToPlayerSetup();
66                 return;
67         }
68
69         lItem = Menu_GetItem( "Normal::Panel" );
70         String_EntitySet( lItem, link, self.target );
71
72         Raise_Update( lItem );
73         Menu_UpdateRunFlags();
74         Menu_JumpToWindow( lItem._link, false, false );
75 };
76
77 void() Nex_Action_SetNormalPanelLink =
78 {
79         String_EntityZone( self, target );
80
81         self.destroy = Nex_Action_SetNormalPanelLink_Destroy;
82         self.action = Nex_Action_SetNormalPanelLink_Action;
83 };
84
85 // sets the link field of Normal::Panel on reinit
86 void() Nex_Action_SetLinkOnReinit_Destroy =
87 {
88         String_EntityFree( self, target );
89 };
90
91 void() Nex_Action_SetLinkOnReinitk_Reinit =
92 {
93         String_EntitySet( Menu_GetItem( "Normal::Panel" ), link, self.target );
94 };
95
96 void() Nex_Action_SetLinkOnReinit =
97 {
98         String_EntityZone( self, target );
99
100         self.destroy = Nex_Action_SetLinkOnReinit_Destroy;
101         self.reinit = Nex_Action_SetLinkOnReinitk_Reinit;
102 };
103