public void DrawTable(string tableName, Type type, string name, bool errored = false) { ImGuiEx.TableView(tableName, () => { ImGui.TableNextRow(); paramTable.DrawRow(type, name, ref inputText, errored); }, "Type", "Name", "Value", "Error"); }
public void Draw() { ImGuiEx.TableView(TableLable, () => { for (int i = 0; i < m_KeyNameList.Count; ++i) { ImGui.TableNextRow(); DrawItem(i, m_KeyNameList[i], out bool onEvent); if (onEvent) { break; } } }, Titles); }
public void Draw() { ImGuiEx.TableView("##TableView" + typeof(T).Name, () => { foreach (var objPair in m_ID2Obj) { ImGui.TableNextRow(); DrawItem(objPair.Value, out bool onEvent); if (onEvent) { break; } } }, Titles); }
void DrawTable() { ImGuiEx.TableView("MethodInvokeTable", () => { for (int i = 0; i < inputText.Length; ++i) { ImGui.TableNextRow(); if (errorRow == i) { paramTable.DrawRow(methodParameters[i].ParameterType, methodParameters[i].Name, ref inputText[i], true); } else { paramTable.DrawRow(methodParameters[i].ParameterType, methodParameters[i].Name, ref inputText[i]); } } }, "Type", "Name", "Value", "Error"); }
public void DrawLeft() { var color = new Vector4(0.6f, 0.6f, 0.6f, 0.65f); ImGui.BeginChild("InstanceTableChlid", new Vector2(ImGui.GetWindowContentRegionWidth() * 0.35f, ImGui.GetWindowHeight())); ImGui.Text("Instance List"); InstanceInfo removeInfo = new InstanceInfo(); ImGuiEx.TableView("InstanceTable", () => { foreach (InstanceInfo instance in instanceList) { ImGui.TableNextRow(); if (instance == curInstance) { ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg0 + 1, ImGui.GetColorU32(color)); } ImGuiEx.TableTextRow(0, instance.parent, instance.type.Name); ImGui.TableSetColumnIndex(2); if (ImGui.Button(instance.name.ToString())) { UpdateView(instance); break; //prevent error } ImGui.TableSetColumnIndex(3); if (ImGui.ArrowButton(instance.GetHashCode().ToString(), ImGuiDir.Down)) { removeInfo = instance; } } }, tableFlags, "Parent", "Type", "Name", "Close"); if (removeInfo != null) { instanceList.Remove(removeInfo); } ImGui.EndChild(); }
public override void DrawWindowContent() { if (instance == null) { return; } ImGui.Text(arrayInstance.GetType().ToString() + " " + arrayName); var array = (Array)arrayInstance; ImGui.Text("Length:" + array.Length); ImGuiEx.TableView("ArrayInfo", () => { int index = 0; foreach (var i in (Array)arrayInstance) { if (i == null) { continue; } ImGui.TableNextRow(); ImGui.TableSetColumnIndex(0); arrayDrawer.DrawType(i.GetType()); ImGui.TableSetColumnIndex(1); arrayDrawer.DrawArrayIndex(index); ImGui.TableSetColumnIndex(2); arrayDrawer.DrawArrayValue((Array)arrayInstance, i, index); ++index; //Array too large if (index > 100) { break; } } }, "Type", "Index", "Value"); }