コード例 #1
0
        public override void DrawSettings()
        {
            EditoolsLayout.Space(3);

            EditoolsLayout.Horizontal(true);
            EditoolsBox.HelpBox($"Path ID : {Id}");
            EditoolsField.TextField("", ref Id);
            EditoolsLayout.Horizontal(false);


            EditoolsLayout.Horizontal(true);
            EditoolsBox.HelpBoxInfo("Line Settings");
            EditoolsLayout.Vertical(true);
            EditoolsButton.ButtonWithConfirm("Remove All Points", Color.red, Path.ClearPoints, $"Suppress All Points ? ", "Are your sure ?", "Yes", "No", Path.PathPoints.Count > 0);
            EditoolsButton.Button("Add Point", Color.green, Path.AddPoint);
            EditoolsLayout.Vertical(false);
            EditoolsLayout.Horizontal(false);


            EditoolsLayout.Horizontal(true);
            EditoolsBox.HelpBox("Path Color");
            EditoolsField.ColorField(PathColor, ref PathColor);
            EditoolsLayout.Horizontal(false);

            // New Line


            ShowPathPointUi(Path);
            EditoolsField.IntSlider("Start at percent ", ref currentPercent, 0, 100);

            if (GUI.changed)
            {
                SceneView.RepaintAll();
            }
        }
コード例 #2
0
        public override void DrawSettings()
        {
            if (!IsValid)
            {
                return;
            }
            EditoolsLayout.Space(3);

            EditoolsLayout.Horizontal(true);
            EditoolsBox.HelpBox($"Path ID : {Id}");
            EditoolsField.TextField("", ref Id);
            EditoolsLayout.Horizontal(false);


            EditoolsLayout.Horizontal(true);
            EditoolsBox.HelpBoxInfo("Curve Settings");
            EditoolsLayout.Vertical(true);
            EditoolsButton.ButtonWithConfirm("Reset Curve", Color.red, Curve.ResetCurve, "Reset Curve ?",
                                             $"Remove Curve", "Are your sure ?", _showCondition: !Curve.IsEmpty);
            EditoolsButton.Button("Add Segment", Color.green, Curve.AddSegment);
            EditoolsLayout.Vertical(false);
            EditoolsLayout.Horizontal(false);


            EditoolsLayout.Horizontal(true);
            EditoolsBox.HelpBox("Curve Color");
            EditoolsField.ColorField(PathColor, ref PathColor);
            EditoolsLayout.Horizontal(false);


            EditoolsLayout.Space(2);

            EditoolsField.IntSlider("Start at percent ", ref Curve.CurrentPercent, 0, 100);
            EditoolsField.IntSlider("Curve Definition", ref Curve.CurveDefinition, Curve.MinDefinition,
                                    Curve.MaxDefinition);

            EditoolsLayout.Space(2);

            DisplaySegmentSettings();

            if (GUI.changed)
            {
                Curve.SetCurve();
                SceneView.RepaintAll();
            }
        }
コード例 #3
0
    private void AllPathUI()
    {
        if (!eTarget)
        {
            return;
        }

        for (int i = 0; i < eTarget.Paths.Count; i++)
        {
            PE_Path _p = eTarget.Paths[i];
            EditoolsLayout.Foldout(ref _p.ShowPath, $"Show/Hide {_p.Id}", true);

            if (!_p.ShowPath)
            {
                continue;
            }

            EditoolsBox.HelpBox($"[{i}] {_p.Id} -> {_p.PathPoints.Count} total points");

            EditoolsLayout.Horizontal(true);

            EditoolsButton.ButtonWithConfirm("Remove This Path", Color.red, eTarget.RemovePath, i, $"Suppress Path {i + 1} ? ",
                                             "Are your sure ?");

            EditoolsButton.Button("+", Color.green, _p.AddPoint);
            EditoolsButton.Button("Editable", _p.IsEditable ? Color.green : Color.grey, SetActiveEdition, _p);
            EditoolsLayout.Horizontal(false);

            // New Line
            EditoolsLayout.Horizontal(true);
            EditoolsField.TextField(_p.Id, ref _p.Id);
            EditoolsField.ColorField(_p.PathColor, ref _p.PathColor);


            EditoolsLayout.Horizontal(false);

            ShowPathPointUi(_p);
            EditoolsLayout.Space(5);
        }
    }