-- main menu area _sound_sel="HIGHLIGHT" _sound_push="ACCEPT" _but_font_no=1 _fontscale_mainmenu="1.2" _fontscale_texts="1.0" alpha_text_sel = 255 r_text_sel = 200 g_text_sel = 200 b_text_sel = 200 alpha_text_def = 255 r_text_def = 200 g_text_def = 200 b_text_def = 200 _h_text = 18 function StartNew() SetMaterial( 'StartNew', 0 ,"menu\\menutextures\\logo\\Intro_XBOX_CSI2.dds", 255,255,255,255 ); SetMaterial( 'StartNew', 1 ,"menu\\menutextures\\logo\\Intro_XBOX_CSI2.dds", 255,255,255,255 ); SetPos( 'StartNew',0 , 0, 0); SetDim( 'StartNew',0 , 640, 480 ); SetPos( 'StartNew',1 , 0, 0); SetDim( 'StartNew',1 , 640, 480 ); AddPushButton('StartNew', "New"); AddPushButton('StartNew', "Load"); AddPushButton('StartNew', "Options"); AddPushButton('StartNew', "Credits"); AddStaticObject( "StartNew" ,"lp_text_used" ); AddStaticObject( "StartNew" ,"lp_text_free" ); AddStaticObject( "StartNew" ,"lp_text1" ); AddStaticObject( "StartNew" ,"lp_text2" ); GUISetVisible( 'StartNew', 1 ); SetState( 'StartNew', 1); end function New() SetMaterial( 'New', 0, "menu\\MenuTextures\\StartPage\\buttonStartPageSel.dds", 0, 255,255,255 );--NSPD SetMaterial( 'New', 1, "menu\\MenuTextures\\StartPage\\buttonStartPageSel.dds", 255, 255,255,255 ); SetMaterial( 'New', 2, "menu\\MenuTextures\\StartPage\\buttonStartPagePush.dds", 255, 55,255,255 ); SetPos( 'New', 0, 348, 271); SetDim( 'New', 0, 230, 16); SetPos( 'New', 1, 348, 271); SetDim( 'New', 1, 230, 16); SetPos( 'New', 2, 348, 271); SetDim( 'New', 2, 230, 16); SetTxt( 'New', _but_font_no , 5, "Menu_Main_NewGame_Label" ) SetState( 'New', 1); SetNSEW( 'New', 'Credits', 'Load', 'NULL', 'NULL' ); SetPush( 'New', "ShowNewGame"); SetFontScale("New", _fontscale_mainmenu ); SetTextColor( "New", alpha_text_def , r_text_def , g_text_def , b_text_def ); SetTextColor( "New", alpha_text_sel , r_text_sel , g_text_sel , b_text_sel ,1); SetSndSelect( 'New' , _sound_sel ); SetSndPush( 'New' , _sound_push ); end function Load() SetMaterial( 'Load', 0, "menu\\MenuTextures\\StartPage\\buttonStartPageSel.dds", 0, 255,255,255 );--NSPD SetMaterial( 'Load', 1, "menu\\MenuTextures\\StartPage\\buttonStartPageSel.dds", 255, 255,255,255 ); SetMaterial( 'Load', 2, "menu\\MenuTextures\\StartPage\\buttonStartPagePush.dds", 255, 55,255,255 ); SetPos( 'Load', 0 , 337, 293); SetDim( 'Load', 0 , 230, 16); SetPos( 'Load', 1, 337, 293); SetDim( 'Load', 1, 230, 16); SetPos( 'Load', 2, 337, 293); SetDim( 'Load', 2, 230, 16); SetTxt( 'Load', _but_font_no , 5, "Menu_Main_LoadGame_Label" ) SetFontScale("Load", _fontscale_mainmenu ); SetState( 'Load', 0); SetNSEW( 'Load', 'New', 'Options', 'NULL', 'NULL' ); SetPush( 'Load', "OpenLoadPlayer"); SetTextColor( "Load", alpha_text_def , r_text_def , g_text_def , b_text_def ); SetTextColor( "Load", alpha_text_sel , r_text_sel , g_text_sel , b_text_sel ,1); SetSndSelect( 'Load' , _sound_sel ); SetSndPush( 'Load' , _sound_push ); end function Options() SetMaterial( 'Options', 0, "menu\\MenuTextures\\StartPage\\buttonStartPageSel.dds", 0, 255,255,255 );--NSPD SetMaterial( 'Options', 1, "menu\\MenuTextures\\StartPage\\buttonStartPageSel.dds", 255, 255,255,255 ); SetMaterial( 'Options', 2, "menu\\MenuTextures\\StartPage\\buttonStartPagePush.dds", 255, 55,255,255 ); SetPos( 'Options', 0 , 328, 315); SetDim( 'Options', 0 , 230, 16); SetPos( 'Options', 1, 328, 315); SetDim( 'Options', 1, 230, 16); SetPos( 'Options', 2, 328, 315); SetDim( 'Options', 2, 230, 16); SetTxt( 'Options', _but_font_no , 5, "Menu_Main_Options_Label" ) SetFontScale("Options", _fontscale_mainmenu ); SetState( 'Options', 0); SetNSEW( 'Options', 'Load', 'Credits', 'NULL', 'NULL' ); SetPush( 'Options', "ActionOptions"); SetTextColor( "Options", alpha_text_def , r_text_def , g_text_def , b_text_def ); SetTextColor( "Options", alpha_text_sel , r_text_sel , g_text_sel , b_text_sel ,1); SetSndSelect( 'Options' , _sound_sel ); SetSndPush( 'Options' , _sound_push ); end function Credits() SetMaterial( 'Credits', 0, "menu\\MenuTextures\\StartPage\\buttonStartPageSel.dds", 0, 255,255,255 );--NSPD SetMaterial( 'Credits', 1, "menu\\MenuTextures\\StartPage\\buttonStartPageSel.dds", 255, 255,255,255 ); SetMaterial( 'Credits', 2, "menu\\MenuTextures\\StartPage\\buttonStartPagePush.dds", 255, 55,255,255 ); SetPos( 'Credits', 0 , 319, 337); SetDim( 'Credits', 0 , 230, 16); SetPos( 'Credits', 1, 319, 337); SetDim( 'Credits', 1, 230, 16); SetPos( 'Credits', 2, 319, 337); SetDim( 'Credits', 2, 230, 16); SetTxt( 'Credits', _but_font_no , 5, "Menu_Main_Credits_Label" ) SetFontScale("Credits", _fontscale_mainmenu ); SetState( 'Credits', 0); SetNSEW( 'Credits', 'Options', 'New', 'NULL', 'NULL' ); SetPush( 'Credits', "ShowCredits"); SetTextColor( "Credits", alpha_text_def , r_text_def , g_text_def , b_text_def ); SetTextColor( "Credits", alpha_text_sel , r_text_sel , g_text_sel , b_text_sel , 1 ); SetSndSelect( 'Credits' , _sound_sel ); SetSndPush( 'Credits' , _sound_push ); end function lp_text1() SetMaterial( "lp_text1" , 0 , "" , 0 , 0 , 0 , 0 ); SetPos( "lp_text1" , 0 , 230 , 386 ); SetDim( "lp_text1" , 0 , 200 , 18 ); SetTxt( "lp_text1" , _but_font_no, 4 , "" ); SetFontScale('lp_text1' , _fontscale_texts ); SetTextColor( "lp_text1", alpha_text_sel , r_text_sel , g_text_sel , b_text_sel ); -- SetTextPosition( "lp_text1" , 0 , 0 , 50 , _h_text ); end function lp_text2() SetMaterial( "lp_text2" , 0 , "" , 0 , 0 , 0 , 0 ); SetPos( "lp_text2" , 0 , 230 , 406 ); SetDim( "lp_text2" , 0 , 200 , 18 ); SetTxt( "lp_text2" , _but_font_no, 4 , "" ); SetFontScale('lp_text2' , _fontscale_texts ); SetTextColor( "lp_text2", alpha_text_sel , r_text_sel , g_text_sel , b_text_sel ); -- SetTextPosition( "lp_text2" , 0 , 0 , 50 , _h_text ); end function lp_text_used() SetMaterial( "lp_text_used" , 0 , "" , 0 , 0 , 0 , 0 ); SetPos( "lp_text_used" , 0 , 50 , 386 ); SetDim( "lp_text_used" , 0 , 180 , 18 ); SetTxt( "lp_text_used" , _but_font_no, 6 , "label_used_slots" ); SetFontScale('lp_text_used' , _fontscale_texts ); SetTextColor( "lp_text_used", alpha_text_sel , r_text_sel , g_text_sel , b_text_sel ); -- SetTextPosition( "lp_text_used" , 0 , 0 , 50 , _h_text ); end function lp_text_free() SetMaterial( "lp_text_free" , 0 , "" , 0 , 0 , 0 , 0 ); SetPos( "lp_text_free" , 0 , 50 , 406 ); SetDim( "lp_text_free" , 0 , 180 , 18 ); SetTxt( "lp_text_free" , _but_font_no, 6 , "label_free_slots" ); SetFontScale('lp_text_free' , _fontscale_texts ); SetTextColor( "lp_text_free", alpha_text_sel , r_text_sel , g_text_sel , b_text_sel ); -- SetTextPosition( "lp_text_free" , 0 , 0 , 50 , _h_text ); end