2 // control/data/text.qc
4 void( float pEvent ) Item_DataLink_Text_DataEvent =
6 Item_DataLink_Update();
8 if( pEvent == ITEM_DATALINK_SET ) {
9 if( self.maxValue >= 0 )
10 String_EntitySet( self, value, substring( self.value, 0, self.maxValue ) );
12 String_EntitySet( self._link, value, self.value );
13 Raise_DataEvent( self._link, ITEM_DATALINK_SET );
15 } else if( !self._link )
17 else if( pEvent == ITEM_DATALINK_GET ) {
18 String_EntitySet( self, value, self._link.value );
19 if( self.maxValue >= 0 ) {
20 Raise_DataEvent( self._link, ITEM_DATALINK_GET );
21 String_EntitySet( self, value, substring( self.value, 0, self.maxValue ) );
24 Raise_DataEvent( self._link, pEvent );
27 void() Item_DataLink_Text_Spawn =
31 self._dataEvent = Item_DataLink_Text_DataEvent;