+ ctx->font = &vgf_default_title;
+ ui_px height = ctx->font->ch + 16;
+ ui_rect lwr = { 0, vg.window_y - height, vg.window_x, height };
+
+ ui_px x = 0;
+ for( u32 i=0; i<gui.helper_count; i++ )
+ {
+ struct gui_helper *helper = &gui.helpers[i];
+
+ char buf[128];
+ vg_str str;
+ vg_strnull( &str, buf, sizeof(buf) );
+ vg_input_string( &str, helper->binding, 1 );
+
+ ui_rect box = { x, lwr[1], 1000, lwr[3] };
+
+ u32 fg = 0;
+ f32 opacity = 0.4f;
+ if( helper->greyed )
+ {
+ fg = ui_colour(ctx, k_ui_fg+2);
+ opacity = 0.1f;
+ }
+
+ struct ui_vert *bg = ui_fill( ctx, box,
+ ui_opacity( GUI_COL_DARK, opacity ) );
+
+ u32 w;
+ box[0] += 16;
+ w = ui_text( ctx, box, buf, 1, k_ui_align_middle_left, fg );
+ w *= ctx->font->sx;
+ bg[1].co[0] = x + w + 32;
+ bg[2].co[0] = x + w + 32;
+ x += w + 32;
+
+ box[0] = x;
+ bg = ui_fill( ctx, box, ui_opacity( GUI_COL_NORM, opacity*0.7f ) );
+ box[0] += 8;
+ w = ui_text( ctx, box, helper->text, 1, k_ui_align_middle_left, fg );
+ w *= ctx->font->sx;
+ bg[1].co[0] = box[0] + w + 16;
+ bg[2].co[0] = box[0] + w + 16;
+ x += w + 32;
+ }
+
+ vg_ui.frosting = gui.factive*0.015f;
+ ui_flush( ctx, k_ui_shader_colour, NULL );
+ vg_ui.frosting = 0.0f;
+
+
+ f64 loc_t = (vg.time_real - gui.location_time) / 5.0;
+ if( (loc_t < 1.0) && (gui.location_time != 0.0) )
+ {
+ f32 t = 1.0f-vg_minf(1.0f,vg_minf(loc_t*20.0f,2.0f-loc_t*2.0f)),
+ o = 1.0f-t*t*(2.0f-t);
+
+ ui_rect box = { 0, (vg.window_y*2)/3 - height/2, vg.window_x, height };
+ ui_fill( ctx, box, ui_opacity( GUI_COL_NORM, 0.5f ) );
+ ui_text( ctx, box, gui.location, 1, k_ui_align_middle_center, 0 );
+
+ vg_ui.colour[3] = o;
+ ui_flush( ctx, k_ui_shader_colour, NULL );
+ }
+
+ vg_ui.colour[3] = 1.0f;
+ ctx->font = &vgf_default_small;
+}
+
+static int gui_location_print_ccmd( int argc, const char *argv[] )
+{
+ if( argc > 0 )
+ {
+ char new_loc[64];
+ vg_str str;
+ vg_strnull( &str, new_loc, 64 );
+ for( int i=0; i<argc; i++ )
+ {
+ vg_strcat( &str, argv[i] );
+ vg_strcat( &str, " " );
+ }
+ if( !strcmp(gui.location,new_loc) ) return 0;
+ vg_strncpy( new_loc, gui.location, 64, k_strncpy_always_add_null );
+ gui.location_time = vg.time_real;
+ }
+ return 0;
+}
+
+static int gui_showtrick_ccmd( int argc, const char *argv[] )
+{
+ if( argc == 1 )
+ {
+ gui_helper_clear();
+ vg_str text;
+
+ if( !strcmp( argv[0], "pump" ) ){
+ if( gui_new_helper( input_axis_list[k_sraxis_grab], &text ) )
+ vg_strcat( &text, "Pump" );
+ }
+ else if( !strcmp( argv[0], "flip" ) ){
+ if( gui_new_helper( input_joy_list[k_srjoystick_steer], &text ) )
+ vg_strcat( &text, "Flip" );
+ }
+ else if( !strcmp( argv[0], "ollie" ) ){
+ if( gui_new_helper( input_button_list[k_srbind_jump], &text ) )
+ vg_strcat( &text, "Ollie" );
+ }
+ else if( !strcmp( argv[0], "trick" ) ){
+ if( gui_new_helper( input_button_list[k_srbind_trick0], &text ) )
+ vg_strcat( &text, "Shuvit" );
+ if( gui_new_helper( input_button_list[k_srbind_trick1], &text ) )
+ vg_strcat( &text, "Kickflip" );
+ if( gui_new_helper( input_button_list[k_srbind_trick2], &text ) )
+ vg_strcat( &text, "Tre-Flip" );
+ }
+ else if( !strcmp( argv[0], "misc" ) ){
+ if( gui_new_helper( input_button_list[k_srbind_camera], &text ) )
+ vg_strcat( &text, "Camera" );
+ if( gui_new_helper( input_button_list[k_srbind_use], &text ) )
+ vg_strcat( &text, "Skate/Walk" );
+ }
+ else return 1;
+
+ v3_copy( localplayer.rb.co, gui.trick_co );
+ gui.active_positional_helper = 1;
+ return 0;
+ }
+ return 1;