X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=ent_route.c;fp=ent_route.c;h=1ef9f1dcf208d93a0cb9878058ac4eb5cf28a873;hb=7ccbfdd0b7717b5a906a4d4309324782d1fe73e8;hp=1f0bbeddf401c3ed6763dbf0608e4ecc4d35194e;hpb=77c2df4874873fb2d085b9413ed97f66681ad7ac;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/ent_route.c b/ent_route.c index 1f0bbed..1ef9f1d 100644 --- a/ent_route.c +++ b/ent_route.c @@ -12,6 +12,20 @@ static void ent_route_call( world_instance *world, ent_call *call ){ if( call->function == 0 ){ /* view() */ if( localplayer.subsystem == k_player_subsystem_walk ){ world_entity_focus( call->id ); + + gui_helper_clear(); + vg_str text; + + if( (global_ent_route.helper_weekly = + gui_new_helper( input_button_list[k_srbind_mleft], &text ))) + vg_strcat( &text, "weekly" ); + + if( (global_ent_route.helper_alltime = + gui_new_helper( input_button_list[k_srbind_mright], &text ))) + vg_strcat( &text, "all time" ); + + if( gui_new_helper( input_button_list[k_srbind_mback], &text ) ) + vg_strcat( &text, "exit" ); } } else { @@ -33,10 +47,6 @@ static void ent_route_preupdate( ent_route *route, int active ){ world_entity_focus_camera( world, cam_id ); - gui_helper_action( button_display_string( k_srbind_mleft ), "weekly" ); - gui_helper_action( button_display_string( k_srbind_mright ), "all time" ); - gui_helper_action( button_display_string( k_srbind_mback ), "exit" ); - if( button_down( k_srbind_mleft ) ){ world_sfd.view_weekly = 1; world_sfd_compile_active_scores(); @@ -49,6 +59,7 @@ static void ent_route_preupdate( ent_route *route, int active ){ if( button_down( k_srbind_mback ) ){ world_entity_unfocus(); + gui_helper_clear(); return; } }