[k_menu_main_guide ] = "Guides"
};
+ i32 main_index_before = menu.main_index;
+
if( mtab )
{
menu.main_index += mtab;
- if( menu.main_index == -1 )
- menu.main_index ++;
+ if( menu.main_index < 0 )
+ menu.main_index = 0;
- if( menu.main_index == VG_ARRAY_LEN(opts) )
- menu.main_index --;
+ if( menu.main_index >= VG_ARRAY_LEN(opts) )
+ menu.main_index = VG_ARRAY_LEN(opts)-1;
vg_audio_lock();
vg_audio_oneshot( &audio_ui[3], 1.0f, 0.0f, 0, 0 );
/* PAGE map */
if( menu.main_index == k_menu_main_map )
{
+ if( menu.main_index != main_index_before )
+ world_map_initialize_view();
+
menu_backable_to_exit = (vg_input.display_input_method == k_input_method_kbm);
menu.bg_blur = 0;
gui_draw_icon( icon, (v2f){ v[0]*0.5f+0.5f,v[1]*0.5f+0.5f }, size );
}
-static void world_map_select_close(void)
-{
-#if 0
- world_map.sel_spawn = world_map.close_spawn;
- gui_helper_reset( k_gui_helper_mode_default );
-
- vg_str text;
- if( gui_new_helper( input_button_list[k_srbind_maccept], &text ) )
- vg_strcat( &text, "Spawn Here" );
- if( gui_new_helper( input_button_list[k_srbind_mback], &text ) )
- vg_strcat( &text, "Back" );
-#endif
-}
-
-static void world_map_help_normal(void)
-{
-#if 0
- gui_helper_reset( k_gui_helper_mode_default );
-
- vg_str text;
- if( gui_new_helper( input_joy_list[k_srjoystick_steer], &text ) )
- vg_strcat( &text, "Move" );
-
- if( gui_new_helper( input_button_list[k_srbind_maccept], &text ) )
- vg_strcat( &text, "Select" );
-
-#if 0
- if( gui_new_helper( input_button_list[k_srbind_mback], &text ) )
- vg_strcat( &text, "Exit" );
-#endif
-#endif
-}
-
void world_map_initialize_view(void)
{
world_instance *world = &_world.main;