]> icculus.org git repositories - divverent/nexuiz.git/blob - scmenu/source/control/data/data.qh
-Changed some item names to fit to the global name convention.
[divverent/nexuiz.git] / scmenu / source / control / data / data.qh
1 // DP/Nex Menu
2 // control/data/data.qh
3
4 enum {
5         ITEM_DATA_SYNC,  // sync with the engine or whatever else this is linked to
6         ITEM_DATA_SEND,  // set it
7         ITEM_DATA_RESET, // use the default value
8         ITEM_DATA_TEST_START,   // set it but dont sync our backup
9         ITEM_DATA_TEST_END,     // set our backup
10         ITEM_DATALINK_SET,
11         ITEM_DATALINK_GET
12 };
13
14 void( entity pItem, float pEvent ) Raise_DataEvent;
15
16 // [Item_Data]
17 .string value;          // current value in the menu
18 .string defValue;       // default value (set for the menu)
19 .string _syncValue;     // last value that is known from the real source
20
21 .void( float pEvent ) _dataEvent;
22
23 void() Item_Data_Init;
24 void() Item_Data_Destroy;
25
26 // [Item_DataUser]
27 // In this case the target field points to a Item_Data* item
28 .string target;
29 .entity _target;
30
31 void() Item_DataUser_Update;
32 void() Item_DataUser_Init;
33 void() Item_DataUser_Destroy;
34
35 // [Item_DataLink]
36 // links to a [Item_Data] object
37 .string link;
38 .entity _link;
39 .string value;
40
41 .void( float pEvent ) _dataEvent;
42
43 void() Item_DataLink_Init;
44 void() Item_DataLink_Destroy;
45 void() Item_DataLink_Update;
46
47 // Item_DataContainer [Item_Container] [implements the DATA events]
48 void( float pEvent ) Item_DataContainer_DataEvent;
49 void() Item_DataContainer_Spawn;
50
51 // Item_Data_Container [Item_Data]
52 void() Item_Data_Container_Reinit;
53 void( float pEvent ) Item_Data_Container_DataEvent;
54
55 void() Item_Data_Container_Spawn;
56
57 // Item_Data_Cvar [Item_Data]
58 .string cvarName;
59
60 void( float pEvent ) Item_Data_Cvar_DataEvent;
61 void() Item_Data_Cvar_Spawn;
62
63 // Item_Data_CvarCreateSave Item_Data_Cvar
64 void() Item_Data_CvarCreateSave_Spawn;
65
66 // Item_DataLink_Text [Item_DataLink]
67 .float maxValue; // max length of the string (-1 for infinity)
68 .string value; // text
69
70 // Item_DataLink_Value [Item_DataLink]
71 // if maxValue <= minValue there is no max value clamping
72 .float minValue;
73 .float stepValue;
74 .float maxValue;
75 .float _realValue;
76
77 .string value; // read-only is most cases, but supplies are version of the data that can be displayed
78
79 void() Item_DataLink_Value_Clamp;
80 void() Item_DataLink_Value_Spawn;
81
82 // [Item_DataLink_Switch] Item_DataLink_Value
83 .string descList; // a altstring containing description strings
84
85 void() Item_DataLink_Switch_Init;
86 void() Item_DataLink_Switch_Destroy;
87
88 float( entity pDataLink, float pValue ) Item_DataLink_Switch_GetOrdinal;
89
90 // Item_DataLink_ValueSwitch [Item_DataLink_Switch]
91 // the default value for stepValue is 1
92 // maxValue is calculated if it is 0
93
94 void() Item_DataLink_ValueSwitch_Spawn;
95
96 // Item_DataLink_TextSwitch [Item_DataLink_Switch]
97 // minValue is 0, stepValue is 1, maxValue is the number of items in descList/valueList
98 .string valueList; // contains the values for the different
99
100 void( float pEvent ) Item_DataLink_TextSwitch_DataEvent;
101 void() Item_DataLink_TextSwitch_Destroy;
102 void() Item_DataLink_TextSwitch_Spawn;
103
104 // Item_DataLink_FastResync [Item_DataLink]
105 .float _presstime; // no more than once a frame?
106
107 void() Item_DataLink_FastResync_Spawn;
108
109 // Item_DataLink_TextValue [Item_DataLink]
110 void() Item_DataLink_TextValue_Spawn;
111
112 // Item_DataLink_TextTime [Item_DataLink]
113 // hour:min:sec
114 void() Item_DataLink_TextTime_Spawn;
115
116 // Item_DataLink_AltString [Item_DataLink]
117 .float stepValue; // contains
118
119 void() Item_DataLink_AltString_Spawn;
120
121 // Item_DataLink_Router [Item_DataLink]
122 // sets value and _realValue of alll children to the float value of self._stepValue
123 void() Item_DataLink_Router_Spawn;