public void SetTab(UIGizmoTab tab)
        {
            var categoryType = tab == UIGizmoTab.People ? Top100CategoryType.AVATAR : Top100CategoryType.LOT;
            var items        = Domain.Categories.Where(x => x.CategoryType == categoryType).Select(x =>
            {
                return(new Top100CategoryListItem()
                {
                    Category = x.Category,
                    Icon = GetCategoryIcon(x.Category),
                    Name = x.Name
                });
            }).ToList();

            View.DisplayCategories(items);

            if (tab == UIGizmoTab.Property)
            {
                SetCategory(LastLotCategory);
            }
            else
            {
                SetCategory(LastAvatarCategory);
            }
        }
Exemplo n.º 2
0
 void PeopleTabButton_OnButtonClick(UIElement button)
 {
     m_Opt = true;
     TabV  = UIGizmoTab.People;
     SetOpen(true);
 }
Exemplo n.º 3
0
 void HousesTabButton_OnButtonClick(UIElement button)
 {
     m_Opt = false;
     TabV  = UIGizmoTab.Property;
     SetOpen(true);
 }
Exemplo n.º 4
0
        public UIGizmo()
        {
            TabV = Tab;

            var ui = this.RenderScript("gizmo.uis");

            BackgroundImageGizmo = ui.Create <UIImage>("BackgroundImageGizmo");
            this.AddAt(0, BackgroundImageGizmo);

            BackgroundImageGizmoPanel = ui.Create <UIImage>("BackgroundImageGizmoPanel");
            this.AddAt(0, BackgroundImageGizmoPanel);

            BackgroundImagePanel = ui.Create <UIImage>("BackgroundImagePanel");
            this.AddAt(0, BackgroundImagePanel);

            UIUtils.MakeDraggable(BackgroundImageGizmo, this);
            UIUtils.MakeDraggable(BackgroundImageGizmoPanel, this);
            UIUtils.MakeDraggable(BackgroundImagePanel, this);

            ButtonContainer = new UIContainer();
            this.Remove(ExpandButton);
            ButtonContainer.Add(ExpandButton);
            this.Remove(ContractButton);
            ButtonContainer.Add(ContractButton);
            this.Remove(FiltersButton);
            ButtonContainer.Add(FiltersButton);
            this.Remove(SearchButton);
            ButtonContainer.Add(SearchButton);
            this.Remove(Top100ListsButton);
            ButtonContainer.Add(Top100ListsButton);
            this.Add(ButtonContainer);

            FiltersProperty         = new UIGizmoPropertyFilters(ui, this);
            FiltersProperty.Visible = false;
            this.Add(FiltersProperty);

            Search         = new UIGizmoSearch(ui, this);
            Search.Visible = false;
            this.Add(Search);

            Top100                    = new UIGizmoTop100(ui, this);
            Top100.Visible            = false;
            Top100.Background.Visible = false;
            this.Add(Top100);

            ExpandButton.OnButtonClick   += new ButtonClickDelegate(ExpandButton_OnButtonClick);
            ContractButton.OnButtonClick += new ButtonClickDelegate(ContractButton_OnButtonClick);

            PeopleTabButton.OnButtonClick += new ButtonClickDelegate(PeopleTabButton_OnButtonClick);
            HousesTabButton.OnButtonClick += new ButtonClickDelegate(HousesTabButton_OnButtonClick);

            FiltersButton.OnButtonClick     += new ButtonClickDelegate(FiltersButton_OnButtonClick);
            SearchButton.OnButtonClick      += new ButtonClickDelegate(SearchButton_OnButtonClick);
            Top100ListsButton.OnButtonClick += new ButtonClickDelegate(Top100ListsButton_OnButtonClick);

            if (PlayerAccount.CurrentlyActiveSim != null)
            {
                SimBox = new UISim(PlayerAccount.CurrentlyActiveSim.GUID.ToString());
            }
            else
            {
                SimBox = new UISim("");
            }

            MessageDialog                 = new UIAlertOptions();
            MessageDialog.Message         = "No avatar has been selected";
            MessageDialog.Title           = "Avatar selectioin";
            MessageDialog.Buttons[0].Type = UIAlertButtonType.OK;


            View = UIGizmoView.Top100;
            SetOpen(true);


            TabV = UIGizmoTab.People;
        }
Exemplo n.º 5
0
 void PeopleTabButton_OnButtonClick(UIElement button)
 {
     Tab = UIGizmoTab.People;
     Redraw();
 }
Exemplo n.º 6
0
 void HousesTabButton_OnButtonClick(UIElement button)
 {
     Tab = UIGizmoTab.Property;
     Redraw();
 }