Beispiel #1
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));
        }
Beispiel #2
0
        public StorableModifierUI(MainUI ui)
            : base(ui)
        {
            types_ = new StorableTypesList(Widget.Right);
            types_.OnTypeChanged += TypeChanged;

            storableWidgets_ = new StorableWidgets(Widget.Right);
            storableWidgets_.OnParameterChanged += UpdateParameter;
            storableWidgets_.Type = types_.Value;
        }
Beispiel #3
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);
 }
Beispiel #4
0
        public StepExtenderModifierUI(MainUI ui)
            : base(ui)
        {
            types_ = new StorableTypesList(new List <string> {
                "float"
            }, Widget.Right);
            types_.OnTypeChanged += TypeChanged;

            storableWidgets_ = new StorableWidgets(Widget.Right);
            storableWidgets_.OnParameterChanged += UpdateParameter;
            storableWidgets_.Type = types_.Value;
        }
Beispiel #5
0
        public LightModifierUI(MainUI ui)
            : base(ui, Utilities.AtomHasComponent <Light>)
        {
            property_ = new LightPropertyStringList(
                "Property", "", PropertyChanged, Widget.Right);

            color1_ = new ColorPicker(
                "Color 1", Color.black, Color1Changed, Widget.Right);

            color2_ = new ColorPicker(
                "Color 2", Color.black, Color2Changed, Widget.Right);
        }
Beispiel #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);
        }
Beispiel #7
0
        public override void Init()
        {
            base.Init();

            Utilities.RandomProvider = new UnityRandomProvider();
            instance_   = this;
            sc_         = SuperController.singleton;
            enabled_    = false;
            frozen_     = false;
            options_    = new Options();
            timers_     = new TimerManager();
            ui_         = null;
            parameters_ = new List <IParameter>();
            manager_    = new Manager();

            deferredInitDone_ = false;
            deferredUIDone_   = false;

            SuperController.singleton.StartCoroutine(DeferredInit());
        }
Beispiel #8
0
        public RigidbodyModifierUI(MainUI ui)
            : base(ui, Utilities.AtomHasForceReceivers)
        {
            receiver_ = new ForceReceiverList(
                "Receiver", "", ReceiverChanged, Widget.Right);

            moveType_ = new RigidbodyMovementTypeStringList(
                "Move type", "", MoveTypeChanged, Widget.Right);

            dirType_ = new StringList(
                "Direction", "X",
                new List <string>()
            {
                "X", "Y", "Z", "Custom"
            },
                MoveDirectionChanged, Widget.Right);

            dir_ = new Vector3UI(
                "", Widget.Right | Widget.Constrained, new FloatRange(-1, 1),
                MoveCustomDirectionChanged);
        }
Beispiel #9
0
        public void Start()
        {
            deferredInitDone_ = false;
            deferredUIDone_   = false;

            Utilities.Handler(() =>
            {
                //LogError("===starting===");

                RegisterString(new JSONStorableString("dummy", ""));
                SetStringParamValue("dummy", "dummy");

                if (GetAtomById("synergytestatom") != null)
                {
                    CreateTestStuff(GetAtomById("synergytestatom"));
                }

                ui_ = new MainUI();
                ui_.Create();

                LogVerbose("OK");
                enabled_ = true;
            });
        }
Beispiel #10
0
 public LinkModifierUI(MainUI ui)
     : base(ui)
 {
     add_ = new Button("Add target", Add, Widget.Right);
 }
Beispiel #11
0
 public AtomModifierUI(MainUI ui, AtomList.AtomPredicate pred = null)
     : base(ui)
 {
     atom_ = new AtomList("Atom", "", AtomChanged, pred, Widget.Right);
 }
Beispiel #12
0
 protected BasicSpecificModifierUI(MainUI ui)
 {
     ui_ = ui;
 }
Beispiel #13
0
 public AtomWithMovementUI(MainUI ui, AtomList.AtomPredicate pred = null)
     : base(ui, pred)
 {
     movementUI_ = new MovementUI(Widget.Right);
 }