Skip to content

Commit 863648a

Browse files
committed
Path Manager: (pre ImGui uilist) cataimgui::draw_colored_text -> draw_colored_text
1 parent 8d23907 commit 863648a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/path_manager.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ class path_manager_ui : public cataimgui::window
172172

173173
input_context ctxt = input_context( "PATH_MANAGER" );
174174
void enabled_active_button( const std::string action, bool enabled );
175+
void draw_distance_from_tile( const tripoint_abs_ms &tile );
175176
protected:
176177
void draw_controls() override;
177178
cataimgui::bounds get_bounds() override;
@@ -503,28 +504,28 @@ void path_manager_ui::enabled_active_button( const std::string action, bool enab
503504
ImGui::EndDisabled();
504505
}
505506

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 )
507508
{
508509
const tripoint_abs_ms &avatar_pos = get_map().getglobal( get_avatar().pos_bub() );
509510
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 );
511512
} else {
512513
const std::string dist = direction_suffix( avatar_pos, tile );
513-
cataimgui::draw_colored_text( dist );
514+
draw_colored_text( dist );
514515
}
515516
}
516517

517518
void path_manager_ui::draw_controls()
518519
{
519520
// walk buttons
520-
cataimgui::draw_colored_text( _( "Walk:" ) );
521+
draw_colored_text( _( "Walk:" ) );
521522
ImGui::SameLine();
522523
enabled_active_button( "WALK_PATH", pimpl->avatar_at_what_start_or_end() != -1 );
523524
ImGui::SameLine();
524525
enabled_active_button( "WALK_PATH_FROM_MIDDLE", !pimpl->avatar_at_what_paths().empty() );
525526

526527
// recording buttons
527-
cataimgui::draw_colored_text( _( "Recording:" ) );
528+
draw_colored_text( _( "Recording:" ) );
528529
ImGui::SameLine();
529530
enabled_active_button( "START_RECORDING", !pimpl->is_recording_path() );
530531
ImGui::SameLine();
@@ -534,7 +535,7 @@ void path_manager_ui::draw_controls()
534535
enabled_active_button( "STOP_RECORDING", pimpl->is_recording_path() );
535536

536537
// manage buttons
537-
cataimgui::draw_colored_text( _( "Manage:" ) );
538+
draw_colored_text( _( "Manage:" ) );
538539
ImGui::SameLine();
539540
enabled_active_button( "DELETE_PATH", pimpl->selected_id != -1 );
540541
ImGui::SameLine();
@@ -544,7 +545,7 @@ void path_manager_ui::draw_controls()
544545
pimpl->selected_id + 1 < static_cast<int>( pimpl->paths.size() ) );
545546

546547
// name buttons
547-
cataimgui::draw_colored_text( _( "Rename:" ) );
548+
draw_colored_text( _( "Rename:" ) );
548549
ImGui::SameLine();
549550
enabled_active_button( "RENAME_START", pimpl->selected_id != -1 );
550551
ImGui::SameLine();
@@ -577,13 +578,13 @@ void path_manager_ui::draw_controls()
577578
pimpl->selected_id = i;
578579
}
579580
ImGui::SameLine();
580-
cataimgui::draw_colored_text( curr_path.name_start );
581+
draw_colored_text( curr_path.name_start );
581582

582583
ImGui::TableNextColumn();
583584
draw_distance_from_tile( curr_path.recorded_path.front() );
584585

585586
ImGui::TableNextColumn();
586-
cataimgui::draw_colored_text( curr_path.name_end );
587+
draw_colored_text( curr_path.name_end );
587588

588589
ImGui::TableNextColumn();
589590
draw_distance_from_tile( curr_path.recorded_path.back() );

0 commit comments

Comments
 (0)