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]
63 // if maxValue <= minValue there is no max value clamping
69 .string value; // read-only is most cases, but supplies are version of the data that can be displayed
71 void() Item_DataLink_Value_Clamp;
72 void() Item_DataLink_Value_Spawn;
74 // [Item_DataLink_Switch] Item_DataLink_Value
75 .string descList; // a altstring containing description strings
77 void() Item_DataLink_Switch_Init;
78 void() Item_DataLink_Switch_Destroy;
80 float( entity pDataLink, float pValue ) Item_DataLink_Switch_GetOrdinal;
82 // Item_DataLink_ValueSwitch [Item_DataLink_Switch]
83 // the default value for stepValue is 1
84 // maxValue is calculated if it is 0
86 void() Item_DataLink_ValueSwitch_Spawn;
88 // Item_DataLink_TextSwitch [Item_DataLink_Switch]
89 // minValue is 0, stepValue is 1, maxValue is the number of items in descList/valueList
90 .string valueList; // contains the values for the different
92 void( float pEvent ) Item_DataLink_TextSwitch_DataEvent;
93 void() Item_DataLink_TextSwitch_Destroy;
94 void() Item_DataLink_TextSwitch_Spawn;
96 // Item_DataLink_FastResync [Item_DataLink]
97 .float _presstime; // no more than once a frame?
99 void() Item_DataLink_FastResync_Spawn;
101 // Item_DataLink_TextValue [Item_DataLink]
102 void() Item_DataLink_TextValue_Spawn;
104 // Item_DataLink_TextTime [Item_DataLink]
106 void() Item_DataLink_TextTime_Spawn;
108 // Item_DataLink_AltString [Item_DataLink]
109 .float stepValue; // contains
111 void() Item_DataLink_AltString_Spawn;
113 // Item_DataLink_Router [Item_DataLink]
114 // sets value and _realValue of alll children to the float value of self._stepValue
115 void() Item_DataLink_Router_Spawn;