Use `0x` prefix on hex values, add Editor ID and Area names

This commit is contained in:
Phillip Stephens 2021-05-27 22:49:47 -07:00 committed by Luke Street
parent bc7ff9afaf
commit 5cc3f9c05a
2 changed files with 5 additions and 3 deletions

View File

@ -179,7 +179,7 @@ void ImGuiConsole::BeginEntityRow(const ImGuiEntityEntry& entry) {
ImGui::PushStyleColor(ImGuiCol_Text, textColor);
if (ImGui::TableNextColumn()) {
auto text = fmt::format(FMT_STRING("{:x}"), entry.uid.Value());
auto text = fmt::format(FMT_STRING("0x{:04X}"), entry.uid.Value());
ImGui::Selectable(text.c_str(), &entry.ent->m_debugSelected,
ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowItemOverlap);
if (ImGui::IsItemHovered()) {
@ -319,7 +319,7 @@ void ImGuiConsole::ShowInspectWindow(bool* isOpen) {
bool ImGuiConsole::ShowEntityInfoWindow(TUniqueId uid) {
bool open = true;
ImGuiEntityEntry& entry = ImGuiConsole::entities[uid.Value()];
auto name = fmt::format(FMT_STRING("{}##{:x}"), !entry.name.empty() ? entry.name : entry.type, uid.Value());
auto name = fmt::format(FMT_STRING("{}##0x{:04X}"), !entry.name.empty() ? entry.name : entry.type, uid.Value());
if (ImGui::Begin(name.c_str(), &open, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::PushID(uid.Value());
entry.ent->ImGuiInspect();

View File

@ -273,7 +273,9 @@ void CEntity::ImGuiInspect() {
}
}
if (ImGui::CollapsingHeader("Entity", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::Text("ID: %x", x8_uid.Value());
ImGui::Text("ID: 0x%04X", x8_uid.Value());
ImGui::Text("Editor ID: 0x%08X", xc_editorId.id);
ImGui::Text("Area: %i", x4_areaId);
ImGui::Text("Name: %s", x10_name.c_str());
BITFIELD_CHECKBOX("Active", x30_24_active);
ImGui::Checkbox("Highlight", &m_debugSelected);