Skip to content

Commit

Permalink
reorder clamp
Browse files Browse the repository at this point in the history
Co-authored-by: mqrause <38702195+mqrause@users.noreply.github.com>
  • Loading branch information
Kilvoctu and mqrause authored Dec 29, 2024
1 parent 23aca45 commit 993b566
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mission_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ class mission_ui_impl : public cataimgui::window
mission_ui_tab_enum selected_tab = mission_ui_tab_enum::ACTIVE;
mission_ui_tab_enum switch_tab = mission_ui_tab_enum::num_tabs;

float window_width = std::clamp( ImGui::GetMainViewport()->Size.x / 2,
float( str_width_to_pixels( 80 ) ),
float window_width = std::clamp( float( str_width_to_pixels( 80 ) ),
ImGui::GetMainViewport()->Size.x / 2,
ImGui::GetMainViewport()->Size.x );
float window_height = std::clamp( ImGui::GetMainViewport()->Size.y / 2,
float( str_height_to_pixels( 24 ) ),
float window_height = std::clamp( float( str_height_to_pixels( 24 ) ),
ImGui::GetMainViewport()->Size.y / 2,
ImGui::GetMainViewport()->Size.y );
float table_column_width = window_width / 2;

Expand Down

0 comments on commit 993b566

Please sign in to comment.