Added limits for sizing to be greater than 0
This commit is contained in:
@@ -20,9 +20,15 @@ public:
|
||||
ImGui::Text("Size");
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGuiHelper::DrawVec3("BoxSize", &component.Size);
|
||||
ImGuiHelper::DrawVec3("BoxSize", &component.Size, 0.5f, 100.0, 0.01f);
|
||||
component.Size = glm::abs(component.Size);
|
||||
|
||||
component.Size.x = std::max(component.Size.x, 0.0001f);
|
||||
component.Size.y = std::max(component.Size.y, 0.0001f);
|
||||
component.Size.z = std::max(component.Size.z, 0.0001f);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
ComponentTableReset(component.Size, glm::vec3(1, 1, 1));
|
||||
ComponentTableReset(component.Size, glm::vec3(0.5f, 0.5f, 0.5f));
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user