Ejemplo n.º 1
0
        public UIBodyBrowser(UIScreen Screen, UIControl Ctrl, int SkinType, AvatarSex Sex) :
            base(Screen, Ctrl, SkinType, Sex)
        {
            m_EditBodySkinBtnTex = FileManager.GetTexture((ulong)FileIDs.UIFileIDs.person_edit_bodyskinbtn);

            m_Collections.Add(FileManager.GetCollection((ulong)FileIDs.CollectionsFileIDs.ea_male));
            m_FemaleCollections.Add(FileManager.GetCollection((ulong)FileIDs.CollectionsFileIDs.ea_female));
            m_Collections.Add(FileManager.GetCollection((ulong)FileIDs.CollectionsFileIDs.eainternal_unisex));

            OutfitContainer OftContainer;

            m_Map = new int[, ]
            {
                { 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0 },
            };

            //Get all the thumbnails.
            foreach (Collection Col in m_Collections)
            {
                foreach (UniqueFileID PO in Col.PurchasableOutfitIDs)
                {
                    OftContainer = new OutfitContainer(FileManager.GetOutfit(
                                                           FileManager.GetPurchasableOutfit(PO.UniqueID).OutfitID.UniqueID));

                    //Load all appearances where available, if the player wishes to switch skin type (see CASScreen.cs)
                    if (OftContainer.LightAppearance != null)
                    {
                        m_LightAppearances.Add(OftContainer);
                    }
                    if (OftContainer.MediumAppearance != null)
                    {
                        m_MediumAppearances.Add(OftContainer);
                    }
                    if (OftContainer.DarkAppearance != null)
                    {
                        m_DarkAppearances.Add(OftContainer);
                    }
                }
            }

            //Get all the thumbnails.
            foreach (Collection Col in m_FemaleCollections)
            {
                foreach (UniqueFileID PO in Col.PurchasableOutfitIDs)
                {
                    m_NumberOfBodies++;

                    OftContainer = new OutfitContainer(FileManager.GetOutfit(
                                                           FileManager.GetPurchasableOutfit(PO.UniqueID).OutfitID.UniqueID));

                    //Load all appearances where available, if the player wishes to switch skin type (see CASScreen.cs)
                    if (OftContainer.LightAppearance != null)
                    {
                        m_LightFemaleAppearances.Add(OftContainer);
                    }
                    if (OftContainer.MediumAppearance != null)
                    {
                        m_MediumFemaleAppearances.Add(OftContainer);
                    }
                    if (OftContainer.DarkAppearance != null)
                    {
                        m_DarkFemaleAppearances.Add(OftContainer);
                    }
                }
            }

            foreach (OutfitContainer Ctr in m_LightAppearances)
            {
                SkinBtnContainer Container = new SkinBtnContainer();
                Container.BtnTex         = m_EditBodySkinBtnTex;
                Container.SourcePosition =
                    //Initialize to second frame in image.
                    new Vector2((m_EditBodySkinBtnTex.Width / (4)) * 2, 0.0f);
                m_SkinBtns.Add(Container);
            }

            foreach (OutfitContainer Ctr in m_MediumAppearances)
            {
                SkinBtnContainer Container = new SkinBtnContainer();
                Container.BtnTex         = m_EditBodySkinBtnTex;
                Container.SourcePosition =
                    //Initialize to second frame in image.
                    new Vector2((m_EditBodySkinBtnTex.Width / (4)) * 2, 0.0f);
                m_SkinBtns.Add(Container);
            }

            foreach (OutfitContainer Ctr in m_DarkAppearances)
            {
                SkinBtnContainer Container = new SkinBtnContainer();
                Container.BtnTex         = m_EditBodySkinBtnTex;
                Container.SourcePosition =
                    //Initialize to second frame in image.
                    new Vector2((m_EditBodySkinBtnTex.Width / (4)) * 2, 0.0f);
                m_SkinBtns.Add(Container);
            }
        }
Ejemplo n.º 2
0
        public UIHeadBrowser(UIScreen Screen, UIControl Ctrl, int SkinType, AvatarSex Sex)
            : base(Screen, Ctrl, SkinType, Sex)
        {
            m_EditHeadSkinBtnTex = FileManager.GetTexture((ulong)FileIDs.UIFileIDs.person_edit_headskinbtn);

            m_Collections.Add(FileManager.GetCollection((ulong)FileIDs.CollectionsFileIDs.ea_male_heads));
            m_FemaleCollections.Add(FileManager.GetCollection((ulong)FileIDs.CollectionsFileIDs.ea_female_heads));
            m_Collections.Add(FileManager.GetCollection((ulong)FileIDs.CollectionsFileIDs.eainternalheads_unisex));

            OutfitContainer OftContainer;

            //Get all the thumbnails.
            foreach (Collection Col in m_Collections)
            {
                foreach (UniqueFileID PO in Col.PurchasableOutfitIDs)
                {
                    OftContainer = new OutfitContainer(FileManager.GetOutfit(
                        FileManager.GetPurchasableOutfit(PO.UniqueID).OutfitID.UniqueID));

                    //Load all appearances where available, if the player wishes to switch skin type (see CASScreen.cs)
                    if (OftContainer.LightAppearance != null) m_LightAppearances.Add(OftContainer);
                    if (OftContainer.MediumAppearance != null) m_MediumAppearances.Add(OftContainer);
                    if (OftContainer.DarkAppearance != null) m_DarkAppearances.Add(OftContainer);
                }
            }

            //Get all the thumbnails.
            foreach (Collection Col in m_FemaleCollections)
            {
                foreach (UniqueFileID PO in Col.PurchasableOutfitIDs)
                {
                    OftContainer = new OutfitContainer(FileManager.GetOutfit(
                        FileManager.GetPurchasableOutfit(PO.UniqueID).OutfitID.UniqueID));

                    //Load all appearances where available, if the player wishes to switch skin type (see CASScreen.cs)
                    if (OftContainer.LightAppearance != null) m_LightFemaleAppearances.Add(OftContainer);
                    if (OftContainer.MediumAppearance != null) m_MediumFemaleAppearances.Add(OftContainer);
                    if (OftContainer.DarkAppearance != null) m_DarkFemaleAppearances.Add(OftContainer);
                }
            }

            foreach (OutfitContainer Ctr in m_LightAppearances)
            {
                SkinBtnContainer Container = new SkinBtnContainer();
                Container.BtnTex = m_EditHeadSkinBtnTex;
                Container.SourcePosition =
                    //Initialize to second frame in image.
                    new Vector2((m_EditHeadSkinBtnTex.Width / (4)) * 2, 0.0f);
                m_SkinBtns.Add(Container);
            }

            foreach (OutfitContainer Ctr in m_MediumAppearances)
            {
                SkinBtnContainer Container = new SkinBtnContainer();
                Container.BtnTex = m_EditHeadSkinBtnTex;
                Container.SourcePosition =
                    //Initialize to second frame in image.
                    new Vector2((m_EditHeadSkinBtnTex.Width / (4)) * 2, 0.0f);
                m_SkinBtns.Add(Container);
            }

            foreach (OutfitContainer Ctr in m_DarkAppearances)
            {
                SkinBtnContainer Container = new SkinBtnContainer();
                Container.BtnTex = m_EditHeadSkinBtnTex;
                Container.SourcePosition =
                    //Initialize to second frame in image.
                    new Vector2((m_EditHeadSkinBtnTex.Width / (4)) * 2, 0.0f);
                m_SkinBtns.Add(Container);
            }
        }