]> icculus.org git repositories - divverent/nexuiz.git/blob - data/menuqc/control/data/container.qc
give menu source its own directory
[divverent/nexuiz.git] / data / menuqc / control / data / container.qc
1 // DP/Nex Menu
2 // control/data/container.qc
3
4
5 ////////////////////////
6 // Item_Data_Container
7 ///
8
9 void() Item_Data_Container_Reinit =
10 {
11         String_EntitySet( self, value, self._syncValue );
12 };
13
14 void( float pEvent ) Item_Data_Container_DataEvent =
15 {
16         switch( pEvent ) {
17                 case ITEM_DATA_SYNC:
18                         String_EntitySet( self, value, self._syncValue );
19                         break;
20                 case ITEM_DATA_SEND:
21                         String_EntitySet( self, _syncValue, self.value );
22                         break;
23                 case ITEM_DATA_RESET:
24                         String_EntitySet( self, value, self.defValue );
25                         String_EntitySet( self, _syncValue, self.defValue );
26                         break;
27         }
28 };
29
30 void() Item_Data_Container_Spawn =
31 {
32         Item_Data_Init();
33
34         self._reinit = Item_Data_Container_Reinit;
35         self._dataEvent = Item_Data_Container_DataEvent;
36
37         String_EntitySet( self, _syncValue, self.defValue );
38 };