Example #1
0
        public void draw()
        {
            updatePostProcessorInspectorList();

            ImGui.Indent();
            for (var i = 0; i < _postProcessorInspectors.Count; i++)
            {
                if (_postProcessorInspectors[i].postProcessor._scene != null)
                {
                    _postProcessorInspectors[i].draw();
                    NezImGui.SmallVerticalSpace();
                }
            }

            if (_postProcessorInspectors.Count == 0)
            {
                NezImGui.SmallVerticalSpace();
            }

            if (NezImGui.CenteredButton("Add PostProcessor", 0.6f))
            {
                ImGui.OpenPopup("postprocessor-selector");
            }

            ImGui.Unindent();

            NezImGui.MediumVerticalSpace();
            drawPostProcessorSelectorPopup();
        }
        public unsafe void Draw()
        {
            if (Core.Scene.Entities.Count > MIN_ENTITIES_FOR_CLIPPER)
            {
                ImGuiListClipper *  clipperPtr = ImGuiNative.ImGuiListClipper_ImGuiListClipper(Core.Scene.Entities.Count, -1);
                ImGuiListClipperPtr clipper    = new ImGuiListClipperPtr(clipperPtr);

                while (clipper.Step())
                {
                    for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++)
                    {
                        DrawEntity(Core.Scene.Entities[i]);
                    }
                }

                ImGuiNative.ImGuiListClipper_destroy(clipperPtr);
            }
            else
            {
                for (int i = 0; i < Core.Scene.Entities.Count; i++)
                {
                    DrawEntity(Core.Scene.Entities[i]);
                }
            }

            NezImGui.MediumVerticalSpace();
            if (NezImGui.CenteredButton("Create Entity", 0.6f))
            {
                ImGui.OpenPopup("create-entity");
            }

            DrawCreateEntityPopup();
        }
Example #3
0
        public void Draw()
        {
            for (var i = 0; i < Core.Scene.Entities.Count; i++)
            {
                DrawEntity(Core.Scene.Entities[i]);
            }

            NezImGui.MediumVerticalSpace();
            if (NezImGui.CenteredButton("Create Entity", 0.6f))
            {
                ImGui.OpenPopup("create-entity");
            }

            DrawCreateEntityPopup();
        }