diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2024-06-26 22:08:27 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2024-06-26 22:08:27 -0400 |
| commit | 89f740220cc04fc85689fce28438be46b655151c (patch) | |
| tree | c4b193df7284f0e695b7a4d0d45a9b4b93d0cf39 /editor | |
| parent | 7c73f70312def33a74f1f90d0dbbceb84cd46eae (diff) | |
imgui and logging cleanup
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/editor.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp index 0c6f811..b5a47cf 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -714,7 +714,7 @@ void RecordImGuiCameras() { ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg }; - if (ImGui::BeginTable("Entities", 9, tableFlags)) { + if (ImGui::BeginTable("Entities", 8, tableFlags)) { ImGui::TableSetupColumn("Interact"); ImGui::TableSetupColumn("CameraHandle"); ImGui::TableSetupColumn("Target"); @@ -751,13 +751,17 @@ void RecordImGuiCameras() { ImGui::TableSetColumnIndex(1); ImGui::Text("0x%016lX", cam.handle.hash); ImGui::TableSetColumnIndex(2); - ImGui::Text("0x%p", cam.phys.targetInst); + if (cam.phys.targetInst != nullptr) { + ImGui::Text("0x%016lX", cam.phys.targetInst->entHandle.hash); + } else { + ImGui::Text("0x%p", cam.phys.targetInst); + } ImGui::TableSetColumnIndex(3); - ImGui::Text("%hhu", cam.type); + ImGui::Text("%hhu", (unsigned char)cam.type); ImGui::TableSetColumnIndex(4); - ImGui::Text("%hhu", cam.view); + ImGui::Text("%hhu", (unsigned char)cam.view); ImGui::TableSetColumnIndex(5); - ImGui::Text("%hhu", cam.stale); + ImGui::Text("%hhu", (unsigned char)cam.stale); ImGui::TableSetColumnIndex(6); ImGui::Text("%i", cam.isPrimary); ImGui::TableSetColumnIndex(7); @@ -977,7 +981,7 @@ void RecordImGuiLevels() { ImGui::TableSetColumnIndex(0); ImGui::Text("%s", LEVELS[i].name); ImGui::TableSetColumnIndex(1); - ImGui::Text("0x%04hx", LEVELS[i].levelHandle); + ImGui::Text("0x%04hx", static_cast<unsigned short>(LEVELS[i].levelHandle)); ImGui::TableSetColumnIndex(2); ImGui::Text("%u", LEVELS[i].cameras.next - 1); } @@ -1108,7 +1112,7 @@ void RecordImGui_CompInstPos(bool readonly, CompInstance *component) { ImGui::InputScalar("Phys - Motion State", ImGuiDataType_U64, &component->bt.motionState, nullptr, nullptr, "0x%016lX", ImGuiInputTextFlags_ReadOnly); // exclude EntityHandle_MAX so you can't attach the NullCamera - ImGui::BeginDisabled(ActiveCamera->handle == component->entHandle || ActiveCamera->handle == EntityHandle_MAX || ActiveCamera->phys.inst == nullptr || ActiveCamera->phys.inst == CAFE_BABE(CompInstance)); + ImGui::BeginDisabled(ActiveCamera->handle == component->entHandle || ActiveCamera->handle == EntityHandle_MAX || ActiveCamera->phys.inst == nullptr || ActiveCamera->phys.inst == CAFE_BABE(CompInstance) || PkeCamera_Get(selectedEntity->entHandle) != nullptr); if (ImGui::Button("Attach Active Camera")) { PkeCamera_AttachToInstance(ActiveCamera->camHandle, component); } |
