Inheritance: AvatarBase
 /// <summary>
 /// Filemanager was initialized!
 /// </summary>
 private void FileManager_OnHundredPercentCompleted()
 {
     m_Avatar = new AdultAvatar(m_Graphics.GraphicsDevice);
     m_Avatar.ChangeOutfit(FileManager.GetOutfit((ulong)FileIDs.OutfitsFileIDs.fab001_sl__pjs4), SkinType.Medium);
     m_Avatar.Head = FileManager.GetAppearance((ulong)FileIDs.AppearancesFileIDs.fahm814_unleashedkim2);
     m_Avatar.Animation = FileManager.GetAnimation(0x5f00000007);
 }
        public CASScreen(ScreenManager Manager, SpriteBatch SBatch)
            : base(Manager, "CAS", SBatch, 
            new Vector2(0, 0), 
            new Vector2(GlobalSettings.Default.ScreenWidth, GlobalSettings.Default.ScreenHeight),
            GlobalSettings.Default.StartupPath + "\\" + "gamedata\\uiscripts\\personselectionedit.uis")
        {
            m_BackgroundImg = (UIImage)m_Walker.Elements["\"BackgroundImage\""];

            m_CancelBtn = (UIButton)m_Walker.Elements["\"CancelButton\""];
            m_AcceptBtn = (UIButton)m_Walker.Elements["\"AcceptButton\""];
            m_DescriptionScrollUpBtn = (UIButton)m_Walker.Elements["\"DescriptionScrollUpButton\""];
            m_DescriptionScrollDownBtn = (UIButton)m_Walker.Elements["\"DescriptionScrollDownButton\""];

            m_ExitBtn = (UIButton)m_Walker.Elements["\"ExitButton\""];
            m_ExitBtn.OnButtonClicked += M_ExitBtn_OnButtonClicked;

            m_FemaleBtn = (UIButton)m_Walker.Elements["\"FemaleButton\""];
            m_FemaleBtn.OnButtonClicked += M_FemaleBtn_OnButtonClicked;

            m_MaleBtn = (UIButton)m_Walker.Elements["\"MaleButton\""];
            m_MaleBtn.OnButtonClicked += M_MaleBtn_OnButtonClicked;

            m_SkinLightBtn = (UIButton)m_Walker.Elements["\"SkinLightButton\""];
            m_SkinLightBtn.OnButtonClicked += M_SkinLightBtn_OnButtonClicked;

            m_SkinMediumBtn = (UIButton)m_Walker.Elements["\"SkinMediumButton\""];
            m_SkinMediumBtn.OnButtonClicked += M_SkinMediumBtn_OnButtonClicked;

            m_SkinDarkBtn = (UIButton)m_Walker.Elements["\"SkinDarkButton\""];
            m_SkinDarkBtn.OnButtonClicked += M_SkinDarkBtn_OnButtonClicked;

            m_HeadSkinBrowser = new UIHeadBrowser(this, m_Walker.Controls["\"HeadSkinBrowser\""], 1, AvatarSex.Female);
            m_HeadSkinBrowser.OnButtonClicked += M_HeadSkinBrowser_OnButtonClicked;
            m_BodySkinBrowser = new UIBodyBrowser(this, m_Walker.Controls["\"BodySkinBrowser\""], 1, AvatarSex.Female);
            m_BodySkinBrowser.OnButtonClicked += M_BodySkinBrowser_OnButtonClicked;

            AdultAvatar Avatar = new AdultAvatar(Manager.Device);
            Avatar.ChangeOutfit(FileManager.GetOutfit((ulong)FileIDs.OutfitsFileIDs.fab001_sl__pjs4), Vitaboy.SkinType.Medium);
            Avatar.SetHead(FileManager.GetOutfit((ulong)FileIDs.OutfitsFileIDs.fah002_mom), (Vitaboy.SkinType)m_CurrentSkinType);
            Avatar.ShouldRotate = true;

            m_Avatar = new Sim(Manager.Device, Avatar);
            m_Avatar.Camera.Origin = new Vector2(175, 100);
            m_Avatar.Camera.Zoom = 0.7f;

            m_VitaboyScreen = new VitaboyScreen(Manager, new Vector2(0, 0),
                new Vector2(GlobalSettings.Default.ScreenWidth, GlobalSettings.Default.ScreenHeight));
            m_VitaboyScreen.AddSim(m_Avatar);

            m_ExitDialog = new ExitDialog(this, new Vector2(250, 250), m_Walker,
                GlobalSettings.Default.StartupPath + "\\" + "gamedata\\uiscripts\\exitdialog.uis");
            m_ExitDialog.Visible = false;

            Manager.AddScreen(m_VitaboyScreen);
        }
        public SASScreen(ScreenManager Manager, SpriteBatch SBatch)
            : base(Manager, "SAS", SBatch,
            new Vector2(0, 0), new Vector2(GlobalSettings.Default.ScreenWidth, GlobalSettings.Default.ScreenHeight),
            GlobalSettings.Default.StartupPath + "\\" + "gamedata\\uiscripts\\personselection.uis")
        {
            BackgroundImg = (UIImage)m_Walker.Elements["\"BackgroundImage\""];

            AdultAvatar Avatar = new AdultAvatar(Manager.Device);
            Avatar.ChangeOutfit(FileManager.GetOutfit((ulong)FileIDs.OutfitsFileIDs.fab001_sl__pjs4), Vitaboy.SkinType.Medium);
            Avatar.SetHead(FileManager.GetOutfit((ulong)FileIDs.OutfitsFileIDs.fah002_mom), Vitaboy.SkinType.Medium);
            AddAvatar(Avatar, 1);

            VitaboyScreen VScreen = new VitaboyScreen(Manager, new Vector2(0, 0),
                new Vector2(GlobalSettings.Default.ScreenWidth, GlobalSettings.Default.ScreenHeight));
            VScreen.AddSim(m_Avatars[0]);

            Manager.AddScreen(VScreen);

            TabBackgroundImg1 = m_Walker.Elements["\"TabBackgroundImage1\""].Image;
            TabBackgroundImg2 = m_Walker.Elements["\"TabBackgroundImage2\""].Image;
            TabBackgroundImg3 = m_Walker.Elements["\"TabBackgroundImage3\""].Image;

            DescriptionTabBackgroundImg1 = m_Walker.Elements["\"DescriptionTabBackgroundImage1\""].Image;
            DescriptionTabBackgroundImg1.Visible = m_Avatars.Count >= 1 ? true : false;
            DescriptionTabBackgroundImg2 = m_Walker.Elements["\"DescriptionTabBackgroundImage2\""].Image;
            DescriptionTabBackgroundImg2.Visible = m_Avatars.Count >= 2 ? true : false;
            DescriptionTabBackgroundImg3 = m_Walker.Elements["\"DescriptionTabBackgroundImage3\""].Image;
            DescriptionTabBackgroundImg3.Visible = m_Avatars.Count == 3 ? true : false;

            DescriptionTabImage1 = m_Walker.Elements["\"DescriptionTabImage1\""].Image;
            DescriptionTabImage1.Visible = m_Avatars.Count >= 1 ? true : false;
            DescriptionTabImage2 = m_Walker.Elements["\"DescriptionTabImage2\""].Image;
            DescriptionTabImage2.Visible = m_Avatars.Count >= 2 ? true : false;
            DescriptionTabImage3 = m_Walker.Elements["\"DescriptionTabImage3\""].Image;
            DescriptionTabImage3.Visible = m_Avatars.Count == 3 ? true : false;

            EnterTabImage1 = m_Walker.Elements["\"EnterTabImage1\""].Image;
            EnterTabImage1.Visible = false;
            EnterTabImage2 = m_Walker.Elements["\"EnterTabImage2\""].Image;
            EnterTabImage2.Visible = false;
            EnterTabImage3 = m_Walker.Elements["\"EnterTabImage3\""].Image;
            EnterTabImage3.Visible = false;

            EnterTabBackgroundImage1 = m_Walker.Elements["\"EnterTabBackgroundImage1\""].Image;
            EnterTabBackgroundImage1.Visible = false;
            EnterTabBackgroundImage2 = m_Walker.Elements["\"EnterTabBackgroundImage2\""].Image;
            EnterTabBackgroundImage2.Visible = false;
            EnterTabBackgroundImage3 = m_Walker.Elements["\"EnterTabBackgroundImage3\""].Image;
            EnterTabBackgroundImage3.Visible = false;

            //DefaultHouseImg = (UIImage)m_Elements["\"DefaultHouseImage\""].Image; //Not used??

            CreditsBackgroundImg = m_Walker.Controls["\"CreditsButtonBackgroundImage\""].Image;
            //CityThumbnailBusyImg = m_Controls["\"CityThumbnailBusyImage\""].Image; //Not used??

            CityButtonTemplateImage = (UIImage)m_Walker.Elements["\"CityButtonTemplateImage\""];

            m_ExitButton = (UIButton)m_Walker.Elements["\"ExitButton\""];

            m_EnterTabBtn1 = (UIButton)m_Walker.Elements["\"EnterTabButton1\""];
            m_EnterTabBtn1.OnButtonClicked += EnterTabBtn1_OnButtonClicked;
            m_EnterTabBtn1.Enabled = m_Avatars.Count >= 1 ? true : false;
            m_EnterTabBtn2 = (UIButton)m_Walker.Elements["\"EnterTabButton2\""];
            m_EnterTabBtn2.OnButtonClicked += EnterTabBtn2_OnButtonClicked;
            m_EnterTabBtn2.Enabled = m_Avatars.Count >= 2 ? true : false;
            m_EnterTabBtn3 = (UIButton)m_Walker.Elements["\"EnterTabButton3\""];
            m_EnterTabBtn3.OnButtonClicked += EnterTabBtn3_OnButtonClicked;
            m_EnterTabBtn3.Enabled = m_Avatars.Count == 3 ? true : false;

            m_DescriptionTabBtn1 = (UIButton)m_Walker.Elements["\"DescriptionTabButton1\""];
            m_DescriptionTabBtn1.OnButtonClicked += DescriptionTabBtn1_OnButtonClicked;
            m_DescriptionTabBtn1.Enabled = m_Avatars.Count >= 1 ? true : false;
            m_DescriptionTabBtn2 = (UIButton)m_Walker.Elements["\"DescriptionTabButton2\""];
            m_DescriptionTabBtn2.OnButtonClicked += DescriptionTabBtn2_OnButtonClicked;
            m_DescriptionTabBtn2.Enabled = m_Avatars.Count >= 2 ? true : false;
            m_DescriptionTabBtn3 = (UIButton)m_Walker.Elements["\"DescriptionTabButton3\""];
            m_DescriptionTabBtn3.OnButtonClicked += DescriptionTabBtn3_OnButtonClicked;
            m_DescriptionTabBtn3.Enabled = m_Avatars.Count == 3 ? true : false;

            m_AvatarButton1 = (UIButton)m_Walker.Elements["\"AvatarButton1\""];
            m_AvatarButton2 = (UIButton)m_Walker.Elements["\"AvatarButton2\""];
            m_AvatarButton3 = (UIButton)m_Walker.Elements["\"AvatarButton3\""];

            m_CityButton1 = (UIButton)m_Walker.Elements["\"CityButton1\""];
            m_CityButton1.AddImage(GetImage("\"CityButtonTemplateImage\"", true));
            m_CityButton1.Visible = false;
            m_CityButton2 = (UIButton)m_Walker.Elements["\"CityButton2\""];
            m_CityButton2.AddImage(GetImage("\"CityButtonTemplateImage\"", true));
            m_CityButton2.Visible = false;
            m_CityButton3 = (UIButton)m_Walker.Elements["\"CityButton3\""];
            m_CityButton3.AddImage(GetImage("\"CityButtonTemplateImage\"", true));
            m_CityButton3.Visible = false;

            m_HouseButton1 = (UIButton)m_Walker.Elements["\"HouseButton1\""];
            m_HouseButton1.AddImage(GetImage("\"HouseButtonTemplateImage\"", true));
            m_HouseButton1.Visible = false;
            m_HouseButton2 = (UIButton)m_Walker.Elements["\"HouseButton2\""];
            m_HouseButton2.AddImage(GetImage("\"HouseButtonTemplateImage\"", true));
            m_HouseButton2.Visible = false;
            m_HouseButton3 = (UIButton)m_Walker.Elements["\"HouseButton3\""];
            m_HouseButton3.AddImage(GetImage("\"HouseButtonTemplateImage\"", true));
            m_HouseButton3.Visible = false;

            m_NewAvatarButton1 = (UIButton)m_Walker.Elements["\"NewAvatarButton1\""];
            m_NewAvatarButton1.Visible = m_Avatars.Count >= 1 ? false : true;
            m_NewAvatarButton2 = (UIButton)m_Walker.Elements["\"NewAvatarButton2\""];
            m_NewAvatarButton2.Visible = m_Avatars.Count >= 2 ? false : true;
            m_NewAvatarButton3 = (UIButton)m_Walker.Elements["\"NewAvatarButton3\""];
            m_NewAvatarButton3.Visible = m_Avatars.Count == 3 ? false : true;

            m_DeleteAvatarButton1 = (UIButton)m_Walker.Elements["\"DeleteAvatarButton1\""];
            m_DeleteAvatarButton1.Visible = m_Avatars.Count >= 1 ? true : false;
            m_DeleteAvatarButton2 = (UIButton)m_Walker.Elements["\"DeleteAvatarButton2\""];
            m_DeleteAvatarButton2.Visible = m_Avatars.Count >= 2 ? true : false;
            m_DeleteAvatarButton3 = (UIButton)m_Walker.Elements["\"DeleteAvatarButton3\""];
            m_DeleteAvatarButton3.Visible = m_Avatars.Count == 3 ? true : false;

            m_PersonDescriptionText1 = (UITextEdit)m_Walker.Elements["\"PersonDescriptionText1\""];
            m_PersonDescriptionText1.Visible = m_Avatars.Count >= 1 ? true : false;
            m_PersonDescriptionText2 = (UITextEdit)m_Walker.Elements["\"PersonDescriptionText2\""];
            m_PersonDescriptionText2.Visible = m_Avatars.Count >= 2 ? true : false;
            m_PersonDescriptionText3 = (UITextEdit)m_Walker.Elements["\"PersonDescriptionText3\""];
            m_PersonDescriptionText3.Visible = m_Avatars.Count == 3 ? true : false;

            m_PersonDescriptionScrollUpBtn1 = (UIButton)m_Walker.Elements["\"PersonDescriptionScrollUpButton1\""];
            m_PersonDescriptionScrollUpBtn1.Visible = m_PersonDescriptionText1.Visible ? true : false;
            m_PersonDescriptionScrollUpBtn2 = (UIButton)m_Walker.Elements["\"PersonDescriptionScrollUpButton2\""];
            m_PersonDescriptionScrollUpBtn2.Visible = m_PersonDescriptionText2.Visible ? true : false;
            m_PersonDescriptionScrollUpBtn3 = (UIButton)m_Walker.Elements["\"PersonDescriptionScrollUpButton3\""];
            m_PersonDescriptionScrollUpBtn3.Visible = m_PersonDescriptionText3.Visible ? true : false;

            m_PersonDescriptionScrollDownBtn1 = (UIButton)m_Walker.Elements["\"PersonDescriptionScrollDownButton1\""];
            m_PersonDescriptionScrollDownBtn1.Visible = m_PersonDescriptionText1.Visible ? true : false;
            m_PersonDescriptionScrollDownBtn2 = (UIButton)m_Walker.Elements["\"PersonDescriptionScrollDownButton2\""];
            m_PersonDescriptionScrollDownBtn2.Visible = m_PersonDescriptionText2.Visible ? true : false;
            m_PersonDescriptionScrollDownBtn3 = (UIButton)m_Walker.Elements["\"PersonDescriptionScrollDownButton3\""];
            m_PersonDescriptionScrollDownBtn3.Visible = m_PersonDescriptionText3.Visible ? true : false;

            m_CityNameText1 = (UILabel)m_Walker.Elements["\"CityNameText1\""];
            m_CityNameText1.Visible = false;
            m_CityNameText2 = (UILabel)m_Walker.Elements["\"CityNameText2\""];
            m_CityNameText2.Visible = false;
            m_CityNameText3 = (UILabel)m_Walker.Elements["\"CityNameText3\""];
            m_CityNameText3.Visible = false;

            //TODO: Assign captions to these if a sim has a house...
            m_HouseNameText1 = (UILabel)m_Walker.Elements["\"HouseNameText1\""];
            m_HouseNameText2 = (UILabel)m_Walker.Elements["\"HouseNameText2\""];
            m_HouseNameText3 = (UILabel)m_Walker.Elements["\"HouseNameText3\""];

            m_CreditsButton = (UIButton)m_Walker.Elements["\"CreditsButton\""];
        }
        /// <summary>
        /// Adds an avatar to this instance of SASScreen.
        /// </summary>
        /// <param name="Avatar">An instance of AdultAvatar. 
        /// Assumed to already have a head and outfit.</param>
        /// <param name="ID">ID from 1 - 3, indicates which "box" this avatar will be rendered in.</param>
        public void AddAvatar(AdultAvatar Avatar, int ID)
        {
            switch(ID)
            {
                case 1:
                    if (m_Avatars.Count != 0)
                        m_Avatars[0] = new Sim(Manager.Device, Avatar);
                    else
                        m_Avatars.Add(new Sim(Manager.Device, Avatar));

                    m_Avatars[0].ShouldRotate = true;
                    m_Avatars[0].Camera.Origin = new Vector2(175, 100);
                    m_Avatars[0].Camera.Zoom = 0.7f;
                    break;
            }
        }