Minor update - ui x physix
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user