Пример #1
0
        /// <summary>
        /// Setup UI events
        /// </summary>
        public void Init()
        {
            /** Textures **/
            AvatarButton.Texture = Screen.SimCreateButtonImage;
            CityButton.Texture   = Screen.CityButtonTemplateImage;
            HouseButton.Texture  = Screen.HouseButtonTemplateImage;

            /** Send tab stuff to the bottom **/
            Screen.SendToBack(TabBackground, TabEnterBackground, TabDescBackground);

            /** Events **/
            EnterTabButton.OnButtonClick += new ButtonClickDelegate(EnterTabButton_OnButtonClick);
            DescTabButton.OnButtonClick  += new ButtonClickDelegate(DescTabButton_OnButtonClick);

            NewAvatarButton.OnButtonClick += new ButtonClickDelegate(NewAvatarButton_OnButtonClick);

            PersonDescriptionSlider.AttachButtons(PersonDescriptionScrollUpButton, PersonDescriptionScrollDownButton, 1);
            PersonDescriptionText.AttachSlider(PersonDescriptionSlider);


            CityThumb = new UIImage {
                X = CityButton.X + 6,
                Y = CityButton.Y + 6
            };
            CityThumb.SetSize(78, 58);
            Screen.Add(CityThumb);



            SetTab(PersonSlotTab.EnterTab);
        }
Пример #2
0
        /// <summary>
        /// Setup UI events
        /// </summary>
        public void Init()
        {
            /** Textures **/
            AvatarButton.Texture = Screen.SimCreateButtonImage;
            CityButton.Texture   = Screen.CityButtonTemplateImage;
            HouseButton.Texture  = Screen.HouseButtonTemplateImage;

            /** Send tab stuff to the bottom **/
            Screen.SendToBack(TabBackground, TabEnterBackground, TabDescBackground);

            /** Events **/
            EnterTabButton.OnButtonClick += new ButtonClickDelegate(EnterTabButton_OnButtonClick);
            DescTabButton.OnButtonClick  += new ButtonClickDelegate(DescTabButton_OnButtonClick);

            NewAvatarButton.OnButtonClick    += new ButtonClickDelegate(OnSelect);
            DeleteAvatarButton.OnButtonClick += new ButtonClickDelegate(DeleteAvatarButton_OnButtonClick);

            PersonDescriptionSlider.AttachButtons(PersonDescriptionScrollUpButton, PersonDescriptionScrollDownButton, 1);
            PersonDescriptionText.AttachSlider(PersonDescriptionSlider);

            CityThumb = new UIImage
            {
                X = CityButton.X + 6,
                Y = CityButton.Y + 6
            };
            CityThumb.SetSize(78, 58);
            Screen.Add(CityThumb);


            HouseThumb = new UIImage
            {
                X = HouseButton.X + 6,
                Y = HouseButton.Y + 6
            };
            HouseThumb.SetSize(78, 58);
            Screen.Add(HouseThumb);

            Sim = new UISim
            {
                Visible  = false,
                Position = AvatarButton.Position + new Vector2(1, 10),
                Size     = new Vector2(140, 200)
            };

            Screen.Add(Sim);
            SetTab(PersonSlotTab.EnterTab);

            AvatarButton.OnButtonClick += new ButtonClickDelegate(OnSelect);
            CityButton.OnButtonClick   += new ButtonClickDelegate(OnSelect);
            HouseButton.OnButtonClick  += new ButtonClickDelegate(OnSelect);
        }