2 // control/data/data.qh
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
14 void( entity pItem, float pEvent ) Raise_DataEvent;
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
21 .void( float pEvent ) _dataEvent;
23 void() Item_Data_Init;
24 void() Item_Data_Destroy;
27 // In this case the target field points to a Item_Data* item
31 void() Item_DataUser_Update;
32 void() Item_DataUser_Init;
33 void() Item_DataUser_Destroy;
36 // links to a [Item_Data] object
41 .void( float pEvent ) _dataEvent;
43 void() Item_DataLink_Init;
44 void() Item_DataLink_Destroy;
45 void() Item_DataLink_Update;
47 // Item_DataContainer [Item_Container] [implements the DATA events]
48 void( float pEvent ) Item_DataContainer_DataEvent;
49 void() Item_DataContainer_Spawn;
51 // Item_Data_Container [Item_Data]
52 void() Item_Data_Container_Reinit;
53 void( float pEvent ) Item_Data_Container_DataEvent;
55 void() Item_Data_Container_Spawn;
57 // Item_Data_Cvar [Item_Data]
60 void( float pEvent ) Item_Data_Cvar_DataEvent;
61 void() Item_Data_Cvar_Spawn;
63 // Item_Data_CvarCreateSave Item_Data_Cvar
64 void() Item_Data_CvarCreateSave_Spawn;
66 // Item_DataLink_Text [Item_DataLink]
67 .float maxValue; // max length of the string (-1 for infinity)
68 .string value; // text
70 // Item_DataLink_Value [Item_DataLink]
71 // if maxValue <= minValue there is no max value clamping
77 .string value; // read-only is most cases, but supplies are version of the data that can be displayed
79 void() Item_DataLink_Value_Clamp;
80 void() Item_DataLink_Value_Spawn;
82 // [Item_DataLink_Switch] Item_DataLink_Value
83 .string descList; // a altstring containing description strings
85 void() Item_DataLink_Switch_Init;
86 void() Item_DataLink_Switch_Destroy;
88 float( entity pDataLink, float pValue ) Item_DataLink_Switch_GetOrdinal;
90 // Item_DataLink_ValueSwitch [Item_DataLink_Switch]
91 // the default value for stepValue is 1
92 // maxValue is calculated if it is 0
94 void() Item_DataLink_ValueSwitch_Spawn;
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
100 void( float pEvent ) Item_DataLink_TextSwitch_DataEvent;
101 void() Item_DataLink_TextSwitch_Destroy;
102 void() Item_DataLink_TextSwitch_Spawn;
104 // Item_DataLink_FastResync [Item_DataLink]
105 .float _presstime; // no more than once a frame?
107 void() Item_DataLink_FastResync_Spawn;
109 // Item_DataLink_TextValue [Item_DataLink]
110 void() Item_DataLink_TextValue_Spawn;
112 // Item_DataLink_TextTime [Item_DataLink]
114 void() Item_DataLink_TextTime_Spawn;
116 // Item_DataLink_AltString [Item_DataLink]
117 .float stepValue; // contains
119 void() Item_DataLink_AltString_Spawn;
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;