From: hgn Date: Wed, 10 Apr 2024 15:34:50 +0000 (+0100) Subject: menu polish sound / interactions X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;h=e1abd94a27aebd6ab32eaae2aa1439512acaa610;hp=f3277e0e363fa8c486816072fc0467204f620c32;p=carveJwlIkooP6JGAAIwe30JlM.git menu polish sound / interactions --- diff --git a/menu.c b/menu.c index d3e97a7..ed69945 100644 --- a/menu.c +++ b/menu.c @@ -304,20 +304,32 @@ static void menu_setitem_type( ent_menuitem *item, */ void menu_update(void) { + static f32 repeater = 0.0f; + if( repeater > 0.0f ) + repeater -= vg.time_frame_delta; + if( workshop_form.page != k_workshop_form_hidden ){ return; } - int escape = button_down( k_srbind_mback ); - if( menu.credits_open || vg.settings_open ){ - if( escape ){ + bool escape = 0; + + if( menu.credits_open || vg.settings_open ) + { + vg_exec_input_program( k_vg_input_type_button_u8, + input_button_list[k_srbind_mback], &escape ); + if( escape ) + { menu.credits_open = 0; if( vg.settings_open ) vg_settings_close(); + + srinput.state = k_input_state_resume; } return; } + escape = button_down( k_srbind_mback ); if( button_down( k_srbind_mopen ) ){ if( skaterift.activity == k_skaterift_default ){ @@ -555,12 +567,13 @@ void menu_update(void) } } - if( nextpos ) + if( nextpos && (repeater <= 0.0f) ) { menu.loc = nextpos; audio_lock(); audio_oneshot( &audio_ui[3], 1.0f, 0.0f ); audio_unlock(); + repeater += 0.1f; } } } diff --git a/models_src/rs_menu.mdl b/models_src/rs_menu.mdl index 0c85cc9..fe41c20 100644 Binary files a/models_src/rs_menu.mdl and b/models_src/rs_menu.mdl differ