Beispiel #1
0
 protected override void OnScreenLoaded()
 {
     base.OnScreenLoaded();
     base.GetElement <UXElement>("InputFieldRequestMessage").Visible    = !this.isWarRequest;
     base.GetElement <UXElement>("InputFieldRequestMessageWar").Visible = this.isWarRequest;
     this.requestNowCostLabel    = base.GetElement <UXLabel>("FinishCostLabel");
     this.requestLabel.Text      = this.lang.Get("REQUEST_TROOPS", new object[0]);
     this.requestPerksLabel.Text = this.requestLabel.Text;
     this.requestLabel.Visible   = true;
     this.troopsPanel.Visible    = true;
     this.troopsLabel.Visible    = true;
     this.troopsLabel.Text       = this.lang.Get("SQUAD_DONATED_TO_USER", new object[0]);
     if (this.isWarRequest)
     {
         this.input = base.GetElement <UXInput>("LabelInputNameSquadWar");
         UIInput uIInputComponent = this.input.GetUIInputComponent();
         UIInput arg_108_0        = uIInputComponent;
         if (SquadTroopRequestScreen.< > f__mg$cache0 == null)
         {
             SquadTroopRequestScreen.< > f__mg$cache0 = new UIInput.OnValidate(LangUtils.OnValidateWNewLines);
         }
         arg_108_0.onValidate = SquadTroopRequestScreen.< > f__mg$cache0;
         UXTexture element = base.GetElement <UXTexture>("TextureWarRequest");
         element.LoadTexture("squadwars_playerdetails_bg");
         Service.EventManager.RegisterObserver(this, EventId.CurrentPlayerMemberDataUpdated);
     }
     this.input.InitText(this.defaultRequestText);
     this.InitTroopGrid();
     this.UpdateRequestState();
 }
        protected override void OnScreenLoaded()
        {
            this.InitButtons();
            this.labelTitle        = base.GetElement <UXLabel>("LabelTitle");
            this.btnInfo           = base.GetElement <UXButton>("BtnInfo");
            this.labelSquadQueue   = base.GetElement <UXLabel>("LabelSquadQueue");
            this.buttonCancel      = base.GetElement <UXButton>("ButtonCancel");
            this.labelButtonCancel = base.GetElement <UXLabel>("LabelButtonCancel");
            this.buttonBack        = base.GetElement <UXButton>("ButtonBack");
            this.labelButtonBack   = base.GetElement <UXLabel>("LabelButtonBack");
            this.buttonConfirm     = base.GetElement <UXButton>("ButtonConfirm");
            this.labelButtonOk     = base.GetElement <UXLabel>("LabelButtonOk");
            this.queueTexture      = base.GetElement <UXTexture>("QueueTexture");
            IDataController dataController = Service.Get <IDataController>();
            TextureVO       textureVO      = dataController.Get <TextureVO>("gui_textures_cancel_matchmaking");

            this.queueTexture.LoadTexture(textureVO.AssetName);
            this.labelTitle.Text         = this.lang.Get("WAR_MATCHMAKE_TITLE", new object[0]);
            this.btnInfo.OnClicked       = new UXButtonClickedDelegate(Service.Get <SquadController>().WarManager.ShowInfoScreen);
            this.buttonCancel.OnClicked  = new UXButtonClickedDelegate(this.OnCancelButtonClicked);
            this.labelButtonCancel.Text  = this.lang.Get("WAR_CANCEL_MATCHMAKE", new object[0]);
            this.buttonBack.OnClicked    = new UXButtonClickedDelegate(this.OnBackClicked);
            this.labelButtonBack.Text    = this.lang.Get("WAR_CANCEL_MATCHMAKE_BACK", new object[0]);
            this.buttonConfirm.OnClicked = new UXButtonClickedDelegate(this.OnConfirmClicked);
            this.labelButtonOk.Text      = this.lang.Get("WAR_OK", new object[0]);
            this.finalConfirm            = false;
            this.Refresh();
        }
Beispiel #3
0
        public void OnScreenLoaded()
        {
            this.chapterActionButtonLabel = this.screen.GetElement <UXLabel>("LabelBtnChapterAction");
            this.pveMeshTexture           = this.screen.GetElement <UXMeshRenderer>("MeshPVEImage");
            this.chapterJewel             = this.screen.GetElement <UXElement>("ContainerJewelChapter");
            this.chapterButtonBackground  = this.screen.GetElement <UXSprite>("SpriteBkgBtnChapterAction");
            this.chapterStarsSprite       = this.screen.GetElement <UXSprite>("SpriteChapterSelectionStar");
            this.chapterLabel             = this.screen.GetElement <UXLabel>("LabelChapterNumber");
            this.nameLabel                         = this.screen.GetElement <UXLabel>("LabelChapterTitle");
            this.nameLabel.Visible                 = false;
            this.nameLabelOperationsLocked         = this.screen.GetElement <UXLabel>("LabelOperationsLocked");
            this.nameLabelOperationsLocked.Visible = false;
            this.progressLabel                     = this.screen.GetElement <UXLabel>("LabelChapterSelectionProgress");
            this.starsLabel                        = this.screen.GetElement <UXLabel>("LabelChapterSelectionStars");
            this.progressSlider                    = this.screen.GetElement <UXSlider>("ChapterSelectionPbar");
            this.pveContinueButton                 = this.screen.GetElement <UXButton>("BtnChapterAction");
            this.pveContinueButton.Enabled         = true;
            CampaignVO highestUnlockedCampaign = GameUtils.GetHighestUnlockedCampaign();

            this.alternateBackground = this.screen.GetElement <UXTexture>("TextureChapterBg");
            this.alternateBackground.LoadTexture("chap_btn_" + highestUnlockedCampaign.Uid);
            this.alternateButton           = this.screen.GetElement <UXButton>("BtnChapterActionTop");
            this.alternateButton.Enabled   = true;
            this.alternateButton.OnClicked = new UXButtonClickedDelegate(this.OnPveButtonClicked);
            this.screen.GetElement <UXLabel>("LabelBtnChapterActionTop").Text = Service.Get <Lang>().Get("LABEL_CAMPAIGNS", new object[0]);
            this.alternateGroup = this.screen.GetElement <UXElement>("ChapterButtonTop");
            UXElement element = this.screen.GetElement <UXElement>("ContainerJewelChapterTop");

            element.Visible = false;
            this.RefreshScreenForPlanetChange();
        }
Beispiel #4
0
 protected override void OnScreenLoaded()
 {
     this.InitButtons();
     base.GetElement <UXElement>("FactionChoice").Visible = this.useFaction;
     base.GetElement <UXElement>("Generic").Visible       = !this.useFaction;
     this.image               = base.GetElement <UXTexture>(this.useFaction ? "TextureCharacterFaction" : "TextureCharacter");
     this.title               = base.GetElement <UXLabel>(this.useFaction ? "LabelTitleFaction" : "LabelTitle");
     this.desc                = base.GetElement <UXLabel>(this.useFaction ? "TextFaction" : "TextGeneric");
     this.buttonYes           = base.GetElement <UXButton>(this.useFaction ? "BtnPrimary_2optionFaction" : "BtnPrimary_2option");
     this.buttonNo            = base.GetElement <UXButton>(this.useFaction ? "BtnSecondaryFaction" : "BtnSecondary");
     this.buttonYesLabel      = base.GetElement <UXLabel>(this.useFaction ? "LabelBtnPrimary_2optionFaction" : "LabelBtnPrimary_2option");
     this.buttonNoLabel       = base.GetElement <UXLabel>(this.useFaction ? "LabelBtnSecondaryFaction" : "LabelBtnSecondary");
     this.buttonYes.OnClicked = new UXButtonClickedDelegate(this.OnButton);
     this.buttonNo.OnClicked  = new UXButtonClickedDelegate(this.OnButton);
     base.GetElement <UXButton>("BtnCloseFaction").OnClicked = new UXButtonClickedDelegate(this.OnButton);
     if (this.showIncent)
     {
         base.GetElement <UXLabel>("LabelCrystalIncentive").Text = this.lang.Get("crystal_incentive_1", new object[]
         {
             GameConstants.PUSH_NOTIFICATION_CRYSTAL_REWARD_AMOUNT
         });
         base.GetElement <UXLabel>("LabelCrystalIncentive2").Text = this.lang.Get("crystal_incentive_2", new object[0]);
     }
     else
     {
         base.GetElement <UXElement>("CrystalIncentive").Visible = false;
     }
     if (!this.useFaction)
     {
         this.image.LoadTexture("CharacterPopUp_Sapz");
         this.title.Text          = this.lang.Get("notif_auth_alert_title", new object[0]);
         this.desc.Text           = this.lang.Get(this.descriptionText, new object[0]);
         this.buttonYesLabel.Text = this.lang.Get("notif_auth_alert_yes", new object[0]);
         this.buttonNoLabel.Text  = this.lang.Get("notif_auth_alert_no", new object[0]);
         return;
     }
     if (this.faction == FactionType.Empire)
     {
         this.image.LoadTexture("CharacterPopUp_Vader");
         this.title.Text = this.lang.Get("FACTION_CONFIRMATION_TITLE", new object[0]);
         this.desc.Text  = this.lang.Get("FACTION_CONFIRMATION_DESCRIPTION", new object[]
         {
             this.lang.Get("FACTION_CONFIRMATION_EMPIRE", new object[0])
         });
         this.buttonYesLabel.Text = this.lang.Get("FACTION_CONFIRMATION_JOIN_EMPIRE", new object[0]);
         this.buttonNoLabel.Text  = this.lang.Get("ACCOUNT_CONFLICT_CONFIRM_CANCEL", new object[0]);
         return;
     }
     if (this.faction == FactionType.Rebel)
     {
         this.image.LoadTexture("CharacterPopUp_Leia");
         this.title.Text = this.lang.Get("FACTION_CONFIRMATION_TITLE", new object[0]);
         this.desc.Text  = this.lang.Get("FACTION_CONFIRMATION_DESCRIPTION", new object[]
         {
             this.lang.Get("FACTION_CONFIRMATION_REBEL", new object[0])
         });
         this.buttonYesLabel.Text = this.lang.Get("FACTION_CONFIRMATION_JOIN_REBEL", new object[0]);
         this.buttonNoLabel.Text  = this.lang.Get("ACCOUNT_CONFLICT_CONFIRM_CANCEL", new object[0]);
     }
 }
Beispiel #5
0
 protected override void OnScreenLoaded()
 {
     this.title                       = base.GetElement <UXLabel>("LabelDialogTitleNR");
     this.message                     = base.GetElement <UXLabel>("LabelTopMessageNR");
     this.messageBorderStroke         = base.GetElement <UXSprite>("SpriteBGMessageStrokeNR");
     this.rewardSectionTitle          = base.GetElement <UXLabel>("LabelRewardsTitleNR");
     this.leftContainerBtn            = base.GetElement <UXButton>("CrateContainerLeftNR");
     this.midContainerBtn             = base.GetElement <UXButton>("CrateContainerMiddleNR");
     this.rightContainerBtn           = base.GetElement <UXButton>("CrateContainerRightNR");
     this.leftCrateSprite             = base.GetElement <UXSprite>("SpriteCrateLeftNR");
     this.midCrateSprite              = base.GetElement <UXSprite>("SpriteCrateMiddleNR");
     this.rightCrateSprite            = base.GetElement <UXSprite>("SpriteCrateRightNR");
     this.oneStarLabel                = base.GetElement <UXLabel>("LabelRequirementsOneStarNR");
     this.twoStarLabel                = base.GetElement <UXLabel>("LabelRequirementsTwoStarNR");
     this.threeStarLabel              = base.GetElement <UXLabel>("LabelRequirementsThreeStarNR");
     this.rewardBGTexture             = base.GetElement <UXTexture>("TextureBGRewardsNR");
     this.raidTimer                   = base.GetElement <UXLabel>("TickerNR");
     this.okBtn                       = base.GetElement <UXButton>("ButtonOneOptionNR");
     this.okLabel                     = base.GetElement <UXLabel>("LabelOneOptionNR");
     this.confirmBtn                  = base.GetElement <UXButton>("ButtonTwoOptionRightNR");
     this.confirmLabel                = base.GetElement <UXLabel>("LabelTwoOptionRightNR");
     this.cancelBtn                   = base.GetElement <UXButton>("ButtonTwoOptionLeftNR");
     this.cancelLabel                 = base.GetElement <UXLabel>("LabelTwoOptionLeftNR");
     this.okLabel.Text                = this.lang.Get("s_Ok", new object[0]);
     this.okBtn.OnClicked             = new UXButtonClickedDelegate(this.OnCloseButtonClicked);
     this.leftContainerBtn.OnClicked  = new UXButtonClickedDelegate(this.OnCrateClicked);
     this.midContainerBtn.OnClicked   = new UXButtonClickedDelegate(this.OnCrateClicked);
     this.rightContainerBtn.OnClicked = new UXButtonClickedDelegate(this.OnCrateClicked);
     this.InitButtons();
     this.RefreshRaidView();
     Service.ViewTimeEngine.RegisterClockTimeObserver(this, 1f);
 }
Beispiel #6
0
 protected override void InitButtons()
 {
     base.InitButtons();
     this.sprite                 = base.GetElement <UXSprite>("SpriteImage");
     this.textureImage           = base.GetElement <UXTexture>("TextureImage");
     this.textureImageInset      = base.GetElement <UXTexture>("TextureImageInset");
     this.primaryButton          = base.GetElement <UXButton>("BtnPrimary");
     this.payButton              = base.GetElement <UXButton>("BtnPay");
     this.payLeftButton          = base.GetElement <UXButton>("BtnOptionPay1");
     this.payRightButton         = base.GetElement <UXButton>("BtnOptionPay2");
     this.payLeftLabel           = base.GetElement <UXLabel>("CostOptionPay1LabelDescription");
     this.payRightLabel          = base.GetElement <UXLabel>("CostOptionPay2LabelDescription");
     this.primary2OptionButton   = base.GetElement <UXButton>("BtnPrimary_2option");
     this.secondary2OptionButton = base.GetElement <UXButton>("BtnSecondary");
     this.option2ButtonSkip      = base.GetElement <UXButton>("BtnSkip");
     this.bgGraphic              = base.GetElement <UXElement>("SpriteTextBg");
     this.bgGraphic.Visible      = true;
     this.CloseButton.Enabled    = (!this.IsFatal && !this.disableCloseBtn);
     if (!this.IsFatal && Service.UserInputInhibitor != null)
     {
         Service.UserInputInhibitor.AddToAllow(this.CloseButton);
     }
     this.primaryButton.Visible          = false;
     this.payButton.Visible              = false;
     this.payLeftButton.Visible          = false;
     this.payRightButton.Visible         = false;
     this.primary2OptionButton.Visible   = false;
     this.secondary2OptionButton.Visible = false;
     this.costRequirement.Visible        = false;
     this.option2ButtonSkip.Visible      = false;
     this.labelBodyRequirement.Visible   = false;
 }
Beispiel #7
0
        public static JewelControl Create(UXFactory uxFactory, string jewelName, string parentNameSuffix, bool showCount, bool shouldHide)
        {
            bool      flag             = jewelName == "Clans";
            string    text             = "ContainerJewel" + jewelName;
            UXElement optionalElement  = uxFactory.GetOptionalElement <UXElement>(text);
            UXLabel   optionalElement2 = uxFactory.GetOptionalElement <UXLabel>("LabelMessageCount" + jewelName);
            Animator  a = null;

            if (optionalElement != null)
            {
                a = optionalElement.Root.GetComponent <Animator>();
            }
            else
            {
                Service.Logger.WarnFormat("No UI element found: " + text, new object[0]);
            }
            UXSprite  optionalElement3 = uxFactory.GetOptionalElement <UXSprite>("SpriteJewel" + jewelName);
            UXTexture optionalElement4 = uxFactory.GetOptionalElement <UXTexture>("TextureJewel" + jewelName);

            if (string.IsNullOrEmpty(parentNameSuffix))
            {
                parentNameSuffix = jewelName;
            }
            UXLabel  optionalElement5 = uxFactory.GetOptionalElement <UXLabel>("LabelTimer" + parentNameSuffix);
            UXSprite optionalElement6 = uxFactory.GetOptionalElement <UXSprite>("SpriteJewelGradient" + parentNameSuffix);

            if (optionalElement2 == null)
            {
                optionalElement2 = uxFactory.GetOptionalElement <UXLabel>("LabelMesageCount" + jewelName);
            }
            return((optionalElement != null && optionalElement2 != null) ? new JewelControl(optionalElement, optionalElement2, a, optionalElement3, optionalElement6, optionalElement4, optionalElement5, flag, showCount, shouldHide) : null);
        }
Beispiel #8
0
 public EpisodeWidgetView(UXFactory factory)
 {
     this.widgetBtn                   = factory.GetElement <UXButton>("Episode");
     this.widgetBtn.OnClicked         = new UXButtonClickedDelegate(this.OnWidgetClicked);
     this.titleLabel                  = factory.GetElement <UXLabel>("LabelTitleEpisode");
     this.noticeLabel                 = factory.GetElement <UXLabel>("LabelNoticeEpisode");
     this.titleLabelComplete          = factory.GetElement <UXLabel>("LabelStatus");
     this.noticeLabelComplete         = factory.GetElement <UXLabel>("LabelCTA");
     this.bgTexture                   = factory.GetElement <UXTexture>("TextureEpisodeBg");
     this.iconTexture                 = factory.GetElement <UXTexture>("TextureEpisodeIcon");
     this.borderTexture               = factory.GetElement <UXElement>("ParticleBorder");
     this.titleInitAnchorOffsetLeft   = this.titleLabel.GetLabelAnchorOffset(UXAnchorSection.Left);
     this.noticeInitAnchorOffsetLeft  = this.noticeLabel.GetLabelAnchorOffset(UXAnchorSection.Left);
     this.widgetCircleTimer           = factory.GetElement <UXElement>("WidgetCircleTimer");
     this.pBarCircleTimer             = factory.GetElement <UXSlider>("pBarCircleTimer");
     this.progressSlider              = factory.GetElement <UXSlider>("pBarEpisodeProgress");
     this.progressSliderGoal          = factory.GetElement <UXSlider>("pBarEpisodeProgressDelta");
     this.progressLabel               = factory.GetElement <UXLabel>("LabelEpisodeProgress");
     this.progressEarnedToast         = factory.GetElement <UXElement>("WidgetEpisodeProgress");
     this.progressEarnedToast.Visible = false;
     this.showTimer                   = false;
     this.needToShowCTA               = false;
     this.showingCTA                  = false;
     this.lang = Service.Lang;
     this.ForceHide();
 }
Beispiel #9
0
        private void InitElements()
        {
            base.GetElement <UXLabel>("LabelBtnNext").Text = this.lang.Get("s_WhatsNextButton", new object[0]);
            this.holoPositioner        = base.GetElement <UXElement>("HoloHolder");
            this.nextButton            = base.GetElement <UXButton>("BtnNext");
            this.storeButton           = base.GetElement <UXButton>("ButtonStore");
            this.infoPanel             = base.GetElement <UXElement>("InfoItems");
            this.infoLabel             = base.GetElement <UXLabel>("LabelInfoItem");
            this.infoTexture           = base.GetElement <UXTexture>("SpriteInfoItem");
            this.infoPlanetTexture     = base.GetElement <UXTexture>("SpriteInfoItemPlanets");
            this.infoTitleLabel        = base.GetElement <UXLabel>("LabelInfoItemTitle");
            this.regularTextBoxGroup   = base.GetElement <UXElement>("NpcDialogLarge");
            this.regularTitleLabel     = base.GetElement <UXLabel>("LabelNpcMessageBottomLeftTitleLarge");
            this.regularBodyLabel      = base.GetElement <UXLabel>("LabelNpcMessageBottomLeftBodyLarge");
            this.storeTextBoxGroup     = base.GetElement <UXElement>("NpcDialog");
            this.storeTitleLabel       = base.GetElement <UXLabel>("LabelNpcMessageBottomLeftTitle");
            this.storeBodyLabel        = base.GetElement <UXLabel>("LabelNpcMessageBottomLeftBody");
            this.storeAnchorAbsolute   = (float)this.storeTitleLabel.GetUIWidget.transform.parent.GetComponent <UIWidget>().leftAnchor.absolute;
            this.regularAnchorAbsolute = (float)this.regularTitleLabel.GetUIWidget.transform.parent.GetComponent <UIWidget>().leftAnchor.absolute;
            float num = (float)Screen.height / 1080f;

            this.storeTitleLabel.GetUIWidget.transform.parent.GetComponent <UIWidget>().leftAnchor.absolute   = 50 + (int)(this.storeAnchorAbsolute * num);
            this.regularTitleLabel.GetUIWidget.transform.parent.GetComponent <UIWidget>().leftAnchor.absolute = 50 + (int)(this.storeAnchorAbsolute * num);
            this.HideAllElements();
        }
Beispiel #10
0
        private void OnGetFriendPicture(Texture2D tex, object cookie)
        {
            UXTexture uXTexture = cookie as UXTexture;

            uXTexture.MainTexture = tex;
            this.loadedFBTextures.Add(tex);
        }
Beispiel #11
0
        protected override void OnScreenLoaded()
        {
            this.InitButtons();
            UXTexture   element = base.GetElement <UXTexture>("SquadImage");
            FactionType faction = Service.CurrentPlayer.Faction;

            if (faction != FactionType.Empire)
            {
                if (faction == FactionType.Rebel)
                {
                    element.LoadTexture("SquadIntro_r");
                }
            }
            else
            {
                element.LoadTexture("SquadIntro_e");
            }
            UXLabel element2 = base.GetElement <UXLabel>("LabelTitle");

            element2.Text = this.lang.Get("SQUAD_JOIN_OR_CREATE", new object[0]);
            UXLabel element3 = base.GetElement <UXLabel>("LabelSquadIntro");

            element3.Text = this.lang.Get("SQUAD_INTRO", new object[0]);
            UXLabel element4 = base.GetElement <UXLabel>("LabelCreateSquad");

            element4.Text = this.lang.Get("CREATE_SQUAD", new object[0]);
            UXLabel element5 = base.GetElement <UXLabel>("LabelJoinSquad");

            element5.Text = this.lang.Get("JOIN_A_SQUAD", new object[0]);
        }
Beispiel #12
0
        protected override void OnScreenLoaded()
        {
            this.InitButtons();
            this.playerNameLabel       = base.GetElement <UXLabel>("LabelPlayerName");
            this.attacksRemainingLabel = base.GetElement <UXLabel>("LabelAttacksRemaining");
            this.uplinksAvailableLabel = base.GetElement <UXLabel>("LabelUplinksAvailable");
            this.factionSprite         = base.GetElement <UXSprite>("SpriteFactionIcon");
            this.factionDefaultSprite  = base.GetElement <UXSprite>("SpriteFactionIconZero");
            this.playerDetailTexture   = base.GetElement <UXTexture>("TexturePlayerDetails");
            StaticDataController staticDataController = Service.StaticDataController;
            TextureVO            optional             = staticDataController.GetOptional <TextureVO>("squadwars_playerdetails_bg");

            if (optional != null)
            {
                this.playerDetailTexture.LoadTexture(optional.AssetName);
            }
            for (int i = 1; i <= 3; i++)
            {
                this.requirements.Add(base.GetElement <UXLabel>(string.Format("LabelStarRequirement{0}", i)));
                this.uplinks.Add(base.GetElement <UXSprite>(string.Format("SpriteUplink{0}", i)));
                this.checks.Add(base.GetElement <UXSprite>(string.Format("SpriteCheck{0}", i)));
                this.stars.Add(base.GetElement <UXElement>(string.Format("DamageStars{0}", i)));
            }
            this.RefreshView();
        }
        protected override void OnScreenLoaded()
        {
            base.InitAnimator();
            Lang      lang     = Service.Get <Lang>();
            UXLabel   element  = base.GetElement <UXLabel>("LabelTitlePrimarySquadWarEndCeleb");
            UXLabel   element2 = base.GetElement <UXLabel>("LabelTitleSecondarySquadWarEndCeleb");
            UXLabel   element3 = base.GetElement <UXLabel>("LabelRewardSquadWarEndCeleb");
            UXLabel   element4 = base.GetElement <UXLabel>("LabelCollectSquadWarEndCeleb");
            UXTexture element5 = base.GetElement <UXTexture>("TextureFactionIconSquadWarEndCeleb");

            element.Text = lang.Get("WAR_END_RESULTS_TITLE", new object[0]);
            element5.LoadTexture((this.playerFaction == FactionType.Empire) ? "squadwars_end_celeb_empire" : "squadwars_end_celeb_rebel");
            string id = "sfx_stinger_war_end_draw";

            if (this.squadWarResult == 1)
            {
                id            = ((this.playerFaction == FactionType.Empire) ? "sfx_stinger_war_end_win_empire" : "sfx_stinger_war_end_win_rebel");
                element2.Text = lang.Get((this.playerFaction == FactionType.Empire) ? "WAR_END_RESULTS_EMPIRE_WIN" : "WAR_END_RESULTS_REBELS_WIN", new object[]
                {
                    this.playerSquadName
                });
                element3.Visible = false;
                element4.Text    = lang.Get("WAR_END_RESULTS_WIN_CTA", new object[0]);
                this.ResetAllTriggers();
                this.animator.SetTrigger((this.playerFaction == FactionType.Empire) ? "ShowWinEmpire" : "ShowWinRebel");
            }
            else if (this.squadWarResult == -1)
            {
                id            = "sfx_stinger_war_end_loss";
                element2.Text = lang.Get((this.playerFaction == FactionType.Empire) ? "WAR_END_RESULTS_EMPIRE_LOSS" : "WAR_END_RESULTS_REBELS_LOSS", new object[0]);
                element3.Text = lang.Get("WAR_END_RESULTS_LOSS_REWARD", new object[0]);
                element4.Text = lang.Get("WAR_END_RESULTS_LOSS_CTA", new object[0]);
                this.ResetAllTriggers();
                this.animator.SetTrigger("ShowLoss");
            }
            else if (this.squadWarResult == 0)
            {
                element2.Text = lang.Get("WAR_END_RESULTS_DRAW", new object[0]);
                element3.Text = lang.Get("WAR_END_RESULTS_DRAW_REWARD", new object[0]);
                element4.Text = lang.Get("WAR_END_RESULTS_DRAW_CTA", new object[0]);
                base.GetElement <UXTexture>("TextureDrawIconEmpireSquadWarEndCeleb").LoadTexture("squadwars_end_celeb_empire");
                base.GetElement <UXTexture>("TextureDrawIconRebelSquadWarEndCeleb").LoadTexture("squadwars_end_celeb_rebel");
                this.ResetAllTriggers();
                if (this.sameFaction)
                {
                    this.animator.SetTrigger("ShowDrawSF");
                }
                else
                {
                    this.animator.SetTrigger("ShowDraw");
                }
            }
            Service.Get <AudioManager>().PlayAudio(id);
            UXButton element6 = base.GetElement <UXButton>("BtnCollectSquadWarEndCeleb");

            element6.OnClicked       = new UXButtonClickedDelegate(this.OnCollectButtonClicked);
            base.CurrentBackDelegate = new UXButtonClickedDelegate(this.OnCollectButtonClicked);
            base.CurrentBackButton   = element6;
        }
Beispiel #14
0
 public void OnScreenLoaded()
 {
     this.timedEventFooterTexture = this.screen.GetElement <UXTexture>("PlanetFooterTexture");
     this.timedEventFooterTexture.LoadTexture(this.screen.viewingPlanetVO.FooterTexture);
     this.tournamentGroup = this.screen.GetElement <UXElement>("TournamentSelection");
     this.tournamentsView.OnScreenLoaded();
     this.RefreshView(false);
 }
Beispiel #15
0
        private void SetupCategory(string labelName, string stringUid, string textureName, string textureUid, int[] epList)
        {
            object[] args = Array.ConvertAll <int, object>(epList, (int item) => item);
            base.GetElement <UXLabel>(labelName).Text = this.lang.Get(stringUid, args);
            TextureVO optional = Service.StaticDataController.GetOptional <TextureVO>(textureUid);
            UXTexture element  = base.GetElement <UXTexture>(textureName);

            element.LoadTexture(optional.AssetName);
        }
Beispiel #16
0
        private void HideStickerVisuals(StoreTab tab)
        {
            string    text            = string.Format("Texture{0}Icon", tab.ToString());
            string    name            = string.Format("Widget{0}Special", tab.ToString());
            string    text2           = string.Format("SpriteBannerGradient{0}Special", tab.ToString());
            string    text3           = string.Format("SpriteBanner{0}Special", tab.ToString());
            string    text4           = string.Format("LabelSee{0}Deals", tab.ToString());
            string    text5           = string.Format("SpriteSee{0}DealsStroke", tab.ToString());
            string    text6           = string.Format("SpriteSee{0}DealsIcon", tab.ToString());
            string    text7           = string.Format("SpriteBkgStrokeTab{0}", tab.ToString());
            string    text8           = string.Format("SpriteBkgDetailRightTab{0}", tab.ToString());
            string    text9           = string.Format("SpriteBkgDetailLeftTab{0}", tab.ToString());
            string    text10          = string.Format("SpriteBkgInnerGlowTab{0}", tab.ToString());
            UXTexture optionalElement = this.parentStoreScreen.GetOptionalElement <UXTexture>(text);

            if (optionalElement != null && this.orginalTextureNames.ContainsKey(text))
            {
                optionalElement.LoadTexture(this.orginalTextureNames[text]);
            }
            UXElement optionalElement2 = this.parentStoreScreen.GetOptionalElement <UXElement>(name);

            if (optionalElement2 != null)
            {
                optionalElement2.Visible = false;
            }
            UXSprite optionalElement3 = this.parentStoreScreen.GetOptionalElement <UXSprite>(text2);

            this.RestoreOriginalSpriteColor(text2, optionalElement3);
            UXSprite optionalElement4 = this.parentStoreScreen.GetOptionalElement <UXSprite>(text3);

            this.RestoreOriginalSpriteColor(text3, optionalElement4);
            UXLabel optionalElement5 = this.parentStoreScreen.GetOptionalElement <UXLabel>(text4);

            this.RestoreOriginalLabelColor(text4, optionalElement5);
            UXSprite optionalElement6 = this.parentStoreScreen.GetOptionalElement <UXSprite>(text5);

            this.RestoreOriginalSpriteColor(text5, optionalElement6);
            UXSprite optionalElement7 = this.parentStoreScreen.GetOptionalElement <UXSprite>(text6);

            this.RestoreOriginalSpriteColor(text6, optionalElement7);
            UXSprite optionalElement8 = this.parentStoreScreen.GetOptionalElement <UXSprite>(text7);

            this.RestoreOriginalSpriteColor(text7, optionalElement8);
            UXSprite optionalElement9 = this.parentStoreScreen.GetOptionalElement <UXSprite>(text8);

            this.RestoreOriginalSpriteColor(text8, optionalElement9);
            UXSprite optionalElement10 = this.parentStoreScreen.GetOptionalElement <UXSprite>(text9);

            this.RestoreOriginalSpriteColor(text9, optionalElement10);
            UXSprite optionalElement11 = this.parentStoreScreen.GetOptionalElement <UXSprite>(text10);

            this.RestoreOriginalSpriteColor(text10, optionalElement11);
        }
Beispiel #17
0
        private void RefreshFriendData()
        {
            if (!base.IsLoaded())
            {
                return;
            }
            List <SocialFriendData> friends = Service.Get <ISocialDataController>().Friends;

            this.empireGrid = base.GetElement <UXGrid>("GridEmpireFriends");
            this.rebelGrid  = base.GetElement <UXGrid>("GridRebelFriends");
            this.empireGrid.SetTemplateItem("FriendEmpireThumb");
            this.rebelGrid.SetTemplateItem("FriendRebelThumb");
            this.empireGrid.Clear();
            this.rebelGrid.Clear();
            if (friends != null)
            {
                for (int i = 0; i < friends.Count; i++)
                {
                    SocialFriendData socialFriendData = friends[i];
                    if (socialFriendData.PlayerData != null)
                    {
                        FactionType faction   = socialFriendData.PlayerData.Faction;
                        UXElement   uXElement = null;
                        if (faction == FactionType.Empire)
                        {
                            uXElement = this.empireGrid.CloneTemplateItem(socialFriendData.Id);
                            UXTexture subElement = this.empireGrid.GetSubElement <UXTexture>(socialFriendData.Id, "FriendEmpirePic");
                            Service.Get <ISocialDataController>().GetFriendPicture(socialFriendData, new OnGetProfilePicture(this.OnGetFriendPicture), subElement);
                            this.empireGrid.AddItem(uXElement, i);
                        }
                        else if (faction == FactionType.Rebel)
                        {
                            uXElement = this.rebelGrid.CloneTemplateItem(socialFriendData.Id);
                            UXTexture subElement2 = this.rebelGrid.GetSubElement <UXTexture>(socialFriendData.Id, "FriendRebelPic");
                            Service.Get <ISocialDataController>().GetFriendPicture(socialFriendData, new OnGetProfilePicture(this.OnGetFriendPicture), subElement2);
                            this.rebelGrid.AddItem(uXElement, i);
                        }
                        if (uXElement != null)
                        {
                            uXElement.Tag = socialFriendData.PlayerData.PlayerName + "\n" + socialFriendData.Name;
                            UXButton uXButton = (UXButton)uXElement;
                            if (uXButton != null)
                            {
                                uXButton.OnPressed  = new UXButtonPressedDelegate(this.OnPressFriendButton);
                                uXButton.OnReleased = new UXButtonReleasedDelegate(this.OnReleaseFriendButton);
                            }
                        }
                    }
                }
            }
            this.empireGrid.RepositionItems();
            this.rebelGrid.RepositionItems();
        }
Beispiel #18
0
        private void InitPlanetUI()
        {
            UXLabel   element  = base.GetElement <UXLabel>("LabelPlanetNameCrate");
            UXTexture element2 = base.GetElement <UXTexture>("TexturePlanetBgCrateInfo");

            if (this.planetVO != null)
            {
                element.Text = LangUtils.GetPlanetDisplayName(this.planetVO.Uid);
                element2.LoadTexture(this.planetVO.LeaderboardTileTexture);
                return;
            }
            element.Visible  = false;
            element2.Visible = false;
        }
Beispiel #19
0
        protected void InitOverview()
        {
            this.statsMembersTitle               = this.screen.GetElement <UXLabel>("LabelMembersTitle");
            this.statsActiveMembersTitle         = this.screen.GetElement <UXLabel>("LabelMembersActiveTitle");
            this.statsScoreTitle                 = this.screen.GetElement <UXLabel>("LabelScoreTitle");
            this.statsTrophiesTitle              = this.screen.GetElement <UXLabel>("LabelTrophiesTitle");
            this.statsTypeTitle                  = this.screen.GetElement <UXLabel>("LabelTypeTitle");
            this.statsTrophiesLabel              = this.screen.GetElement <UXLabel>("LabelTrophies");
            this.statsTypeLabel                  = this.screen.GetElement <UXLabel>("LabelType");
            this.squadHighestRankTitleLabel      = this.screen.GetElement <UXLabel>("LabelHighestRankTitle");
            this.statsActiveMembersLabel         = this.screen.GetElement <UXLabel>("LabelActiveMembers");
            this.statsMembersLabel               = this.screen.GetElement <UXLabel>("LabelMembers");
            this.statsScoreLabel                 = this.screen.GetElement <UXLabel>("LabelScore");
            this.statsScoreTitle.Text            = this.lang.Get("SQUAD_BATTLESCORE", new object[0]);
            this.statsMembersTitle.Text          = this.lang.Get("SQUAD_MEMBERS", new object[0]);
            this.statsActiveMembersTitle.Text    = this.lang.Get("SQUAD_ACTIVE_MEMBERS", new object[0]);
            this.statsTypeTitle.Text             = this.lang.Get("SQUAD_TYPE", new object[0]);
            this.statsTrophiesTitle.Text         = this.lang.Get("SQUAD_REQUIRED_TROPHIES", new object[0]);
            this.squadHighestRankTitleLabel.Text = this.lang.Get("SQUAD_HIGHEST_RANK", new object[0]);
            this.squadTitleLabel                 = this.screen.GetElement <UXLabel>("LabelSquadName");
            this.squadRankLabel                  = this.screen.GetElement <UXLabel>("LabelSquadRank");
            this.squadHighestRankLabel           = this.screen.GetElement <UXLabel>("LabelSquadHighestRank");
            this.squadDescLabel                  = this.screen.GetElement <UXLabel>("LabelSquadDescription");
            this.squadIcon                = this.screen.GetElement <UXSprite>("SpriteSquadLogo");
            this.squadRankTitleLabel      = this.screen.GetElement <UXLabel>("LabelRankTitle");
            this.squadRankTitleLabel.Text = this.lang.Get("SQUAD_OVERVIEW_RANK", new object[0]);
            this.squadLevelLabel          = this.screen.GetElement <UXLabel>("LabelSquadLvlOverview");
            this.editButton               = this.screen.GetElement <UXButton>("BtnEdit");
            this.editButton.OnClicked     = new UXButtonClickedDelegate(this.OnEditSquadClicked);
            this.SetupButtonBasedOnRole(this.editButton, null, true);
            this.leaveButton           = this.screen.GetElement <UXButton>("BtnLeave");
            this.leaveButton.OnClicked = new UXButtonClickedDelegate(this.OnLeaveSquadClicked);
            this.screen.GetElement <UXLabel>("LabelBtnFeaturedSquads").Text = this.lang.Get("FEATURED_SQUADS_CTA", new object[0]);
            this.featureSquadButton           = this.screen.GetElement <UXButton>("BtnFeaturedSquads");
            this.featureSquadButton.Enabled   = true;
            this.featureSquadButton.OnClicked = new UXButtonClickedDelegate(this.OnFeatureSquadClicked);
            this.factionTexture = this.screen.GetElement <UXTexture>("TextureSquadFaction");
            CurrentPlayer currentPlayer = Service.CurrentPlayer;

            if (currentPlayer.Faction == FactionType.Rebel)
            {
                this.factionTexture.LoadTexture("SquadFactionRebel");
            }
            else
            {
                this.factionTexture.LoadTexture("SquadFactionEmpire");
            }
        }
 public void Init()
 {
     this.selectedPlanet             = null;
     this.currentPlanetBtn           = this.uxFactory.GetElement <UXButton>("BtnPlanetFilter");
     this.cuttentPlanetBtnLabel      = this.uxFactory.GetElement <UXLabel>("LabelBtnPlanetFilter");
     this.cuttentPlanetBtnBackground = this.uxFactory.GetElement <UXSprite>("SpriteBtnPlanetFilterSymbol");
     this.cuttentPlanetBtnTexture    = this.uxFactory.GetElement <UXTexture>("TextureBtnPlanetFilterSymbol");
     this.currentPlanetBtn.OnClicked = new UXButtonClickedDelegate(this.CurrentPlanetButtonClicked);
     this.planetGrid = this.uxFactory.GetElement <UXGrid>("PlanetFilterGrid");
     this.planetGrid.SetTemplateItem("BtnPlanet");
     this.planetOptionPanel           = this.uxFactory.GetElement <UXElement>("PlanetFilterOptions");
     this.planetOptionPanel.Visible   = false;
     this.planetOptionPanelBackground = this.uxFactory.GetElement <UXSprite>("SpritePlanetFilterBg");
     this.UpdateCurrentPlanetButton();
     this.currentPlanetBtn.Visible = false;
 }
Beispiel #21
0
 public void OnScreenLoaded()
 {
     this.objectiveController   = Service.ObjectiveController;
     this.objectivesPanel       = this.screen.GetElement <UXElement>("Objectives");
     this.labelOperationsLocked = this.screen.GetElement <UXLabel>("LabelOperationsLocked");
     if (!this.objectiveController.ShouldShowObjectives())
     {
         this.objectivesPanel.Visible = false;
         return;
     }
     this.objectiveController       = Service.ObjectiveController;
     this.labelObjectivesTitle      = this.screen.GetElement <UXLabel>("LabelObjectivesTitle");
     this.labelObjectivesTitle.Text = Service.Lang.Get("OBJECTIVES", new object[0]);
     this.labelObjectivesTimer      = this.screen.GetElement <UXLabel>("LabelObjectivesTimer");
     this.btnDetails                       = this.screen.GetElement <UXButton>("BtnObjectiveDetails");
     this.btnDetails.OnClicked             = new UXButtonClickedDelegate(this.OnObjectivesDetailsClicked);
     this.labelBtnDetails                  = this.screen.GetElement <UXLabel>("LabelBtnDetails");
     this.labelBtnDetails.Text             = this.lang.Get("objective_details", new object[0]);
     this.containerJewelObjectives         = this.screen.GetElement <UXElement>("ContainerJewelObjectives");
     this.containerJewelObjectives.Visible = false;
     this.specialObjectiveIcon             = this.screen.GetElement <UXTexture>("TextureObjectiveSpecial");
     this.specialObjectiveFrame            = this.screen.GetElement <UXTexture>("TextureObjectiveFrameSpecial");
     this.specialObjectiveIcon.Visible     = false;
     this.specialObjectiveFrame.Visible    = false;
     for (int i = 0; i < 3; i++)
     {
         ObjectiveViewData objectiveViewData = new ObjectiveViewData();
         this.data.Add(objectiveViewData);
         string text = (i + 1).ToString();
         objectiveViewData.BtnSupplyCrate           = this.screen.GetElement <UXButton>("BtnSupplyCrate" + text);
         objectiveViewData.SpriteCheckmark          = this.screen.GetElement <UXSprite>("SpriteCheckmark" + text);
         objectiveViewData.SpritePreview            = this.screen.GetElement <UXSprite>("SpriteSupplyCrate" + text);
         objectiveViewData.RadialProgress           = this.screen.GetElement <UXSprite>("SpriteObjectiveProgress" + text);
         objectiveViewData.ObjectiveBgComplete      = this.screen.GetElement <UXElement>("CrateBgComplete" + text);
         objectiveViewData.ObjectiveBgActive        = this.screen.GetElement <UXElement>("CrateBgProgress" + text);
         objectiveViewData.ObjectiveBgExpired       = this.screen.GetElement <UXElement>("CrateBgExpired" + text);
         objectiveViewData.ObjectiveBgCollected     = this.screen.GetElement <UXElement>("CrateBgCollected" + text);
         objectiveViewData.SpecailObjectiveFx       = this.screen.GetElement <UXElement>("CrateEffect" + text);
         objectiveViewData.BtnSupplyCrate.OnClicked = new UXButtonClickedDelegate(this.OnPreviewIconClicked);
         objectiveViewData.BtnSupplyCrate.Tag       = objectiveViewData;
         objectiveViewData.ExpiredLabel             = this.screen.GetElement <UXLabel>("LabelObjectiveExpired" + text);
         objectiveViewData.ObjectiveContainer       = this.screen.GetElement <UXElement>("ContainerCrateBgProgress3");
         objectiveViewData.ObjectiveContainerLEI    = ((!(text == "3")) ? this.screen.GetElement <UXElement>("ContainerCrateBgProgress3") : this.screen.GetElement <UXElement>("ContainerCrateBgProgressSpecial3"));
     }
     Service.ViewTimeEngine.RegisterClockTimeObserver(this, 1f);
     this.RefreshScreenForPlanetChange();
 }
Beispiel #22
0
 private void LoadTexture(UXTexture texture, string textureID)
 {
     if (!string.IsNullOrEmpty(textureID))
     {
         texture.Visible = true;
         TextureVO optional = Service.StaticDataController.GetOptional <TextureVO>(textureID);
         if (optional != null)
         {
             texture.LoadTexture(optional.AssetName);
         }
     }
     else
     {
         texture.MainTexture = null;
         texture.Visible     = false;
     }
 }
Beispiel #23
0
        protected override void OnScreenLoaded()
        {
            this.battlesWonLabel  = base.GetElement <UXLabel>("LabelTitleBattlesWonFactionIcon");
            this.defensesWonLabel = base.GetElement <UXLabel>("LabelTitleDefensesWonFactionIcon");
            CurrentPlayer currentPlayer = Service.CurrentPlayer;

            this.battlesWonLabel.Text = this.lang.Get("FACTION_ICON_CELEB_BATTLES_WON", new object[]
            {
                currentPlayer.AttacksWon
            });
            this.defensesWonLabel.Text = this.lang.Get("FACTION_ICON_CELEB_DEFENSES_WON", new object[]
            {
                currentPlayer.DefensesWon
            });
            this.iconTexture = base.GetElement <UXTexture>("TextureFactionIcon");
            this.iconTexture.LoadTexture(this.iconAssetName, new Action(this.OnIconLoadComplete), new Action(this.OnIconLoadFailed));
        }
Beispiel #24
0
 private JewelControl(UXElement c, UXLabel l, Animator a, UXSprite s, UXSprite g, UXTexture i, UXLabel t, bool useMaxJewelAmount, bool showCount, bool shouldHide)
 {
     this.container         = c;
     this.label             = l;
     this.jewelAnimator     = a;
     this.jewelSprite       = s;
     this.gradientSprite    = g;
     this.iconSprite        = i;
     this.jewelTimer        = t;
     this.useMaxJewelAmount = useMaxJewelAmount;
     this.showCount         = showCount;
     if (shouldHide)
     {
         this.Value = 0;
     }
     this.activeViewTimers = new List <uint>();
 }
Beispiel #25
0
        private UXTexture CreateTexture(GameObject gameObject, UITexture nguiTexture)
        {
            UXTextureComponent uXTextureComponent = gameObject.GetComponent <UXTextureComponent>();

            if (uXTextureComponent != null)
            {
                uXTextureComponent.Texture = null;
                UnityEngine.Object.Destroy(uXTextureComponent);
            }
            uXTextureComponent             = gameObject.AddComponent <UXTextureComponent>();
            uXTextureComponent.NGUITexture = nguiTexture;
            UXTexture uXTexture = new UXTexture(this.uxCamera, uXTextureComponent);

            uXTextureComponent.Texture = uXTexture;
            this.AddElement(gameObject.name, uXTexture);
            return(uXTexture);
        }
Beispiel #26
0
        private void AddPerkToGrid(ActivatedPerkData perkData)
        {
            string             perkId             = perkData.PerkId;
            PerkViewController perkViewController = Service.PerkViewController;
            PerkVO             perkVO             = Service.StaticDataController.Get <PerkVO>(perkId);
            UXElement          uXElement          = this.perksGrid.CloneTemplateItem(perkId);

            uXElement.Tag = perkData;
            UXLabel subElement = this.perksGrid.GetSubElement <UXLabel>(perkId, "LabelPerkTitleModalActivePerks");

            subElement.Text = perkViewController.GetPerkNameForGroup(perkVO.PerkGroup);
            UXTexture subElement2 = this.perksGrid.GetSubElement <UXTexture>(perkId, "TexturePerkArtModalActivePerks");

            perkViewController.SetPerkImage(subElement2, perkVO);
            UXLabel subElement3 = this.perksGrid.GetSubElement <UXLabel>(perkId, "LabelPerkLvlModalActivePerks");

            subElement3.Text = StringUtils.GetRomanNumeral(perkVO.PerkTier);
            UXLabel subElement4 = this.perksGrid.GetSubElement <UXLabel>(perkId, "ItemLabelModalActivePerks");

            subElement4.Visible = false;
            UXGrid subElement5 = this.perksGrid.GetSubElement <UXGrid>(perkId, "GridSubModalActivePerks");

            subElement5.SetTemplateItem("ItemLabelModalActivePerks");
            subElement5.Clear();
            PerkManager perkManager = Service.PerkManager;
            int         i           = 0;
            int         num         = perkVO.PerkEffects.Length;

            while (i < num)
            {
                string       text         = perkVO.PerkEffects[i];
                PerkEffectVO perkEffectVO = Service.StaticDataController.Get <PerkEffectVO>(text);
                UXLabel      uXLabel      = (UXLabel)subElement5.CloneTemplateItem(text);
                uXLabel.Text = this.lang.Get(perkEffectVO.StatStringId, new object[0]) + Service.PerkViewController.GetFormattedValueBasedOnEffectType(perkEffectVO, null);
                if (!perkManager.IsPerkEffectAppliedToBuilding(perkEffectVO, this.buildingVO))
                {
                    uXLabel.TextColor = UXUtils.COLOR_PERK_EFFECT_NOT_APPLIED;
                }
                subElement5.AddItem(uXLabel, i);
                i++;
            }
            this.UpdatePerkTimer(uXElement);
            this.perksGrid.AddItem(uXElement, 1);
        }
Beispiel #27
0
        protected void InitPlanetSlots()
        {
            this.selectPlanetGrid = base.GetElement <UXGrid>("SelectPlanetGrid");
            UXElement element = base.GetElement <UXElement>("SelectPlanetTemplate");

            element.Visible = true;
            this.selectPlanetGrid.SetTemplateItem("SelectPlanetCard");
            element.Visible = false;
            this.unlockablePlanetList.Clear();
            CurrentPlayer currentPlayer = Service.CurrentPlayer;

            foreach (PlanetVO current in Service.StaticDataController.GetAll <PlanetVO>())
            {
                if (current.PlayerFacing && !currentPlayer.UnlockedPlanets.Contains(current.Uid) && currentPlayer.Map.Planet.Uid != current.Uid)
                {
                    UXCheckbox uXCheckbox = (UXCheckbox)this.selectPlanetGrid.CloneTemplateItem(current.Uid);
                    UXLabel    subElement = this.selectPlanetGrid.GetSubElement <UXLabel>(current.Uid, "LabelSelectPlanetName");
                    if (!this.reqMet && !this.tutorialMode)
                    {
                        uXCheckbox.RadioGroup = 0;
                        uXCheckbox.SetSelectable(false);
                        uXCheckbox.Selected = false;
                    }
                    uXCheckbox.OnSelected = new UXCheckboxSelectedDelegate(this.PlanetSelected);
                    UXTexture subElement2 = this.selectPlanetGrid.GetSubElement <UXTexture>(current.Uid, "SpriteSelectPlanetImagePlanet");
                    subElement2.LoadTexture("PlanetEnvIcon-" + current.Abbreviation);
                    subElement.Text       = LangUtils.GetPlanetDisplayName(current);
                    uXCheckbox.Tag        = current;
                    uXCheckbox.RadioGroup = 0;
                    uXCheckbox.DelayedSelect(false);
                    this.selectPlanetGrid.AddItem(uXCheckbox, current.Order);
                    this.unlockablePlanetList.Add(uXCheckbox);
                }
            }
            if (this.unlockablePlanetList.Count == 0)
            {
                base.GetElement <UXElement>("ButtonPrimary").Visible = false;
                base.GetElement <UXElement>("BtnInstantBuy").Visible = false;
                this.buttonTutorialConfirm.Visible = false;
            }
            this.selectPlanetGrid.RepositionItems();
            this.selectPlanetGrid.IsScrollable = true;
            this.selectPlanetGrid.ScrollToItem(0);
        }
        private void AddPlanetButton(PlanetVO planet, bool createdForTournament, bool setSelected)
        {
            string     uid        = planet.Uid;
            UXCheckbox uXCheckbox = (UXCheckbox)this.planetGrid.CloneTemplateItem(uid);

            uXCheckbox.OnSelected = new UXCheckboxSelectedDelegate(this.NewPlanetOptionClicked);
            uXCheckbox.Tag        = planet;
            uXCheckbox.Selected   = setSelected;
            UXLabel subElement = this.planetGrid.GetSubElement <UXLabel>(uid, "LabelBtnPlanet");

            subElement.Text = LangUtils.GetPlanetDisplayName(planet);
            UXSprite subElement2 = this.planetGrid.GetSubElement <UXSprite>(uid, "SpriteBtnPlanetSymbol");

            subElement2.Visible = false;
            UXTexture subElement3 = this.planetGrid.GetSubElement <UXTexture>(uid, "TextureBtnPlanetSymbol");

            subElement3.LoadTexture(planet.LeaderboardButtonTexture);
            this.planetGrid.AddItem(uXCheckbox, planet.Order);
        }
Beispiel #29
0
        protected void InitElements()
        {
            this.nameLabel               = this.grid.GetSubElement <UXLabel>(this.id, "LabelName");
            this.typeLabel               = this.grid.GetSubElement <UXLabel>(this.id, "LabelType");
            this.squadSymbolSprite       = this.grid.GetSubElement <UXSprite>(this.id, "SpriteSquadSymbol");
            this.memberNumberLabel       = this.grid.GetSubElement <UXLabel>(this.id, "LabelMemberNumber");
            this.activeMemberNumberLabel = this.grid.GetSubElement <UXLabel>(this.id, "LabelMemberActiveNumber");
            this.rankLabel               = this.grid.GetSubElement <UXLabel>(this.id, "LabelRank");
            this.friendTexture           = this.grid.GetSubElement <UXTexture>(this.id, "FriendPic");
            this.squadFactionSprite      = this.grid.GetSubElement <UXSprite>(this.id, "SpriteFactionIcon");
            this.playerFactionSprite     = this.grid.GetSubElement <UXSprite>(this.id, "SpriteFactionUpgradeIcon");
            this.backButton              = this.grid.GetSubElement <UXButton>(this.id, "BtnScrollBack");
            this.buttonContainer         = this.grid.GetSubElement <UXElement>(this.id, "ButtonContainer");
            this.primaryButtonLabel      = this.grid.GetSubElement <UXLabel>(this.id, "LabelBtnPrimary");
            this.primaryButton           = this.grid.GetSubElement <UXButton>(this.id, "BtnPrimary");
            this.secondaryButtonLabel    = this.grid.GetSubElement <UXLabel>(this.id, "LabelBtnSecondary");
            this.secondaryButton         = this.grid.GetSubElement <UXButton>(this.id, "BtnSecondary");
            this.tertiaryButtonLabel     = this.grid.GetSubElement <UXLabel>(this.id, "LabelBtnTertiary");
            this.tertiaryButton          = this.grid.GetSubElement <UXButton>(this.id, "BtnTertiary");
            this.planetLabel             = this.grid.GetSubElement <UXLabel>(this.id, "LabelPlanet");
            this.planetBgTexture         = this.grid.GetSubElement <UXTexture>(this.id, "TexturePlanetBg");
            this.medalGroup              = this.grid.GetSubElement <UXElement>(this.id, "SquadInfoMedals");
            this.tournamentMedalGroup    = this.grid.GetSubElement <UXElement>(this.id, "SquadInfoTournamentMedals");
            this.tournamentMedalLabel    = this.grid.GetSubElement <UXLabel>(this.id, "LabelScoreTournamentMedals");
            this.tournamentMedalSprite   = this.grid.GetSubElement <UXSprite>(this.id, "SpriteSquadInfoTournamentMedalIcon");
            this.medalLabel              = this.grid.GetSubElement <UXLabel>(this.id, "LabelScore");
            this.attacksLabel            = this.grid.GetSubElement <UXLabel>(this.id, "LabelAttacksWon");
            this.defensesLabel           = this.grid.GetSubElement <UXLabel>(this.id, "LabelDefensesWon");
            this.bgSprite        = this.grid.GetSubElement <UXSprite>(this.id, "SpriteLeaderboardBg");
            this.arrowSprite     = this.grid.GetSubElement <UXSprite>(this.id, "SpriteScrollBtn");
            this.squadLevelGroup = this.grid.GetSubElement <UXElement>(this.id, "GroupSquadLevel");
            this.squadLevelLabel = this.grid.GetSubElement <UXLabel>(this.id, "LabelSquadLvl");
            this.item.AddUXButton(this.screen.GetElement <UXButton>(this.item.Root.name));
            this.item.OnElementClicked = new UXButtonClickedDelegate(this.OnClicked);
            this.backButton.OnClicked  = new UXButtonClickedDelegate(this.OnBackButtonClicked);
            this.tween = this.item.Root.GetComponent <UIPlayTween>();
            this.tween.playDirection = Direction.Forward;
            UIPlayTween component = this.backButton.Root.GetComponent <UIPlayTween>();

            component.tweenTarget        = null;
            this.secondaryButton.Visible = false;
            this.tertiaryButton.Visible  = false;
        }
Beispiel #30
0
 private void InitElements()
 {
     base.GetElement <UXLabel>("LabelBtnNext").Text = this.lang.Get("s_WhatsNextButton", new object[0]);
     this.holoPositioner      = base.GetElement <UXElement>("HoloHolder");
     this.nextButton          = base.GetElement <UXButton>("BtnNext");
     this.storeButton         = base.GetElement <UXButton>("ButtonStore");
     this.infoPanel           = base.GetElement <UXElement>("InfoItems");
     this.infoLabel           = base.GetElement <UXLabel>("LabelInfoItem");
     this.infoTexture         = base.GetElement <UXTexture>("SpriteInfoItem");
     this.infoPlanetTexture   = base.GetElement <UXTexture>("SpriteInfoItemPlanets");
     this.infoTitleLabel      = base.GetElement <UXLabel>("LabelInfoItemTitle");
     this.regularTextBoxGroup = base.GetElement <UXElement>("NpcDialogLarge");
     this.regularTitleLabel   = base.GetElement <UXLabel>("LabelNpcMessageBottomLeftTitleLarge");
     this.regularBodyLabel    = base.GetElement <UXLabel>("LabelNpcMessageBottomLeftBodyLarge");
     this.storeTextBoxGroup   = base.GetElement <UXElement>("NpcDialog");
     this.storeTitleLabel     = base.GetElement <UXLabel>("LabelNpcMessageBottomLeftTitle");
     this.storeBodyLabel      = base.GetElement <UXLabel>("LabelNpcMessageBottomLeftBody");
     this.HideAllElements();
 }