Example #1
0
        public void Run(EditorUpdate runParam)
        {
            var groupedEditors = Editors.GroupBy(e => e.Category);

            if (ImGui.BeginMainMenuBar())
            {
                foreach (var group in groupedEditors)
                {
                    if (ImGui.BeginMenu(group.Key))
                    {
                        foreach (var editor in group)
                        {
                            bool active = editor.Active;
                            ImGui.MenuItem(editor.Name, "", ref active, true);
                            editor.Active = active;
                        }
                        ImGui.EndMenu();
                    }
                }
                ImGui.EndMainMenuBar();
            }

            foreach (var editor in Editors.Where(e => e.Active))
            {
                editor.Run(runParam);
            }
        }
Example #2
0
        public void Run(EditorUpdate runParam)
        {
            var open = Active;

            ImGui.Begin(Name, ref open);
            Active = open;
            var values = _logs.ToList();

            foreach (var log in values.OrderBy(log => log))
            {
                ImGui.Text(log);
            }
            _logs.Clear();
            ImGui.End();
        }