コード例 #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();
        }
コード例 #2
0
        public void Draw()
        {
            if (ImGui.CollapsingHeader("Transform", ImGuiTreeNodeFlags.DefaultOpen))
            {
                ImGui.LabelText("Children", _transform.ChildCount.ToString());

                if (_transform.Parent == null)
                {
                    ImGui.LabelText("Parent", "none");
                }
                else
                {
                    if (NezImGui.LabelButton("Parent", _transform.Parent.Entity.Name))
                    {
                        Core.GetGlobalManager <ImGuiManager>().StartInspectingEntity(_transform.Parent.Entity);
                    }

                    if (ImGui.Button("Detach From Parent"))
                    {
                        _transform.Parent = null;
                    }
                }

                NezImGui.SmallVerticalSpace();

                var pos = _transform.LocalPosition.ToNumerics();
                if (ImGui.DragFloat2("Local Position", ref pos))
                {
                    _transform.SetLocalPosition(pos.ToXNA());
                }

                var rot = _transform.LocalRotationDegrees;
                if (ImGui.DragFloat("Local Rotation", ref rot, 1, -360, 360))
                {
                    _transform.SetLocalRotationDegrees(rot);
                }

                var scale = _transform.LocalScale.ToNumerics();
                if (ImGui.DragFloat2("Local Scale", ref scale, 0.05f))
                {
                    _transform.SetLocalScale(scale.ToXNA());
                }

                scale = _transform.Scale.ToNumerics();
                if (ImGui.DragFloat2("Scale", ref scale, 0.05f))
                {
                    _transform.SetScale(scale.ToXNA());
                }
            }
        }
コード例 #3
0
        public void Draw()
        {
            UpdateRenderersPaneList();

            ImGui.Indent();
            for (var i = 0; i < _renderers.Count; i++)
            {
                _renderers[i].Draw();
                NezImGui.SmallVerticalSpace();
            }

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

            ImGui.Unindent();
        }