1 // Property of Alientrap
4 // link is the name of the datalink
6 // text is the description text
11 Nex_Automation_Option_Slider
14 // Embedded in a window with the following subitems: Description, Slider, Value
15 void() Nex_Automation_Option_Slider =
17 local entity lDescription, lSlider, lValue;
19 if( !self._parent.target ) {
20 objerror( "Bad target '", self._parent.target, "'" );
25 lDescription = Menu_GetItem( "Description" );
26 lSlider = Menu_GetItem( "Slider" );
27 lValue = Menu_GetItem( "Value" );
29 // Now set the properties
30 // (will be strzoned later by the Spawn functions)
31 lDescription.normal = self._parent.text;
32 lDescription.link = lSlider.name;
34 lSlider.target = self._parent.target;
36 lValue.target = self._parent.target;
37 lValue.link = lSlider.name;
42 Nex_Automation_Option_EditBox
45 // Embedded in a window with the following subitems: Description, EditBox
46 void() Nex_Automation_Option_EditBox =
48 local entity lDescription, lEditBox;
50 if( !self._parent.target ) {
51 objerror( "Bad target '", self._parent.target, "'" );
56 lDescription = Menu_GetItem( "Description" );
57 lEditBox = Menu_GetItem( "EditBox" );
59 // Now set the properties
60 // (will be strzoned later by the Spawn functions)
61 lDescription.normal = self._parent.text;
62 lDescription.link = lEditBox.name;
64 lEditBox.target = self._parent.target;
69 Nex_Automation_Option_Switch
72 // Embedded in a window with the following subitems: Description, Switch
73 void() Nex_Automation_Option_Switch =
75 local entity lDescription, lSwitch;
77 if( !self._parent.target ) {
78 objerror( "Bad target '", self._parent.target, "'" );
83 lDescription = Menu_GetItem( "Description" );
84 lSwitch = Menu_GetItem( "Switch" );
86 // Now set the properties
87 // (will be strzoned later by the Spawn functions)
88 lDescription.normal = self._parent.text;
89 lDescription.link = lSwitch.name;
91 lSwitch.target = self._parent.target;