Ejemplo n.º 1
0
        public SquadWarInfoScreenRewardTab(SquadWarInfoScreen parent, UXCheckbox tabButton, UXElement topGroup) : base(parent, tabButton, topGroup)
        {
            FactionType faction = Service.CurrentPlayer.Faction;
            string      text    = (faction != FactionType.Rebel) ? GameConstants.WAR_HELP_REWARD_EMPIRE : GameConstants.WAR_HELP_REWARD_REBEL;

            string[] array = text.Split(new char[]
            {
                '|'
            });
            if (array.Length != 2)
            {
                Service.Logger.WarnFormat("GameConstant [War Help Reward {0}] is not formatted correctly: {1}", new object[]
                {
                    faction,
                    text
                });
                return;
            }
            base.PopulateBgTexture(array[0], "TextureReward");
            parent.GetElement <UXLabel>("LabelReward").Text = Service.Lang.Get(array[1], new object[0]);
        }
Ejemplo n.º 2
0
        public SquadWarInfoScreenOverviewTab(SquadWarInfoScreen parent, UXCheckbox tabButton, UXElement topGroup) : base(parent, tabButton, topGroup)
        {
            FactionType faction = Service.Get <CurrentPlayer>().Faction;
            string      text    = (faction == FactionType.Rebel) ? GameConstants.WAR_HELP_OVERVIEW_REBEL : GameConstants.WAR_HELP_OVERVIEW_EMPIRE;

            string[] array = text.Split(new char[]
            {
                '|'
            });
            if (array.Length != 2)
            {
                Service.Get <StaRTSLogger>().WarnFormat("GameConstant [War Help Overview {0}] is not formatted correctly: {1}", new object[]
                {
                    faction,
                    text
                });
                return;
            }
            base.PopulateBgTexture(array[0], "TextureOverview");
            parent.GetElement <UXLabel>("LabelOverview").Text = Service.Get <Lang>().Get(array[1], new object[0]);
        }