public UIPropertySelectContainer() { Add(SelectedLotName = new UILabel() { Size = new Vector2(341, 25), Alignment = TextAlignment.Center | TextAlignment.Top, Caption = "<no property selected>" }); Add(Dropdown = new UIInboxDropdown() { Position = new Vector2(0, 25) }); Dropdown.OnSearch += (query) => { FindController <GenericSearchController>()?.SearchLots(query, false, (results) => { Dropdown.SetResults(results); }); }; Dropdown.OnSelect += SelectLot;; Add(Dropdown); var ctr = ControllerUtils.BindController <GenericSearchController>(this); }
//listbox //smallThumb | avatarName | buildCheckbox | deleteButton public UIManageDonatorDialog(UILotControl lotControl) : base(UIDialogStyle.Standard | UIDialogStyle.OK, true) { this.LotControl = lotControl; Community = lotControl.vm.TSOState.CommunityLot; BuildIcon = new UIImage(); var ui = RenderScript("fsodonatorlist.uis"); var listBg = ui.Create <UIImage>("ListBoxBackground"); AddAt(4, listBg); listBg.With9Slice(25, 25, 25, 25); listBg.Width += 110; listBg.Height += 50; Dropdown = ui.Create <UIInboxDropdown>("PullDownMenuSetup"); Dropdown.OnSearch += (query) => { FindController <GenericSearchController>()?.Search(query, false, (results) => { Dropdown.SetResults(results); }); }; Dropdown.OnSelect += AddDonator; Add(Dropdown); RoommateListSlider.AttachButtons(RoommateListScrollUpButton, RoommateScrollDownButton, 1); RoommateListBox.AttachSlider(RoommateListSlider); RoommateListBox.Columns[1].Alignment = Framework.TextAlignment.Left | Framework.TextAlignment.Middle; Caption = GameFacade.Strings.GetString("f114", (Community)?"6":"12"); SetSize(405, 400); DonatorsLabel.CaptionStyle = DonatorsLabel.CaptionStyle.Clone(); DonatorsLabel.CaptionStyle.Shadow = true; DonatorsLabel.Caption = GameFacade.Strings.GetString("f114", (Community) ? "5" : "13"); AddAt(5, BuildIcon); var ctr = ControllerUtils.BindController <GenericSearchController>(this); UpdateDonatorList(); OKButton.OnButtonClick += (btn) => { UIScreen.RemoveDialog(this); }; }