예제 #1
0
        public virtual void Initialize()
        {
            var w            = new Lime.DummyWindow();
            var windowWidget = new Lime.WindowWidget(w);

            bundlePicker = new BundlePicker();
        }
예제 #2
0
            /// <summary>
            /// Creates basic UI elements, but lefts bundle list empty. To fill it, call <see cref="CreateBundlesList"/>
            /// </summary>
            public BundlePickerWidget(BundlePicker bundlePicker)
            {
                this.bundlePicker = bundlePicker;

                Layout = new VBoxLayout {
                    Spacing = 6
                };
                MaxWidth = 250f;

                checkboxes = new Dictionary <string, ThemedCheckBox>();
                lines      = new Dictionary <string, Widget>();
                scrollView = new ThemedScrollView();
                scrollView.CompoundPostPresenter.Add(new WidgetBoundsPresenter(Lime.Theme.Colors.ControlBorder));
                scrollView.Content.Layout = new VBoxLayout {
                    Spacing = 6
                };
                scrollView.Content.Padding = new Thickness(6);
                scrollView.CompoundPresenter.Add(new WidgetFlatFillPresenter(Color4.White));

                selectButton = new ThemedButton {
                    Text    = "Select all",
                    Clicked = SelectButtonClickHandler
                };

                refreshButton = new ThemedButton {
                    Text    = "Refresh",
                    Clicked = Refresh,
                };

                filter = new ThemedEditBox();
                filter.Tasks.Add(FilterBundlesTask);

                infoText = new ThemedSimpleText("Selected action uses all bundles.")
                {
                    Color        = Theme.Colors.BlackText,
                    MinMaxHeight = Theme.Metrics.DefaultEditBoxSize.Y,
                    Visible      = false,
                    VAlignment   = VAlignment.Center,
                };

                AddNode(filter);
                AddNode(infoText);
                AddNode(scrollView);

                var buttonLine = new Widget {
                    Layout = new HBoxLayout {
                        Spacing = 6
                    }
                };

                AddNode(buttonLine);
                buttonLine.AddNode(new Widget {
                    LayoutCell = new LayoutCell {
                        StretchX = float.MaxValue
                    }, MaxHeight = 0
                });
                buttonLine.AddNode(refreshButton);
                buttonLine.AddNode(selectButton);
                selectButton.Tasks.Add(UpdateTextOfSelectButtonTask());
            }
예제 #3
0
 public override void Initialize()
 {
     bundlePicker       = new BundlePicker();
     bundlePickerWidget = new BundlePickerWidget(bundlePicker);
     mainInterfaceWidget.AddNode(bundlePickerWidget);
 }
예제 #4
0
 public override void Initialize()
 {
     bundlePicker       = new BundlePicker();
     bundlePickerWidget = new BundlePickerWidget(bundlePicker);
     hBox.AddNode(bundlePickerWidget);
 }