]> icculus.org git repositories - divverent/nexuiz.git/blob - scmenu/source/control/data/data.qh
Adding my current version of the scmenu to the nexuiz cvs.
[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_Data_Container [Item_Data]
48
49 // Item_Data_Cvar [Item_Data]
50 .string cvarName;
51
52 void( float pEvent ) Item_Data_Cvar_DataEvent;
53 void() Item_Data_Cvar_Spawn;
54
55 // Item_Data_CvarCreateSave Item_Data_Cvar
56 void() Item_Data_CvarCreateSave_Spawn;
57
58 // Item_DataLink_Text [Item_DataLink]
59 .float maxValue; // max length of the string (-1 for infinity)
60 .string value; // text
61
62 // Item_DataLink_Value [Item_DataLink]
63 .float minValue;
64 .float stepValue;
65 .float maxValue;
66 .float _realValue;
67
68 .string value; // read-only is most cases, but supplies are version of the data that can be displayed
69
70 void() Item_DataLink_Value_Clamp;
71 void() Item_DataLink_Value_Spawn;
72
73 // [Item_DataLink_Switch] Item_DataLink_Value
74 .string descList; // a altstring containing description strings
75
76 void() Item_DataLink_Switch_Init;
77 void() Item_DataLink_Switch_Destroy;
78
79 // Item_DataLink_ValueSwitch [Item_DataLink_Switch]
80 // the default value for stepValue is 1
81 // maxValue is calculated if it is 0
82
83 void() Item_DataLink_ValueSwitch_Spawn;
84
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
88
89 void( float pEvent ) Item_DataLink_TextSwitch_DataEvent;
90 void() Item_DataLink_TextSwitch_Destroy;
91 void() Item_DataLink_TextSwitch_Spawn;
92
93 // Item_DataLink_FastResync [Item_DataLink]
94 .float _presstime; // no more than once a frame?
95
96 void() Item_DataLink_FastResync_Spawn;
97
98 // Item_DataLink_TextValue [Item_DataLink]
99 void() Item_DataLink_TextValue_Spawn;
100
101 // Item_DataLink_TextTime [Item_DataLink]
102 // hour:min:sec
103 void() Item_DataLink_TextTime_Spawn;
104
105 // Item_DataLink_AltString [Item_DataLink]
106 .float stepValue; // contains
107
108 void() Item_DataLink_AltString_Spawn;
109
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;