Minor update - ui x physix

This commit is contained in:
2025-01-15 20:42:42 +01:00
parent c707e49561
commit 39fa32603f
6 changed files with 106 additions and 100 deletions

View File

@@ -259,6 +259,29 @@ void imguiManager::WidgetObjectWindow(ApplicationClass* app)
// Physics
std::string physicsLabel = "Physics##" + std::to_string(index);
if (ImGui::Checkbox(physicsLabel.c_str(), &m_isPhyiscsEnabled))
{
object->SetPhysicsEnabled(m_isPhyiscsEnabled);
}
// 3 radio button on the same line to set the ObjectType
std::string typeLabel = "Type##" + std::to_string(index);
ObjectType type = object->GetType();
if (ImGui::RadioButton("None", type == ObjectType::Unknown))
{
object->SetType(ObjectType::Unknown);
}
ImGui::SameLine();
if (ImGui::RadioButton("Cube", type == ObjectType::Cube))
{
object->SetType(ObjectType::Cube);
}
ImGui::SameLine();
if (ImGui::RadioButton("Sphere", type == ObjectType::Sphere))
{
object->SetType(ObjectType::Sphere);
}
ImGui::Separator();