1 // Property of Alientrap/Ak
4 void() Nex_Credits_SetSizeX =
8 lItem = Menu_GetItem( "Credits" );
9 lItem.size_x = self._parent.size_x;
12 void() Nex_Credits_Scroll =
14 local entity lItem, lTarget;
16 lItem = Menu_GetItem( "Credits" );
17 lTarget = self._parent;
19 lTarget.origin = lTarget.origin - Timer_Delta * self.direction;
20 if( self.direction_x ) {
21 if( lTarget.origin_x < -lItem.size_x )
22 lTarget.origin_x = lTarget.size_x;
23 if( lTarget.origin_x > lItem.size_x )
24 lTarget.origin_x = -lItem.size_x;
26 if( self.direction_y ) {
27 if( lTarget.origin_y < -lItem.size_y )
28 lTarget.origin_y = lTarget.size_y;
29 if( lTarget.origin_y > lItem.size_y )
30 lTarget.origin_y = -lItem.size_y;
34 void() Nex_Credits_Toggle =
38 lEntity = Menu_GetItem( "CreditsWnd" );
39 if( lEntity.flag & FLAG_HIDDEN ) {
40 lEntity.flag = lEntity.flag - FLAG_HIDDEN;
41 Menu_Select( Menu_GetItem( "CreditsWnd::Layout::Items::Close" ), false );
43 lEntity.flag = lEntity.flag + FLAG_HIDDEN;
44 Menu_Reselect( false );
48 bool( float pKey, float pAscii ) Nex_Credits_Key =
50 if( pKey == K_ESCAPE ) {
57 void() Nex_Credits_Action =
61 lEntity = Menu_GetItem( "CreditsWnd" );
62 if( lEntity.flag & FLAG_HIDDEN )
63 lEntity.flag = lEntity.flag - FLAG_HIDDEN;
64 Menu_Select( Menu_GetItem( "CreditsWnd::Layout::Items::Close" ), false );
65 lEntity = Menu_GetItem( "CreditsWnd::Layout::Items::Scroller" );
66 lEntity.origin_y = lEntity.size_y;