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_Data_Container [Item_Data]
49 // Item_Data_Cvar [Item_Data]
52 void( float pEvent ) Item_Data_Cvar_DataEvent;
53 void() Item_Data_Cvar_Spawn;
55 // Item_Data_CvarCreateSave Item_Data_Cvar
56 void() Item_Data_CvarCreateSave_Spawn;
58 // Item_DataLink_Text [Item_DataLink]
59 .float maxValue; // max length of the string (-1 for infinity)
60 .string value; // text
62 // Item_DataLink_Value [Item_DataLink]
68 .string value; // read-only is most cases, but supplies are version of the data that can be displayed
70 void() Item_DataLink_Value_Clamp;
71 void() Item_DataLink_Value_Spawn;
73 // [Item_DataLink_Switch] Item_DataLink_Value
74 .string descList; // a altstring containing description strings
76 void() Item_DataLink_Switch_Init;
77 void() Item_DataLink_Switch_Destroy;
79 // Item_DataLink_ValueSwitch [Item_DataLink_Switch]
80 // the default value for stepValue is 1
81 // maxValue is calculated if it is 0
83 void() Item_DataLink_ValueSwitch_Spawn;
85 // Item_DataLink_TextSwitch [Item_DataLink_Switch]
86 // minValue is 0, stepValue is 1, maxValue is the number of items in descList/valueList
87 .string valueList; // contains the values for the different
89 void( float pEvent ) Item_DataLink_TextSwitch_DataEvent;
90 void() Item_DataLink_TextSwitch_Destroy;
91 void() Item_DataLink_TextSwitch_Spawn;
93 // Item_DataLink_FastResync [Item_DataLink]
94 .float _presstime; // no more than once a frame?
96 void() Item_DataLink_FastResync_Spawn;
98 // Item_DataLink_TextValue [Item_DataLink]
99 void() Item_DataLink_TextValue_Spawn;
101 // Item_DataLink_TextTime [Item_DataLink]
103 void() Item_DataLink_TextTime_Spawn;
105 // Item_DataLink_AltString [Item_DataLink]
106 .float stepValue; // contains
108 void() Item_DataLink_AltString_Spawn;
110 // Item_DataLink_Router [Item_DataLink]
111 // sets value and _realValue of alll children to the float value of self._stepValue
112 void() Item_DataLink_Router_Spawn;