Inheritance: FSO.Client.UI.Framework.UIContainer
Esempio n. 1
0
        public UIGizmo()
        {
            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("");
            }
            //var sim = new Sim(Guid.NewGuid().ToString());
            //var maleHeads = new Collection(ContentManager.GetResourceFromLongID((ulong)FileIDs.CollectionsFileIDs.ea_male_heads));
            //SimCatalog.LoadSim3D(sim, maleHeads.First().PurchasableObject.Outfit, AppearanceType.Light);
            //

            //sim.HeadOutfitID = 4853313044493;
            //sim.AppearanceType = AppearanceType.Light;
            //sim.BodyOutfitID = 5394478923789;

            //SimCatalog.LoadSim3D(sim);
            //SimCatalog.LoadSim3D(sim, SimCatalog.GetOutfit(4462471020557), AppearanceType.Light);

            //SimBox.Sim = sim;
            //SimBox.SimScale = 0.4f;
            //SimBox.Position = new Microsoft.Xna.Framework.Vector2(60, 60);

            //this.Add(SimBox);

            View = UIGizmoView.Top100;
            SetOpen(true);
        }
Esempio n. 2
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;
        }
Esempio n. 3
0
        public UIGizmo()
        {
            var ui = RenderScript("gizmo.uis");

            AddAt(0, PeopleTab = ui.Create <UIImage>("PeopleTab"));
            AddAt(0, HousesTab = ui.Create <UIImage>("HousesTab"));

            AddAt(0, PeopleTabBackground = ui.Create <UIImage>("PeopleTabBackground"));
            AddAt(0, HousesTabBackground = ui.Create <UIImage>("HousesTabBackground"));

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

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

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

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

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



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

            Search = new UIGizmoSearch(ui, this);
            ControllerUtils.BindController <GizmoSearchController>(Search);
            Search.Visible = false;
            Add(Search);

            Top100 = new UIGizmoTop100(ui, this);
            ControllerUtils.BindController <GizmoTop100Controller>(Top100);
            Top100.Visible            = false;
            Top100.Background.Visible = false;
            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);

            PIP = ui.Create <UIGizmoPIP>("PipSetup");
            PIP.Initialize();
            Add(PIP);

            CurrentAvatar = new Binding <Avatar>()
                            .WithBinding(PIP, "SimBox.Avatar.BodyOutfitId", "Avatar_Appearance.AvatarAppearance_BodyOutfitID")
                            .WithBinding(PIP, "SimBox.Avatar.HeadOutfitId", "Avatar_Appearance.AvatarAppearance_HeadOutfitID")
                            .WithBinding(PIP, "SimBox.Avatar.Appearance", "Avatar_Appearance.AvatarAppearance_SkinTone", (x) => (Vitaboy.AppearanceType)(byte) x)
                            .WithBinding(this, "SimAge", "Avatar_Age")
                            .WithBinding(this, "FilterList", "Avatar_Top100ListFilter.Top100ListFilter_ResultsVec");

            Tab  = UIGizmoTab.Property;
            View = UIGizmoView.Filters;
            SetOpen(true);
        }
Esempio n. 4
0
        public UIGizmo()
        {
            var ui = this.RenderScript("gizmo.uis");

            AddAt(0, (PeopleTab = ui.Create <UIImage>("PeopleTab")));
            AddAt(0, (HousesTab = ui.Create <UIImage>("HousesTab")));
            AddAt(0, (NHoodTab = ui.Create <UIImage>("HousesTab")));

            AddAt(0, (PeopleTabBackground = ui.Create <UIImage>("PeopleTabBackground")));
            AddAt(0, (HousesTabBackground = ui.Create <UIImage>("HousesTabBackground")));

            //additional tab: nhood tab

            AddAt(0, (NHoodTabBackground = ui.Create <UIImage>("HousesTabBackground")));
            Add((NHoodTabButton = ui.Create <UIButton>("HousesTabButton")));

            NHoodTabButton.Texture = Content.Content.Get().CustomUI.Get("neighp_infobtn.png").Get(GameFacade.GraphicsDevice);
            NHoodTab.X            += 42;
            NHoodTabBackground.X  += 42;
            NHoodTabButton.X      += 42;
            NHoodTabButton.Tooltip = "Neighborhoods";

            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);
            ControllerUtils.BindController <GizmoSearchController>(Search);
            Search.Visible = false;
            this.Add(Search);

            Top100 = new UIGizmoTop100(ui, this);
            ControllerUtils.BindController <GizmoTop100Controller>(Top100);
            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);
            NHoodTabButton.OnButtonClick  += NHoodTabButton_OnButtonClick;

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

            PIP = ui.Create <UIGizmoPIP>("PipSetup");
            PIP.Initialize();
            Add(PIP);

            CurrentAvatar = new Binding <Avatar>()
                            .WithBinding(PIP, "SimBox.Avatar.BodyOutfitId", "Avatar_Appearance.AvatarAppearance_BodyOutfitID")
                            .WithBinding(PIP, "SimBox.Avatar.HeadOutfitId", "Avatar_Appearance.AvatarAppearance_HeadOutfitID")
                            .WithBinding(PIP, "SimBox.Avatar.Appearance", "Avatar_Appearance.AvatarAppearance_SkinTone", (x) => (Vitaboy.AppearanceType)((byte)x))
                            .WithBinding(this, "SimAge", "Avatar_Age")
                            .WithBinding(this, "FilterList", "Avatar_Top100ListFilter.Top100ListFilter_ResultsVec");

            Tab  = UIGizmoTab.Property;
            View = UIGizmoView.Filters;
            SetOpen(true);
        }
Esempio n. 5
0
        public UIGizmo()
        {
            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("");
            //var sim = new Sim(Guid.NewGuid().ToString());
            //var maleHeads = new Collection(ContentManager.GetResourceFromLongID((ulong)FileIDs.CollectionsFileIDs.ea_male_heads));
            //SimCatalog.LoadSim3D(sim, maleHeads.First().PurchasableObject.Outfit, AppearanceType.Light);
            //

            //sim.HeadOutfitID = 4853313044493;
            //sim.AppearanceType = AppearanceType.Light;
            //sim.BodyOutfitID = 5394478923789;

            //SimCatalog.LoadSim3D(sim);
            //SimCatalog.LoadSim3D(sim, SimCatalog.GetOutfit(4462471020557), AppearanceType.Light);

            //SimBox.Sim = sim;
            //SimBox.SimScale = 0.4f;
            //SimBox.Position = new Microsoft.Xna.Framework.Vector2(60, 60);

            //this.Add(SimBox);

            View = UIGizmoView.Top100;
            SetOpen(true);
        }