예제 #1
0
        public override void Awake()
        {
            base.Awake();
            AddDrag("Save Road XML");
            {
                UIPanel panel = AddLeftPanel();
                {
                    SavesListBox        = panel.AddUIComponent <SavesListBoxT <RoadAssetInfo> >();
                    SavesListBox.width  = panel.width;
                    SavesListBox.height = 500;
                    SavesListBox.AddScrollBar();
                    SavesListBox.eventSelectedIndexChanged += (_, val) =>
                                                              OnSelectedSaveChanged(val);
                }
                {
                    NameField                   = panel.AddUIComponent <MenuTextField>();
                    NameField.text              = Info.name;
                    NameField.width             = panel.width;
                    NameField.eventTextChanged += (_, __) => OnNameChanged();
                }
            }
            {
                UIPanel panel = AddRightPanel();
                {
                    SummaryBox        = panel.AddUIComponent <SummaryLabel>();
                    SummaryBox.width  = panel.width;
                    SummaryBox.height = 162;
                }
                {
                    DescriptionField           = panel.AddUIComponent <MenuTextField>();
                    DescriptionField.multiline = true;
                    DescriptionField.text      = "Description";
                    DescriptionField.width     = panel.width;
                    DescriptionField.height    = 162;
                }
            }

            FitChildrenVertically(10);
            {
                var BottomPanel = AddBottomPanel(this);
                SaveButton             = BottomPanel.AddUIComponent <MenuButton>();
                SaveButton.text        = "Save";
                SaveButton.eventClick += (_, __) => OnSave();
                //pos.x += -SaveButton.size.x - 20;
                //SaveButton.relativePosition = pos;

                var cancel = BottomPanel.AddUIComponent <MenuButton>();
                cancel.text        = "Cancel";
                cancel.eventClick += (_, __) => Destroy(gameObject);
                //var pos = size - cancel.size - new Vector2(20, 10);
                //cancel.relativePosition = pos;
            }
        }
예제 #2
0
        void ReleaseDesignerOutlets()
        {
            if (SummaryLabel != null)
            {
                SummaryLabel.Dispose();
                SummaryLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (CityLabel != null)
            {
                CityLabel.Dispose();
                CityLabel = null;
            }

            if (ScrollView != null)
            {
                ScrollView.Dispose();
                ScrollView = null;
            }

            if (SubLocalityLabel != null)
            {
                SubLocalityLabel.Dispose();
                SubLocalityLabel = null;
            }

            if (SummaryLabel != null)
            {
                SummaryLabel.Dispose();
                SummaryLabel = null;
            }

            if (TemperatureLabel != null)
            {
                TemperatureLabel.Dispose();
                TemperatureLabel = null;
            }

            if (WeatherIcon != null)
            {
                WeatherIcon.Dispose();
                WeatherIcon = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (CurrentLocationButton != null)
            {
                CurrentLocationButton.Dispose();
                CurrentLocationButton = null;
            }

            if (Humid1Label != null)
            {
                Humid1Label.Dispose();
                Humid1Label = null;
            }

            if (IconImage != null)
            {
                IconImage.Dispose();
                IconImage = null;
            }

            if (SettingsButton != null)
            {
                SettingsButton.Dispose();
                SettingsButton = null;
            }

            if (Speed1Label != null)
            {
                Speed1Label.Dispose();
                Speed1Label = null;
            }

            if (StartGpsButton != null)
            {
                StartGpsButton.Dispose();
                StartGpsButton = null;
            }

            if (SummaryLabel != null)
            {
                SummaryLabel.Dispose();
                SummaryLabel = null;
            }

            if (Temp1Label != null)
            {
                Temp1Label.Dispose();
                Temp1Label = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TimezoneInfoLabel != null)
            {
                TimezoneInfoLabel.Dispose();
                TimezoneInfoLabel = null;
            }

            if (WeatherRootView != null)
            {
                WeatherRootView.Dispose();
                WeatherRootView = null;
            }

            if (WeekDayLabel != null)
            {
                WeekDayLabel.Dispose();
                WeekDayLabel = null;
            }

            if (WeekTableView != null)
            {
                WeekTableView.Dispose();
                WeekTableView = null;
            }
        }