Пример #1
0
 public MorphCategory(string n, int flags, MorphCheckboxes mc)
 {
     Name         = n;
     flags_       = flags;
     mc_          = mc;
     collapsible_ = new Collapsible(Name, OnCollapsibleToggled, flags_);
 }
Пример #2
0
        public AudioClipsCheckboxes(
            string name, AudioClipsCallback callback, int flags = 0)
            : base(flags)
        {
            callback_ = callback;

            collapsible_ = new Collapsible(name, Toggled, flags);
            browse_      = new Button("Add file...", Browse, flags);
        }
Пример #3
0
        public EyesModifierUI(MainUI ui)
            : base(ui, Utilities.AtomHasEyes)
        {
            saccade_ = new Collapsible("Saccade", null, Widget.Right);

            saccadeTime_ = new RandomizableTimeWidgets(
                "Saccade interval", Widget.Right);

            saccadeMin_ = new FloatSlider(
                "Saccade minimum (x10)", 0, new FloatRange(0, 1),
                SaccadeMinChanged, Widget.Right);

            saccadeMax_ = new FloatSlider(
                "Saccade maximum (x10)", 0, new FloatRange(0, 1),
                SaccadeMaxChanged, Widget.Right);

            minDistance_ = new FloatSlider(
                "Minimum distance (avoids cross-eyed)", 0, new FloatRange(0, 1),
                MinDistanceChanged, Widget.Right);

            focusDurationCollapsible_ = new Collapsible(
                "Focus time", null, Widget.Right);

            focusDuration_ = new RandomizableTimeWidgets(
                "Focus time", Widget.Right);

            gaze_ = new StringList(
                "MacGruber's Gaze", GazeChanged, Widget.Right);

            blink_ = new StringList("Blink", BlinkChanged, Widget.Right);

            addTarget_ = new Button("Add target", AddTarget, Widget.Right);

            previewsEnabled_ = new Checkbox(
                "Show previews", PreviewsChanged, Widget.Right);

            previewsAlpha_ = new FloatSlider(
                "Previews alpha", 0.3f, new FloatRange(0, 1),
                PreviewsAlphaChanged, Widget.Right);

            foreach (var w in saccadeTime_.GetWidgets())
            {
                saccade_.Add(w);
            }

            saccade_.Add(saccadeMin_);
            saccade_.Add(saccadeMax_);
            saccade_.Add(new SmallSpacer(Widget.Right));

            foreach (var w in focusDuration_.GetWidgets())
            {
                focusDurationCollapsible_.Add(w);
            }

            focusDurationCollapsible_.Add(new SmallSpacer(Widget.Right));
        }
Пример #4
0
 public AudioModifierUI(MainUI ui)
     : base(ui, Utilities.AtomCanPlayAudio)
 {
     delayCollapsible_ = new Collapsible("Delay", null, Widget.Right);
     delayWidgets_     = new DurationWidgets("Delay", DelayTypeChanged, Widget.Right);
     playType_         = new StringList(
         "Play type", "", PlayTypeStrings(),
         PlayTypeChanged, Widget.Right);
     stop_  = new Button("Stop audio", StopAudio, Widget.Right);
     clips_ = new AudioClipsCheckboxes("Clips", ClipsChanged, Widget.Right);
 }
Пример #5
0
        public NaturalMorphProgressionUI(int flags)
            : base(flags)
        {
            durationCollapsible_ = new Collapsible(
                "Natural duration", null, flags_);

            durationWidgets_ = new DurationWidgets(
                "Natural", DurationTypeChanged, flags_);

            delayCollapsible_ = new Collapsible("Natural delay", null, flags_);
            delayWidgets_     = new DelayWidgets(flags_);
            delayWidgets_.SupportsHalfMove = false;
        }
Пример #6
0
        public MorphModifierUI(MainUI ui)
            : base(ui, Utilities.AtomHasMorphs)
        {
            progressionType_ = new MorphProgressionTypeStringList(
                "Morph progression", ProgressionTypeChanged, Widget.Right);

            selectedMorphsCollapsible_ = new Collapsible(
                "Selected morphs", null, Widget.Right);

            toggleAll_ = new Button("Toggle All", ToggleAll, Widget.Right);

            morphCheckboxes_ = new MorphCheckboxes(
                "Morphs", MorphAdded, MorphRemoved, Widget.Right);
        }
Пример #7
0
        public EyesModifierTargetUIContainer(EyesModifier m, EyesTargetContainer t)
        {
            modifier_  = m;
            container_ = t;

            delete_ = new ConfirmableButton(
                "Delete target", DeleteTarget, Widget.Right);

            types_ = new FactoryStringList <EyesTargetFactory, IEyesTarget>(
                "Type", TypeChanged, Widget.Right);

            enabled_ = new Checkbox(
                "Enabled", t.Enabled, EnabledChanged, Widget.Right);

            collapsible_ = new Collapsible(
                container_.Name, null, Widget.Right);

            UpdateWidgets();
        }
Пример #8
0
        public UnsyncedModifierUI(int flags)
            : base(flags)
        {
            durationCollapsible_ = new Collapsible(
                "Duration", null, flags_);

            durationWidgets_ = new DurationWidgets(
                "Duration", DurationTypeChanged, flags_);

            delayCollapsible_ = new Collapsible("Delay", null, flags_);
            delayWidgets_     = new DelayWidgets(flags_);
            delayWidgets_.SupportsHalfMove = false;

            copy_ = new ConfirmableButton(
                "Copy to other unsynced", CopyToAll, flags_);

            syncToThis_ = new ConfirmableButton(
                "Sync all to this", SyncToThis, flags_);
        }
Пример #9
0
        public LinkModifierControllerUI(
            LinkModifier m, LinkModifierController mc)
        {
            modifier_ = m;
            mc_       = mc;

            collapsible_ = new Collapsible(mc_.Name, null, Widget.Right);

            delete_ = new ConfirmableButton("Delete", Delete, Widget.Right);

            controller_ = new FreeControllerList(
                "Controller", mc_.ControllerName,
                ControllerChanged, Widget.Right);

            atom_ = new AtomList(
                "Link to atom", mc_.AtomName, AtomChanged, null,
                Widget.Right | Widget.AllowNone);

            rb_ = new LinkTargetList(
                "Link to", mc_.RigidbodyName, RigidbodyChanged,
                Widget.Right | Widget.AllowNone);

            position_ = new PositionStateList(
                "Position", "", PositionChanged,
                Widget.Right | Widget.AllowNone);

            rotation_ = new RotationStateList(
                "Rotation", "", RotationChanged,
                Widget.Right | Widget.AllowNone);

            Update();

            collapsible_.Add(delete_);
            collapsible_.Add(controller_);
            collapsible_.Add(atom_);
            collapsible_.Add(rb_);
            collapsible_.Add(position_);
            collapsible_.Add(rotation_);
            collapsible_.Add(new SmallSpacer(Widget.Right));
        }
Пример #10
0
            public SelectedMorphWidget(
                MorphModifierUI ui, SelectedMorph sm, int flags = 0)
            {
                ui_ = ui;
                sm_ = sm;

                collapsible_ = new Collapsible(sm_.DisplayName, null, flags);
                enabled_     = new Checkbox("Enabled", EnabledChanged, flags);
                remove_      = new ConfirmableButton("Remove", Remove, flags);
                movementUI_  = new MovementUI(flags);

                enabled_.Parameter = sm_.EnabledParameter;
                movementUI_.SetValue(sm_.Movement, sm_.PreferredRange);

                collapsible_.Add(enabled_);
                collapsible_.Add(remove_);

                foreach (var w in movementUI_.GetWidgets())
                {
                    collapsible_.Add(w);
                }
                RenameCollapsible();
            }
Пример #11
0
        public OptionsUI(int flags = 0)
        {
            collapsible_ = new Collapsible("Options and presets", null, flags);


            resetValuesOnFreeze_ = new Checkbox(
                "Reset positions on freeze", options_.ResetValuesOnFreeze,
                ResetValuesOnFreezeChanged, flags);

            resetCountersOnThaw_ = new Checkbox(
                "Reset counters on thaw", options_.ResetCountersOnThaw,
                ResetCountersOnThaw, flags);

            pickAnimatable_ = new Checkbox(
                "Pick animatable", PickAnimatableChanged, flags);

            manageAnimatable_ = new Button(
                "Manage animatables", ManageAnimatables, flags);

            overlapTime_ = new FloatSlider(
                "Global overlap time", options_.OverlapTime,
                new FloatRange(0, 1), OverlapTimeChanged, flags);

            logLevel_ = new StringList(
                "Log level", Options.LogLevelToString(options_.LogLevel),
                Options.GetLogLevelNames(), LogLevelChanged, flags);

            logOverlap_ = new Checkbox(
                "Log overlap", LogOverlapChanged, flags);

            usePlaceholder_ = new Checkbox(
                "Save: use placeholder for atoms", null, flags);

            collapsible_.Add(resetValuesOnFreeze_);
            collapsible_.Add(resetCountersOnThaw_);
            collapsible_.Add(pickAnimatable_);
            collapsible_.Add(manageAnimatable_);
            collapsible_.Add(overlapTime_);
            collapsible_.Add(logLevel_);
            collapsible_.Add(logOverlap_);
            collapsible_.Add(new SmallSpacer(flags));

            collapsible_.Add(usePlaceholder_);

            collapsible_.Add(new Button(
                                 "Full: save", SaveFull, flags));

            collapsible_.Add(new Button(
                                 "Full: load, replace everything",
                                 () => { LoadFull(Utilities.PresetReplace); },
                                 flags));

            collapsible_.Add(new Button(
                                 "Full: load, append steps",
                                 () => { LoadFull(Utilities.PresetAppend); },
                                 flags));

            collapsible_.Add(new SmallSpacer(flags));


            collapsible_.Add(new Button(
                                 "Step: save current", SaveStep, flags));

            collapsible_.Add(new Button(
                                 "Step: load, replace current",
                                 () => { LoadStep(Utilities.PresetReplace); },
                                 flags));

            collapsible_.Add(new Button(
                                 "Step: load, add modifiers to current step",
                                 () => { LoadStep(Utilities.PresetMerge); },
                                 flags));

            collapsible_.Add(new Button(
                                 "Step: load, append as new step",
                                 () => { LoadStep(Utilities.PresetAppend); },
                                 flags));

            collapsible_.Add(new SmallSpacer(flags));


            collapsible_.Add(new Button(
                                 "Modifier: save current", SaveModifier, flags));

            collapsible_.Add(new Button(
                                 "Modifier: load, replace current",
                                 () => { LoadModifier(Utilities.PresetReplace); },
                                 flags));

            collapsible_.Add(new Button(
                                 "Modifier: load, append to current step",
                                 () => { LoadModifier(Utilities.PresetAppend); },
                                 flags));


            collapsible_.Add(new SmallSpacer(flags));
        }