90 ImGui::SetNextItemWidth(-FLT_MIN);
91 ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_F,
92 ImGuiInputFlags_Tooltip);
93 ImGui::PushItemFlag(ImGuiItemFlags_NoNavDefaultFocus,
true);
94 if (ImGui::InputTextWithHint(
"##Filter",
"incl,-excl",
Filter.InputBuf,
95 IM_ARRAYSIZE(
Filter.InputBuf),
96 ImGuiInputTextFlags_EscapeClearsAll))
100 ImGuiTableFlags table_flags = ImGuiTableFlags_Resizable |
101 ImGuiTableFlags_ScrollY |
102 ImGuiTableFlags_RowBg;
103 if (ImGui::BeginTable(
"##split", 2, table_flags)) {
104 ImGui::TableSetupColumn(
"Object", ImGuiTableColumnFlags_WidthStretch,
106 ImGui::TableSetupColumn(
"Contents", ImGuiTableColumnFlags_WidthStretch,
120 ImGui::PushID((
int)node->
UID);
121 ImGui::TableNextRow();
122 ImGui::TableSetColumnIndex(0);
123 ImGui::AlignTextToFramePadding();
124 ImGuiTreeNodeFlags tree_flags = ImGuiTreeNodeFlags_None;
126 ImGuiTreeNodeFlags_SpanAllColumns |
127 ImGuiTreeNodeFlags_AllowOverlap;
129 ImGuiTreeNodeFlags_OpenOnArrow |
130 ImGuiTreeNodeFlags_OpenOnDoubleClick;
134 ImGuiTreeNodeFlags_NavLeftJumpsBackHere;
136 ImGui::TreeNodeEx(
"##Object", tree_flags,
"%s", node->
Name);
137 ImGui::TableSetColumnIndex(1);
138 ImGui::TextDisabled(
"UID: 0x%08X", node->
UID);
143 if (node_open && node->
HasData) {
153 ImGui::TableNextRow();
154 ImGui::TableSetColumnIndex(0);
155 ImGui::AlignTextToFramePadding();
156 ImGui::PushItemFlag(ImGuiItemFlags_NoTabStop | ImGuiItemFlags_NoNav,
158 ImGui::Selectable(field_desc.Name,
false,
159 ImGuiSelectableFlags_SpanAllColumns |
160 ImGuiSelectableFlags_AllowOverlap);
161 ImGui::PopItemFlag();
162 ImGui::TableSetColumnIndex(1);
163 ImGui::PushID(field_desc.Name);
164 void* field_ptr = (
void*)(((
unsigned char*)node) + field_desc.Offset);
165 switch (field_desc.DataType) {
166 case ImGuiDataType_Bool: {
167 IM_ASSERT(field_desc.DataCount == 1);
168 ImGui::Checkbox(
"##Editor", (
bool*)field_ptr);
171 case ImGuiDataType_S32: {
172 int v_min = INT_MIN, v_max = INT_MAX;
173 ImGui::SetNextItemWidth(-FLT_MIN);
174 ImGui::DragScalarN(
"##Editor", field_desc.DataType, field_ptr,
175 field_desc.DataCount, 1.0f, &v_min, &v_max);
178 case ImGuiDataType_Float: {
179 float v_min = 0.0f, v_max = 1.0f;
180 ImGui::SetNextItemWidth(-FLT_MIN);
181 ImGui::SliderScalarN(
"##Editor", field_desc.DataType, field_ptr,
182 field_desc.DataCount, &v_min, &v_max);
189 if (node_open) ImGui::TreePop();