Example #1
0
        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();
                }
            }
        }
Example #2
0
        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}");
        }
Example #4
0
        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);
                }
            }
        }
Example #5
0
        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();
        }
Example #6
0
        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();
                }
            }
        }
Example #7
0
 protected override void OnDraw(DebugMenuContext context)
 {
     DrawReceivers(context);
 }
Example #8
0
 protected abstract void OnDraw(DebugMenuContext context);
Example #9
0
 internal void Draw(DebugMenuContext context)
 {
     OnDraw(context);
 }
Example #10
0
 protected override void OnDraw(DebugMenuContext context)
 {
 }
Example #11
0
 protected override void OnDraw(DebugMenuContext context)
 {
     ImGui.Text("Nothing to see here");
 }
Example #12
0
 protected override void OnDraw(DebugMenuContext context)
 {
     DrawStates();
 }
Example #13
0
        protected override void OnDraw(DebugMenuContext context)
        {
            base.OnDraw(context);

            DrawConnections();
        }