#include "model.h"
#include "world_render.h"
#include "player.h"
-#include "conf.h"
#include "shaders/model_menu.h"
#include "audio.h"
#include "input.h"
struct {
int active, credits_open;
- f32 factive;
int disable_open;
u32 page, /* current page index */
if( MDL_CONST_PSTREQ( &menu.model, q, "quit" ) ){
vg.window_should_close = 1;
}
- else if( MDL_CONST_PSTREQ( &menu.model, q, "reset" ) ){
+ else if( MDL_CONST_PSTREQ( &menu.model, q, "reset_nearest" ) ){
localplayer_cmd_respawn( 0, NULL );
menu.page_depth = 0;
menu.active = 0;
menu.page = 0xffffffff;
}
+ else if( MDL_CONST_PSTREQ( &menu.model, q, "reset_home" ) ){
+ world_static.active_world = 0;
+ world_static.active_trigger_volume_count = 0;
+ localplayer.viewable_world = world_current_instance();
+ localplayer_cmd_respawn( 1, (const char *[]){"start"} );
+
+ menu.page_depth = 0;
+ menu.active = 0;
+ menu.page = 0xffffffff;
+ }
else if( MDL_CONST_PSTREQ( &menu.model, q, "credits" ) ){
menu.credits_open = 1;
}
}
}
- menu.factive = vg_lerpf( menu.factive, menu.active,
- vg.time_frame_delta * 6.0f );
-
if( !menu.active ) return;
enum menu_input_mode prev_mode = menu.input_mode;
shader_blitcolour_uColour( colour );
render_fsquad();
- if( workshop_form.page != k_workshop_form_hidden ){
+ if( (workshop_form.page != k_workshop_form_hidden) ||
+ (vg_ui.focused_control_type != k_ui_control_none) ){
return;
}