@@ -475,7 +475,7 @@ function update_minimap () {
475475 }
476476 }
477477}
478- function make_title_menu ( title : string , options : any [ ] ) {
478+ function make_title_menu ( title : string , options : any [ ] , can_exit : boolean ) {
479479 if ( ! ( spriteutils . isDestroyed ( menu_start ) ) ) {
480480 title_pop_away_sprite_left ( menu_start )
481481 }
@@ -487,6 +487,12 @@ function make_title_menu (title: string, options: any[]) {
487487 if ( options . length > 6 ) {
488488 menu_start . setMenuStyleProperty ( miniMenu . MenuStyleProperty . ScrollIndicatorColor , images . colorBlock ( 15 ) )
489489 }
490+ if ( can_exit ) {
491+ menu_start . onButtonPressed ( controller . B , function ( selection , selectedIndex ) {
492+ music . playTone ( 262 , music . beat ( BeatFraction . Sixteenth ) )
493+ option_selected = true
494+ } )
495+ }
490496 menu_start . setFlag ( SpriteFlag . Ghost , true )
491497 menu_start . setFlag ( SpriteFlag . RelativeToCamera , true )
492498 menu_start . top = sprite_title . bottom + 4
@@ -787,7 +793,7 @@ let show_minimap = false
787793let in_game = false
788794let car_accel = 0
789795stats . turnStats ( true )
790- if ( false ) {
796+ if ( true ) {
791797 pause ( 1000 )
792798 LoadingAnimations . show_splash ( )
793799 pause ( 5000 )
@@ -837,14 +843,14 @@ timer.background(function () {
837843 miniMenu . createMenuItem ( "Skins" ) ,
838844 miniMenu . createMenuItem ( "Settings" ) ,
839845 miniMenu . createMenuItem ( "Reset preferences" )
840- ] ) . onButtonPressed ( controller . A , function ( selection , selectedIndex ) {
846+ ] , false ) . onButtonPressed ( controller . A , function ( selection , selectedIndex ) {
841847 music . playTone ( 262 , music . beat ( BeatFraction . Sixteenth ) )
842848 if ( selectedIndex == 0 ) {
843849 menu_options = [ miniMenu . createMenuItem ( "Back" ) ]
844850 for ( let names of maps_names ) {
845851 menu_options . push ( miniMenu . createMenuItem ( names ) )
846852 }
847- make_title_menu ( "Select a map:" , menu_options ) . onButtonPressed ( controller . A , function ( selection , selectedIndex ) {
853+ make_title_menu ( "Select a map:" , menu_options , true ) . onButtonPressed ( controller . A , function ( selection , selectedIndex ) {
848854 music . playTone ( 262 , music . beat ( BeatFraction . Sixteenth ) )
849855 option_selected = true
850856 if ( selectedIndex > 0 ) {
@@ -857,7 +863,7 @@ timer.background(function () {
857863 for ( let names of car_images_names ) {
858864 menu_options . push ( miniMenu . createMenuItem ( names ) )
859865 }
860- menu_start = make_title_menu ( "Select a skin:" , menu_options )
866+ menu_start = make_title_menu ( "Select a skin:" , menu_options , true )
861867 for ( let index = 0 ; index < blockSettings . readNumber ( "user_skin" ) + 1 ; index ++ ) {
862868 menu_start . moveSelection ( miniMenu . MoveDirection . Down )
863869 }
@@ -877,7 +883,7 @@ timer.background(function () {
877883 wait_for_a_button_release ( )
878884 game . showSystemMenu ( )
879885 } else {
880- make_title_menu ( "Confirm reset" , [ miniMenu . createMenuItem ( "No, don't reset" ) , miniMenu . createMenuItem ( "Yes, reset" ) ] ) . onButtonPressed ( controller . A , function ( selection , selectedIndex ) {
886+ make_title_menu ( "Confirm reset" , [ miniMenu . createMenuItem ( "No, don't reset" ) , miniMenu . createMenuItem ( "Yes, reset" ) ] , true ) . onButtonPressed ( controller . A , function ( selection , selectedIndex ) {
881887 music . playTone ( 262 , music . beat ( BeatFraction . Sixteenth ) )
882888 option_selected = true
883889 if ( selectedIndex == 1 ) {
0 commit comments