protected override void OnDraw(DebugMenuContext context) { if (ImGui.Button(isDocked ? "Undock" : "Dock")) { isDocked = !isDocked; } for (int s = 0; s < sections.Count; s++) { var section = sections[s]; if (s > 0 && section.Settings.HasFlag(DebugMenuSection.Setting.AddSeparatorBefore)) { ImGui.Separator(); } if (ImGui.CollapsingHeader(section.Title)) { using (new ScopeIndent()) { section.Draw(context); } } if (s < sections.Count - 1 && section.Settings.HasFlag(DebugMenuSection.Setting.AddSeparatorAfter)) { ImGui.Separator(); } } }
protected override void OnDraw(DebugMenuContext context) { base.OnDraw(context); ImGui.Separator(); if (contentFormats.DrawHeader("Found Content formats")) { using (new ScopeIndent()) { foreach (var contentFormat in contentFormats.Value) { ImGui.Text(contentFormat.GetType().Name); } } } if (pathToContentPaths.DrawHeader("Local content")) { using (new ScopeIndent()) { foreach (var pair in pathToContentPaths.Value) { ImGui.Text($"'{pair.Key}': Format '{pair.Value.ContentFormat.GetType().Name}'"); } } } }
protected override void OnDraw(DebugMenuContext context) { base.OnDraw(context); ImGui.Separator(); var status = addressSystemInitialized ? "INIT DONE" : "PENDING"; ImGui.Text($"Addressable status: {status}"); }
protected override void OnDraw(DebugMenuContext context) { if (!servants.AssertDrawable()) { return; } foreach (var commandServant in servants.Value) { var text = $"[{(commandServant.IsAlive ? "ON" : "OFF")}] ({commandServant.GetType().Name}) {commandServant.Name}"; if (commandServant.IsAlive) { ImGui.Text(text); } else { ImGui.TextDisabled(text); } } }
protected override void OnDraw(DebugMenuContext context) { if (contentAccessRequests.AssertDrawable()) { if (ImGui.CollapsingHeader("Content access requests")) { using (new ScopeIndent()) { foreach (var accessRequest in contentAccessRequests.Value) { ImGui.Text($"{accessRequest.CommandId.KeyDebugDisplay}: {accessRequest.Emitter.Owner.Name}"); } } } } if (hierarchicalTree.AssertDrawable()) { hierarchicalTree.Value.Draw(); } ImGui.Separator(); }
private void DrawReceivers(DebugMenuContext context) { if (!receivers.AssertDrawable()) { return; } for (var k = 0; k < receivers.Value.Keys.Count; k++) { var key = Key(k); var cmdName = idToTypes.ContainsKey(key & CommandId.MASK_TYPE) ? idToTypes[key & CommandId.MASK_TYPE].Name : Const.UNDEFINED; var commandId = (CommandId)key; if (ImGui.CollapsingHeader($"{commandId.KeyDebugDisplay}: {cmdName}")) { ImGui.Indent(); { var count = GetReceiverCount(key); if (count > 0) { for (var c = 0; c < count; c++) { var noticeReceiver = GetReceiver(key, c); ImGui.Text($"Owner: {noticeReceiver.Owner.Name}"); } } else { ImGui.Text(Const.EMPTY); } } ImGui.Unindent(); } } }
protected override void OnDraw(DebugMenuContext context) { DrawReceivers(context); }
protected abstract void OnDraw(DebugMenuContext context);
internal void Draw(DebugMenuContext context) { OnDraw(context); }
protected override void OnDraw(DebugMenuContext context) { }
protected override void OnDraw(DebugMenuContext context) { ImGui.Text("Nothing to see here"); }
protected override void OnDraw(DebugMenuContext context) { DrawStates(); }
protected override void OnDraw(DebugMenuContext context) { base.OnDraw(context); DrawConnections(); }