Esempio n. 1
0
        public ModifierUI(MainUI ui)
        {
            ui_ = ui;

            header_ = new Header("", Widget.Right);

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

            enabled_ = new Checkbox(
                "Modifier enabled", true, EnabledChanged, Widget.Right);

            disableOthers_ = new Button(
                "Disable other modifiers", DisableOthers, Widget.Right);

            enableAll_ = new Button(
                "Enable all modifiers", EnableAll, Widget.Right);

            type_ = new ModifierStringList(
                "Type", "", TypeChanged, Widget.Right);

            type_.PopupHeight = 520;

            modifierSync_ = new ModifierSyncStringList(
                "Sync", ModifierSyncChanged, Widget.Right);
        }
Esempio n. 2
0
        public StringListStorableParameterUI()
        {
            av_      = new StringList("Available strings", null, Widget.Right);
            strings_ = new StringList("Strings", null, Widget.Right);
            current_ = new Textbox("Selected", "", CurrentChanged, Widget.Right);
            save_    = new Button("Save changes", SaveChanges, Widget.Right);
            add_     = new Button("Add new", AddNew, Widget.Right);
            delete_  = new ConfirmableButton(
                "Delete selected", DeleteSelected, Widget.Right);

            strings_.SelectionIndexChanged += StringSelected;
        }
Esempio n. 3
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();
        }
Esempio n. 4
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_);
        }
Esempio n. 5
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));
        }
Esempio n. 6
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();
            }