From e1abd94a27aebd6ab32eaae2aa1439512acaa610 Mon Sep 17 00:00:00 2001 From: hgn Date: Wed, 10 Apr 2024 16:34:50 +0100 Subject: [PATCH 1/1] menu polish sound / interactions --- menu.c | 21 +++++++++++++++++---- models_src/rs_menu.mdl | Bin 4568400 -> 4568624 bytes 2 files changed, 17 insertions(+), 4 deletions(-) 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 0c85cc9aa8a583c3277e7fb145f472c28a5664fd..fe41c2038cf1af1bc147f89a5c59f1df880b2167 100644 GIT binary patch delta 2180 zcmZ9L3v5%@8OOilI05H*ozNuY=|>WqIF9W&50f~)d30)4RYS#*6n!04}GN(zJ z$e%PkYIUT4Rw=U0E|QZ6hs9~RPvp~bkw>eriMCVZL8r(A8}SV7h{yn+EZl^j&`yi| zp4PV=@6q0&G5LM{_&4pM7#ZY8{ise)*uRv>%l-HYZC>OY$9fOo+q4A{pIKz;0D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