X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=menu.h;h=53cb52d30dc4010c007adb3665af42dbb491f07b;hb=c0e4a67ba2f001179df6e2cde97370a946669c22;hp=8691f08e87c838e22a6a66c08ce39f0935f18e56;hpb=00653e446d6b1310fa89d3aace70800f9fef4122;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/menu.h b/menu.h index 8691f08..53cb52d 100644 --- a/menu.h +++ b/menu.h @@ -141,9 +141,9 @@ static void menu_init(void){ vg_linear_clear( vg_mem.scratch ); - mdl_load_array( &menu.model, &menu.items, "ent_menuitem", alloc ); - mdl_load_array( &menu.model, &menu.markers, "ent_marker", alloc ); - mdl_load_array( &menu.model, &menu.cameras, "ent_camera", alloc ); + MDL_LOAD_ARRAY( &menu.model, &menu.items, ent_menuitem, alloc ); + MDL_LOAD_ARRAY( &menu.model, &menu.markers, ent_marker, alloc ); + MDL_LOAD_ARRAY( &menu.model, &menu.cameras, ent_camera, alloc ); vg_linear_clear( vg_mem.scratch ); @@ -246,11 +246,18 @@ static void menu_trigger_item( ent_menuitem *item ){ vg.window_should_close = 1; } - else if( MDL_CONST_PSTREQ( &menu.model, q, "reset" ) ){ + else if( MDL_CONST_PSTREQ( &menu.model, q, "map" ) ){ + menu_close(); - ent_miniworld_goback(); + respawn_begin_chooser(); + } + else if( MDL_CONST_PSTREQ( &menu.model, q, "hub" ) ){ + if( world_static.active_instance == k_world_purpose_client ){ + srinput.state = k_input_state_resume; + menu_close(); + ent_miniworld_goback(); + } } - else if( MDL_CONST_PSTREQ( &menu.model, q, "credits" ) ){ menu.credits_open = 1; }