X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=ent_skateshop.c;h=9d31a26627888a32b29b8373c8264037ccccf550;hb=b3ca3b7a45eec11c46eb19772e10021177665adb;hp=a30fca9b5b343921375195d80423e34fd99818e4;hpb=c34dde859968ced3dc7e8dd7be29f676689813d3;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/ent_skateshop.c b/ent_skateshop.c index a30fca9..9d31a26 100644 --- a/ent_skateshop.c +++ b/ent_skateshop.c @@ -437,34 +437,41 @@ VG_STATIC void global_skateshop_preupdate(void) return; } - float h = localplayer.input_js1h->axis.value; - if( global_skateshop.interface_loc <= k_skateshop_loc_page__viewing ){ - if( fabsf(h) > 0.25f ){ - if( h < 0.0f ){ - if( global_skateshop.selected_registry_id > 0 ) - global_skateshop.selected_registry_id --; + + gui_helper_action( NULL, "\x88 \x02\xaf\x03""browse" ); + gui_helper_action( NULL, "\x1e\x85 \x02\xaf\x03""pick" ); + gui_helper_action( NULL, "\x1e\x86 \x02\xaf\x03""exit" ); + + int moved = 0; + + if( button_down( k_srbind_mleft ) ){ + if( global_skateshop.selected_registry_id > 0 ){ + global_skateshop.selected_registry_id --; + moved = 1; } - else{ - if( global_skateshop.selected_registry_id < - global_skateshop.registry_count-1 ) - { - global_skateshop.selected_registry_id ++; - } + } + + if( button_down( k_srbind_mright ) ){ + if( global_skateshop.selected_registry_id < + global_skateshop.registry_count-1 ) + { + global_skateshop.selected_registry_id ++; + moved = 1; } + } + if( moved ){ vg_info( "Select registry: %u\n", global_skateshop.selected_registry_id ); global_skateshop.interaction_cooldown = 0.125f; return; } - if( vg_input_button_down( &input_menu_back ) ){ + if( button_down( k_srbind_mback ) ){ global_skateshop_exit(); return; } - - gui_helper_action( localplayer.input_use, "Select" ); } }