Пример #1
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();
            }
Пример #2
0
 public AtomWithMovementUI(MainUI ui, AtomList.AtomPredicate pred = null)
     : base(ui, pred)
 {
     movementUI_ = new MovementUI(Widget.Right);
 }