diff options
Diffstat (limited to 'src/game.cpp')
| -rw-r--r-- | src/game.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp index 43cc7f2..fe983df 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -30,6 +30,7 @@ const char *PKE_FILE_ENTITY_TYPE_IMPORTER_GLTF_ACCESSOR_INDEX_INDEX = "Importer_ char consoleBuffer[consoleBufferCount][consoleLineLength]; long consoleBufferIndex = 0; +EntityHandle selectedEntity = EntityHandle_MAX; bool shouldCreateEntityType = false; EntityType *entityTypeToCreate = nullptr; @@ -257,7 +258,8 @@ void RecordImGuiEntityList() { ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg }; - if (ImGui::BeginTable("Entities", 5, tableFlags)) { + if (ImGui::BeginTable("Entities", 6, tableFlags)) { + ImGui::TableSetupColumn("Select"); ImGui::TableSetupColumn("EntityHandle"); ImGui::TableSetupColumn("ParentEntityHandle"); ImGui::TableSetupColumn("GrBindsHandle"); @@ -273,14 +275,17 @@ void RecordImGuiEntityList() { auto *entity = &entities[row]; ImGui::TableNextRow(); ImGui::TableSetColumnIndex(0); - ImGui::Text("0x%016lX", static_cast<EntityHandle_T>(entity->handle)); + if (ImGui::Button("Select")) + selectedEntity = entity->handle; ImGui::TableSetColumnIndex(1); - ImGui::Text("0x%016lX", static_cast<EntityHandle_T>(entity->parentHandle)); + ImGui::Text("0x%016lX", static_cast<EntityHandle_T>(entity->handle)); ImGui::TableSetColumnIndex(2); - ImGui::Text("0x%016lX", static_cast<GrBindsHandle_T>(entity->grBindsHandle)); + ImGui::Text("0x%016lX", static_cast<EntityHandle_T>(entity->parentHandle)); ImGui::TableSetColumnIndex(3); - ImGui::Text("0x%016lX", static_cast<InstanceHandle_T>(entity->instanceHandle)); + ImGui::Text("0x%016lX", static_cast<GrBindsHandle_T>(entity->grBindsHandle)); ImGui::TableSetColumnIndex(4); + ImGui::Text("0x%016lX", static_cast<InstanceHandle_T>(entity->instanceHandle)); + ImGui::TableSetColumnIndex(5); ImGui::Text("%u", entity->isMarkedForRemoval); } } |
