Added limits for sizing to be greater than 0

This commit is contained in:
Antoine Pilote
2023-07-15 19:44:28 -04:00
parent fa2d8d3ce9
commit 13fd69391d
5 changed files with 20 additions and 9 deletions

View File

@@ -19,7 +19,9 @@ public:
{
ImGui::Text("Size");
ImGui::TableNextColumn();
ImGui::DragFloat("##Radius", &component.Radius);
ImGui::DragFloat("##Radius", &component.Radius, 0.01f, 0.001f);
component.Radius = std::max(component.Radius, 0.001f);
ImGui::TableNextColumn();
ComponentTableReset(component.Radius, 0.5f);
}