@@ -172,6 +172,7 @@ class path_manager_ui : public cataimgui::window
172
172
173
173
input_context ctxt = input_context( " PATH_MANAGER" );
174
174
void enabled_active_button ( const std::string action, bool enabled );
175
+ void draw_distance_from_tile ( const tripoint_abs_ms &tile );
175
176
protected:
176
177
void draw_controls () override ;
177
178
cataimgui::bounds get_bounds () override ;
@@ -503,28 +504,28 @@ void path_manager_ui::enabled_active_button( const std::string action, bool enab
503
504
ImGui::EndDisabled ();
504
505
}
505
506
506
- static void draw_distance_from_tile ( const tripoint_abs_ms &tile )
507
+ void path_manager_ui:: draw_distance_from_tile ( const tripoint_abs_ms &tile )
507
508
{
508
509
const tripoint_abs_ms &avatar_pos = get_map ().getglobal ( get_avatar ().pos_bub () );
509
510
if ( avatar_pos == tile ) {
510
- cataimgui:: draw_colored_text ( _ ( " It's under your feet." ), c_light_green );
511
+ draw_colored_text ( _ ( " It's under your feet." ), c_light_green );
511
512
} else {
512
513
const std::string dist = direction_suffix ( avatar_pos, tile );
513
- cataimgui:: draw_colored_text ( dist );
514
+ draw_colored_text ( dist );
514
515
}
515
516
}
516
517
517
518
void path_manager_ui::draw_controls ()
518
519
{
519
520
// walk buttons
520
- cataimgui:: draw_colored_text ( _ ( " Walk:" ) );
521
+ draw_colored_text ( _ ( " Walk:" ) );
521
522
ImGui::SameLine ();
522
523
enabled_active_button ( " WALK_PATH" , pimpl->avatar_at_what_start_or_end () != -1 );
523
524
ImGui::SameLine ();
524
525
enabled_active_button ( " WALK_PATH_FROM_MIDDLE" , !pimpl->avatar_at_what_paths ().empty () );
525
526
526
527
// recording buttons
527
- cataimgui:: draw_colored_text ( _ ( " Recording:" ) );
528
+ draw_colored_text ( _ ( " Recording:" ) );
528
529
ImGui::SameLine ();
529
530
enabled_active_button ( " START_RECORDING" , !pimpl->is_recording_path () );
530
531
ImGui::SameLine ();
@@ -534,7 +535,7 @@ void path_manager_ui::draw_controls()
534
535
enabled_active_button ( " STOP_RECORDING" , pimpl->is_recording_path () );
535
536
536
537
// manage buttons
537
- cataimgui:: draw_colored_text ( _ ( " Manage:" ) );
538
+ draw_colored_text ( _ ( " Manage:" ) );
538
539
ImGui::SameLine ();
539
540
enabled_active_button ( " DELETE_PATH" , pimpl->selected_id != -1 );
540
541
ImGui::SameLine ();
@@ -544,7 +545,7 @@ void path_manager_ui::draw_controls()
544
545
pimpl->selected_id + 1 < static_cast <int >( pimpl->paths .size () ) );
545
546
546
547
// name buttons
547
- cataimgui:: draw_colored_text ( _ ( " Rename:" ) );
548
+ draw_colored_text ( _ ( " Rename:" ) );
548
549
ImGui::SameLine ();
549
550
enabled_active_button ( " RENAME_START" , pimpl->selected_id != -1 );
550
551
ImGui::SameLine ();
@@ -577,13 +578,13 @@ void path_manager_ui::draw_controls()
577
578
pimpl->selected_id = i;
578
579
}
579
580
ImGui::SameLine ();
580
- cataimgui:: draw_colored_text ( curr_path.name_start );
581
+ draw_colored_text ( curr_path.name_start );
581
582
582
583
ImGui::TableNextColumn ();
583
584
draw_distance_from_tile ( curr_path.recorded_path .front () );
584
585
585
586
ImGui::TableNextColumn ();
586
- cataimgui:: draw_colored_text ( curr_path.name_end );
587
+ draw_colored_text ( curr_path.name_end );
587
588
588
589
ImGui::TableNextColumn ();
589
590
draw_distance_from_tile ( curr_path.recorded_path .back () );
0 commit comments