+ /* MAIN / MAIN
+ * -------------------------------------------------------------------*/
+
+ if( menu.main_index == k_menu_main_main )
+ {
+ i32 R = menu_nav( &menu.main_row, mv, 2 );
+
+ if( menu_button( ctx, list, R == 0, "Resume" ) )
+ {
+ skaterift.activity = k_skaterift_default;
+ return;
+ }
+
+ if( menu_button( ctx, list, R == 1, "Credits" ) )
+ {
+ menu.page = k_menu_page_credits;
+ }
+
+ ui_rect end = { list[0], list[1]+list[3]-64, list[2], 72 };
+ if( menu_button( ctx, end, R == 2, "Quit Game" ) )
+ {
+ vg.window_should_close = 1;
+ }
+ }
+ else if( menu.main_index == k_menu_main_settings )
+ {
+ ui_fill( ctx, list0, ui_opacity( GUI_COL_DARK, 0.36f ) );
+ ui_outline( ctx, list0, 1, GUI_COL_NORM, 0 );
+ i32 R = menu_nav( &menu.settings_row, mv, 8 );
+
+ ctx->font = &vgf_default_large;
+ list[1] -= 8;
+ menu_heading( ctx, list, "Game", 0 );
+ menu_checkbox( ctx, list, R == 0, "Show controls overlay",
+ &control_overlay.enabled );
+ menu_checkbox( ctx, list, R == 1, "Auto connect to global server",
+ &network_client.auto_connect );
+
+ menu_heading( ctx, list, "Audio/Video", 0 );
+ menu_slider( ctx, list, R == 2, "Volume", 0, 100,
+ &vg_audio.external_global_volume, "%.f%%" );
+ menu_slider( ctx, list, R == 3, "Resolution", 0, 100,
+ &k_render_scale, "%.f%%" );
+ menu_checkbox( ctx, list, R == 4, "Motion Blur", &k_blur_effect );
+
+ menu_heading( ctx, list, "Camera", 0 );
+ menu_slider( ctx, list, R == 5, "Fov", 97, 135,
+ &k_fov, "%.1f\xb0" );
+ menu_slider( ctx, list, R == 6, "Cam Height", -0.4f, +1.4f,
+ &k_cam_height, vg_lerpf(-0.4f,1.4f,k_cam_height)>=0.0f?
+ "+%.2fm": "%.2fm" );
+ menu_checkbox( ctx, list, R == 7, "Invert Y Axis", &k_invert_y );
+
+
+ ui_rect end = { list[0], list[1]+list[3]-64, list[2], 72 };
+ ctx->font = &vgf_default_small;
+ menu_heading( ctx, end, "Advanced", 0 );
+ if( menu_button( ctx, end, R == 8, "Open Engine Settings" ) )
+ {
+ vg_settings_open();
+ }
+ }
+ else if( menu.main_index == k_menu_main_guide )
+ {
+ list0[0] = 8;
+ list[0] = 16;
+
+ ui_px w = 700,
+ marg = list0[0]+list0[2],
+ pw = vg.window_x - marg,
+ infx = pw/2 - w/2 + marg;
+ ui_rect inf = { infx, height +32, w, 800 };
+
+ struct ui_vert *vs = NULL;
+
+ if( menu.guide_sel && (menu.guide_sel <= 3) )
+ {
+ vs = ui_fill( ctx, inf, ui_opacity( GUI_COL_DARK, 0.20f ) );
+ ui_rect_pad( inf, (ui_px[]){8,8} );
+ }
+
+ ui_fill( ctx, list0, ui_opacity( GUI_COL_DARK, 0.36f ) );
+ ui_outline( ctx, list0, 1, GUI_COL_NORM, 0 );
+ i32 R = menu_nav( &menu.guides_row, mv, 6 );
+
+ ctx->font = &vgf_default_large;
+ list[1] -= 8;
+ menu_heading( ctx, list, "Info", 0 );
+ if( menu.guide_sel == 1 )
+ {
+ menu_try_find_cam( 1 );
+
+ ui_rect title;
+ ui_split( inf, k_ui_axis_h, 28*2, 0, title, inf );
+ ctx->font = &vgf_default_title;
+ ui_text( ctx,
+ title, "Where to go", 1, k_ui_align_middle_center, 0 );
+
+ ui_split( inf, k_ui_axis_h, 28, 0, title, inf );
+ ctx->font = &vgf_default_large;
+ ui_text( ctx, inf,
+ "Visit the sandcastles built by John Cockroach to be\n"
+ "transported into the real location. Use the map in the\n"
+ "menu to return back this hub island.\n"
+ "\n"
+ "You can begin training at the Volcano Island, where you\n"
+ "can learn movement skills. Then travel to Mt.Zero Island\n"
+ "or Bort Downtown to test them out. Finally the most\n"
+ "challenging course can be taken on at the Valley.\n"
+ "\n"
+ "Also visit the Steam Workshop for community made\n"
+ "locations to skate!"
+ , 1, k_ui_align_left, 0 );
+
+ vs[2].co[1] = vs[0].co[1] + 84 + vgf_default_large.sy*11 + 16;
+ vs[3].co[1] = vs[2].co[1];
+ }
+ if( menu_button( ctx, list, R == 0, "Where to go" ) )
+ menu.guide_sel = 1;
+
+ if( menu.guide_sel == 3 )
+ {
+ menu_try_find_cam( 2 );
+
+ ui_rect title;
+ ui_split( inf, k_ui_axis_h, 28*2, 0, title, inf );
+ ctx->font = &vgf_default_title;
+ ui_text( ctx, title, "Online", 1, k_ui_align_middle_center, 0 );
+
+ ui_split( inf, k_ui_axis_h, 28, 0, title, inf );
+ ctx->font = &vgf_default_large;
+ ui_text( ctx, inf,
+ "Connection to the global server is managed by this radar\n"
+ "dish in the hub island. Come back here to turn the\n"
+ "connection on or off.\n"
+ "\n"
+ "You'll then see other players or your friends if you go\n"
+ "to the same location, and your highscores will be saved\n"
+ "onto the scoreboards."
+ , 1, k_ui_align_left, 0 );
+
+ vs[2].co[1] = vs[0].co[1] + 84 + vgf_default_large.sy*7 + 16;
+ vs[3].co[1] = vs[2].co[1];
+ }
+ if( menu_button( ctx, list, R == 1, "Playing Online" ) )
+ menu.guide_sel = 3;
+
+ menu_heading( ctx, list, "Controls", 0 );
+ if( menu_button( ctx, list, R == 2, "Skating \xb2" ) )
+ {
+ menu.guide_sel = 0;
+ menu_link_modal(
+ "https://skaterift.com/index.php?page=movement" );
+ }
+ if( menu.guide_sel == 0 || menu.guide_sel > 3 ) menu_try_find_cam( 3 );
+
+ if( menu_button( ctx, list, R == 3, "Tricks \xb2" ) )
+ {
+ menu.guide_sel = 0;
+ menu_link_modal(
+ "https://skaterift.com/index.php?page=tricks" );
+ }
+
+ menu_heading( ctx, list, "Workshop", 0 );
+ if( menu_button( ctx, list, R == 4, "Create a Board \xb2" ) )
+ {
+ menu.guide_sel = 0;
+ menu_link_modal(
+ "https://skaterift.com/index.php?page=workshop_board" );
+ }
+ if( menu_button( ctx, list, R == 5, "Create a World \xb2" ) )
+ {
+ menu.guide_sel = 0;
+ menu_link_modal(
+ "https://skaterift.com/index.php?page=workshop_world" );
+ }
+ if( menu_button( ctx, list, R == 6, "Create a Playermodel \xb2" ) )
+ {
+ menu.guide_sel = 0;
+ menu_link_modal(
+ "https://skaterift.com/index.php?page=workshop_player" );
+ }
+ }