input update 1
[carveJwlIkooP6JGAAIwe30JlM.git] / ent_skateshop.c
index a30fca9b5b343921375195d80423e34fd99818e4..9d31a26627888a32b29b8373c8264037ccccf550 100644 (file)
@@ -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" );
    }
 }