protected override void InitButtons()
        {
            base.InitButtons();
            this.buttonInstantBuy.Visible        = false;
            this.buttonUpgradeAllWalls.Visible   = true;
            this.buttonUpgradeAllWalls.Enabled   = (this.reqMet && GameConstants.ENABLE_UPGRADE_ALL_WALLS);
            this.buttonUpgradeAllWalls.OnClicked = new UXButtonClickedDelegate(this.OnUpgradeAllWallsButton);
            int crystals = GameUtils.CrystalCostToUpgradeAllWalls(this.nextBuildingInfo.UpgradeMaterials, this.allWallSameLevelCount);

            UXUtils.SetupSingleCostElement(this, "SecondaryCost", 0, 0, 0, crystals, 0, !this.reqMet, null);
        }
示例#2
0
 protected override void OnScreenLoaded()
 {
     base.OnScreenLoaded();
     this.movementSpeedGroup.LocalPosition         = this.unitCapacityGroup.LocalPosition;
     this.attackRangeGroup.LocalPosition           = this.trainingTimeGroup.LocalPosition;
     this.trainingTimeGroup.LocalPosition          = this.trainingCostGroup.LocalPosition;
     this.unitCapacityGroup.Visible                = false;
     this.trainingCostGroup.Visible                = false;
     this.trainingTimeNameLabel.Text               = this.lang.Get("s_RepairTime", new object[0]);
     base.GetElement <UXButton>("BtnBack").Visible = false;
     if (this.nextBuildingInfo != null)
     {
         this.labelUpgradeTime.Text = GameUtils.GetTimeLabelFromSeconds(this.nextBuildingInfo.UpgradeTime);
         if (this.showUpgradeControls)
         {
             UXUtils.SetupSingleCostElement(this, "Cost", this.nextBuildingInfo.UpgradeCredits, this.nextBuildingInfo.UpgradeMaterials, this.nextBuildingInfo.UpgradeContraband, 0, 0, false, null);
         }
     }
 }
示例#3
0
 private void SetupCreateCostButton()
 {
     UXUtils.SetupSingleCostElement(this, "Cost", GameConstants.SQUAD_CREATE_COST, 0, 0, 0, 0, false, null);
 }