public void SetTab(PersonSlotTab tab) { var isEnter = tab == PersonSlotTab.EnterTab; TabEnterBackground.Visible = isEnter; TabDescBackground.Visible = !isEnter; EnterTabButton.Selected = isEnter; DescTabButton.Selected = !isEnter; CityNameText.Visible = isEnter; CityButton.Visible = isEnter; EnterTabBackgroundImage.Visible = isEnter; CityThumb.Visible = isEnter; HouseThumb.Visible = isEnter; PersonDescriptionScrollUpButton.Visible = !isEnter; PersonDescriptionScrollDownButton.Visible = !isEnter; PersonDescriptionSlider.Visible = !isEnter; DeleteAvatarButton.Visible = !isEnter; PersonDescriptionText.Visible = !isEnter; DescriptionTabBackgroundImage.Visible = !isEnter; var hasLot = Avatar != null && Avatar.LotId.HasValue; HouseNameText.Visible = isEnter && hasLot; HouseButton.Visible = isEnter && hasLot; }
public void SetTab(PersonSlotTab tab) { var isEnter = tab == PersonSlotTab.EnterTab; TabEnterBackground.Visible = isEnter; TabDescBackground.Visible = !isEnter; //TabBackground.Visible = isEnter; EnterTabButton.Selected = isEnter; DescTabButton.Selected = !isEnter; CityNameText.Visible = isEnter; CityButton.Visible = isEnter; EnterTabBackgroundImage.Visible = isEnter; CityThumb.Visible = isEnter; //HouseButton.Visible = isEnter; PersonDescriptionScrollUpButton.Visible = !isEnter; PersonDescriptionScrollDownButton.Visible = !isEnter; PersonDescriptionSlider.Visible = !isEnter; DeleteAvatarButton.Visible = !isEnter; PersonDescriptionText.Visible = !isEnter; DescriptionTabBackgroundImage.Visible = !isEnter; }