X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_replay.c;h=2bd1ab22c8cf889c5d64720c235f3f69a7682e6d;hb=5a233469f45ee7cbdc89cb87956f9ef2989ad1b5;hp=7abd993d5659cf370b661004acc70cfaefd96b98;hpb=be5e25dee2c54c2a22ca3bbb5bbe0eb6149343be;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_replay.c b/player_replay.c index 7abd993..2bd1ab2 100644 --- a/player_replay.c +++ b/player_replay.c @@ -726,7 +726,7 @@ static void skaterift_replay_update_helpers(void) vg_strnull( &freecam_text, player_replay.helper_freecam->text, GUI_HELPER_TEXT_LENGTH ); vg_strcat( &freecam_text, - player_replay.use_freecam? "exit freecam": "freecam" ); + player_replay.use_freecam? "Exit freecam": "Freecam" ); } static void replay_show_helpers(void) @@ -735,14 +735,14 @@ static void replay_show_helpers(void) vg_str text; if( gui_new_helper( input_axis_list[k_sraxis_replay_h], &text ) ) - vg_strcat( &text, "scrub" ); + vg_strcat( &text, "Scrub" ); if( (player_replay.helper_resume = gui_new_helper( input_button_list[k_srbind_replay_resume], &text )) ) - vg_strcat( &text, "resume" ); + vg_strcat( &text, "Resume" ); if( gui_new_helper( input_button_list[k_srbind_replay_play], &text )) - vg_strcat( &text, "playback" ); + vg_strcat( &text, "Playback" ); player_replay.helper_freecam = gui_new_helper( input_button_list[k_srbind_replay_freecam], &text ); @@ -846,7 +846,7 @@ static void replay_fly_edit_keyframe( replay_keyframe *kf ) } /* move freecam */ - vg_ui.wants_mouse = 0; + ui_capture_mouse(0); freecam_preupdate(); if( vg_getkey(SDLK_q) ) @@ -967,7 +967,7 @@ void skaterift_replay_imgui(void) ui_text( timeline, "0s", 1, k_ui_align_middle_right, 0 ); if( !player_replay.editor_mode ) return; - vg_ui.wants_mouse = 1; + ui_capture_mouse(1); ui_rect panel = { 0, timeline[3] + 20, 200, 400 }; ui_fill( panel, ui_opacity( ui_colour(k_ui_bg), 0.5f ) ); @@ -984,7 +984,7 @@ void skaterift_replay_imgui(void) ui_rect script = { 0, height + 2, vg.window_x, 16 }; ui_fill( script, ui_colour( k_ui_bg ) ); - f64 mouse_t = start + ((f64)vg_ui.mouse[0] / (f64)vg.window_x)*len; + f64 mouse_t = start + ((f64)g_ui_ctx->mouse[0] / (f64)vg.window_x)*len; /* keyframe draw and select */ bool absorb_by_keyframe = 0; @@ -1007,7 +1007,7 @@ void skaterift_replay_imgui(void) /* keyframe selection */ ui_rect tag = { x, script[1], 16, 16 }; - if( ui_inside_rect( tag, vg_ui.mouse ) ) + if( ui_inside_rect( tag, g_ui_ctx->mouse ) ) { absorb_by_keyframe = 1; @@ -1036,7 +1036,7 @@ void skaterift_replay_imgui(void) bool pos_correct = 0; - if( ui_inside_rect( dragbar, vg_ui.mouse_click ) ) + if( ui_inside_rect( dragbar, g_ui_ctx->mouse_click ) ) { if( ui_clicking( UI_MOUSE_LEFT ) ) { @@ -1062,15 +1062,15 @@ void skaterift_replay_imgui(void) if( pos_correct ) { - tag[0] = vg_ui.mouse[0]-8; + tag[0] = g_ui_ctx->mouse[0]-8; tray[0] = tag[0]+8-32; dragbar[0] = tray[0]+16; } } - if( ui_inside_rect( dragbar, vg_ui.mouse ) ) + if( ui_inside_rect( dragbar, g_ui_ctx->mouse ) ) { - vg_ui.cursor = k_ui_cursor_hand; + g_ui_ctx->cursor = k_ui_cursor_hand; } if( !pos_correct ) @@ -1111,11 +1111,11 @@ void skaterift_replay_imgui(void) } /* adding keyframes */ - if( ui_inside_rect( script, vg_ui.mouse ) ) + if( ui_inside_rect( script, g_ui_ctx->mouse ) ) { - vg_ui.cursor = k_ui_cursor_hand; + g_ui_ctx->cursor = k_ui_cursor_hand; - ui_rect cursor = { vg_ui.mouse[0], script[1], 4, 16 }; + ui_rect cursor = { g_ui_ctx->mouse[0], script[1], 4, 16 }; ui_fill( cursor, ui_colour( k_ui_fg ) ); if( !absorb_by_keyframe && ui_click_down( UI_MOUSE_LEFT ) ) @@ -1143,12 +1143,12 @@ void skaterift_replay_imgui(void) /* timeline scrub */ bool start_in_timeline = ui_clicking(UI_MOUSE_LEFT) && - ui_inside_rect(timeline, vg_ui.mouse_click); - if( (ui_inside_rect( timeline, vg_ui.mouse )) || start_in_timeline ) + ui_inside_rect(timeline, g_ui_ctx->mouse_click); + if( (ui_inside_rect( timeline, g_ui_ctx->mouse )) || start_in_timeline ) { - ui_rect cursor = { vg_ui.mouse[0], timeline[1], 4, timeline[3] }; + ui_rect cursor = { g_ui_ctx->mouse[0], timeline[1], 4, timeline[3] }; ui_fill( cursor, ui_colour( k_ui_fg ) ); - vg_ui.cursor = k_ui_cursor_ibeam; + g_ui_ctx->cursor = k_ui_cursor_ibeam; if( ui_clicking( UI_MOUSE_LEFT ) && start_in_timeline ) { @@ -1185,7 +1185,7 @@ void skaterift_replay_imgui(void) ui_info( panel, "World settings" ); f32 new_time = world_current_instance()->time; - if( ui_slider( panel, "Time of day", 0, 1, &new_time, NULL ) ) + if( ui_slider( panel, "Time of day", 0, 1, &new_time ) ) { world_current_instance()->time = new_time; }