Skip to content

Commit

Permalink
Path Manager: (pre ImGui uilist) cataimgui::draw_colored_text -> draw…
Browse files Browse the repository at this point in the history
…_colored_text
  • Loading branch information
Brambor committed Aug 6, 2024
1 parent a1e6c59 commit 1845b90
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/path_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,14 +518,14 @@ void path_manager_ui::enabled_active_button( const std::string action, bool enab
void path_manager_ui::draw_controls()
{
// walk buttons
cataimgui::draw_colored_text( _( "Walk:" ) );
draw_colored_text( _( "Walk:" ) );
ImGui::SameLine();
enabled_active_button( "WALK_PATH", pimpl->avatar_at_what_start_or_end() != -1 );
ImGui::SameLine();
enabled_active_button( "WALK_PATH_FROM_MIDDLE", !pimpl->avatar_at_what_paths().empty() );

// recording buttons
cataimgui::draw_colored_text( _( "Recording:" ) );
draw_colored_text( _( "Recording:" ) );
ImGui::SameLine();
enabled_active_button( "START_RECORDING", !pimpl->is_recording_path() );
ImGui::SameLine();
Expand All @@ -535,7 +535,7 @@ void path_manager_ui::draw_controls()
enabled_active_button( "STOP_RECORDING", pimpl->is_recording_path() );

// manage buttons
cataimgui::draw_colored_text( _( "Manage:" ) );
draw_colored_text( _( "Manage:" ) );
ImGui::SameLine();
enabled_active_button( "DELETE_PATH", pimpl->selected_id != -1 );
ImGui::SameLine();
Expand All @@ -545,7 +545,7 @@ void path_manager_ui::draw_controls()
pimpl->selected_id + 1 < static_cast<int>( pimpl->paths.size() ) );

// name buttons
cataimgui::draw_colored_text( _( "Rename:" ) );
draw_colored_text( _( "Rename:" ) );
ImGui::SameLine();
enabled_active_button( "RENAME_START", pimpl->selected_id != -1 );
ImGui::SameLine();
Expand Down Expand Up @@ -578,20 +578,20 @@ void path_manager_ui::draw_controls()
pimpl->selected_id = i;
}
ImGui::SameLine();
cataimgui::draw_colored_text( curr_path.name_start );
draw_colored_text( curr_path.name_start );

ImGui::TableNextColumn();
cataimgui::draw_colored_text( avatar_distance_from_tile( curr_path.recorded_path.front() ) );
draw_colored_text( avatar_distance_from_tile( curr_path.recorded_path.front() ) );

ImGui::TableNextColumn();
cataimgui::draw_colored_text( curr_path.name_end );
draw_colored_text( curr_path.name_end );

ImGui::TableNextColumn();
cataimgui::draw_colored_text( avatar_distance_from_tile( curr_path.recorded_path.back() ) );
draw_colored_text( avatar_distance_from_tile( curr_path.recorded_path.back() ) );

ImGui::TableNextColumn();
cataimgui::draw_colored_text( avatar_distance_from_tile(
curr_path.recorded_path[curr_path.avatar_closest_i_approximate()] ) );
draw_colored_text( avatar_distance_from_tile(
curr_path.recorded_path[curr_path.avatar_closest_i_approximate()] ) );

ImGui::TableNextColumn();
ImGui::Text( "%zu", curr_path.recorded_path.size() );
Expand Down

0 comments on commit 1845b90

Please sign in to comment.