projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adaptions for vg3.000
[carveJwlIkooP6JGAAIwe30JlM.git]
/
player_replay.c
diff --git
a/player_replay.c
b/player_replay.c
index 7abd993d5659cf370b661004acc70cfaefd96b98..2bd1ab22c8cf889c5d64720c235f3f69a7682e6d 100644
(file)
--- 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,
vg_strnull( &freecam_text, player_replay.helper_freecam->text,
GUI_HELPER_TEXT_LENGTH );
vg_strcat( &freecam_text,
- player_replay.use_freecam? "
exit freecam": "f
reecam" );
+ player_replay.use_freecam? "
Exit freecam": "F
reecam" );
}
static void replay_show_helpers(void)
}
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_str text;
if( gui_new_helper( input_axis_list[k_sraxis_replay_h], &text ) )
- vg_strcat( &text, "
s
crub" );
+ vg_strcat( &text, "
S
crub" );
if( (player_replay.helper_resume = gui_new_helper(
input_button_list[k_srbind_replay_resume], &text )) )
if( (player_replay.helper_resume = gui_new_helper(
input_button_list[k_srbind_replay_resume], &text )) )
- vg_strcat( &text, "
r
esume" );
+ vg_strcat( &text, "
R
esume" );
if( gui_new_helper( input_button_list[k_srbind_replay_play], &text ))
if( gui_new_helper( input_button_list[k_srbind_replay_play], &text ))
- vg_strcat( &text, "
p
layback" );
+ vg_strcat( &text, "
P
layback" );
player_replay.helper_freecam = gui_new_helper(
input_button_list[k_srbind_replay_freecam], &text );
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 */
}
/* move freecam */
-
vg_ui.wants_mouse = 0
;
+
ui_capture_mouse(0)
;
freecam_preupdate();
if( vg_getkey(SDLK_q) )
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;
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 ) );
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 ) );
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;
/* 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 };
/* 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;
{
absorb_by_keyframe = 1;
@@
-1036,7
+1036,7
@@
void skaterift_replay_imgui(void)
bool pos_correct = 0;
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 ) )
{
{
if( ui_clicking( UI_MOUSE_LEFT ) )
{
@@
-1062,15
+1062,15
@@
void skaterift_replay_imgui(void)
if( pos_correct )
{
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;
}
}
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 )
}
if( !pos_correct )
@@
-1111,11
+1111,11
@@
void skaterift_replay_imgui(void)
}
/* adding keyframes */
}
/* 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 ) )
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) &&
/* 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 ) );
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 )
{
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;
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;
}
{
world_current_instance()->time = new_time;
}