Minor - Improves scene editor and adds audio support - V13.1.0
Improves the scene editor by adding an inspector window to view and modify entity components. Adds audio component support with basic playback controls integrated into the inspector. Adds default audio files.
This commit is contained in:
@@ -134,6 +134,20 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnImGuiRender() override {
|
||||
ImGui::Text("ID: %d", m_id);
|
||||
char nameBuffer[256];
|
||||
strncpy_s(nameBuffer, m_name.c_str(), sizeof(nameBuffer));
|
||||
if (ImGui::InputText("#Name", nameBuffer, sizeof(nameBuffer))) {
|
||||
m_name = std::string(nameBuffer);
|
||||
}
|
||||
|
||||
const char* objectTypes[] = { "Unknown", "Cube", "Sphere", "Terrain" };
|
||||
int currentTypeIndex = static_cast<int>(m_type);
|
||||
if (ImGui::Combo("Object Type", ¤tTypeIndex, objectTypes, IM_ARRAYSIZE(objectTypes))) {
|
||||
m_type = static_cast<ObjectType>(currentTypeIndex);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
int m_id; // ID unique de l'objet
|
||||
|
||||
Reference in New Issue
Block a user