#include "world.h"
#include "player.h"
+#include "gui.h"
#define MAX_LOCAL_BOARDS 64
#define BILL_TIN_BOARDS 1
VG_STATIC void global_skateshop_exit(void)
{
+ vg_info( "exit skateshop\n" );
localplayer.immobile = 0;
global_skateshop.active = 0;
}
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( axis_display_string( k_sraxis_mbrowse_h ), "browse" );
+ gui_helper_action( button_display_string( k_srbind_maccept ), "pick" );
+ gui_helper_action( button_display_string( k_srbind_mback ), "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;
}