Beispiel #1
0
        // Token: 0x06000F9C RID: 3996 RVA: 0x00140118 File Offset: 0x0013E318
        public override void draw(SpriteBatch b)
        {
            if (!this.onFarm && !Game1.dialogueUp && !Game1.globalFade)
            {
                b.Draw(Game1.fadeToBlackRect, Game1.graphics.GraphicsDevice.Viewport.Bounds, Color.Black * 0.75f);
                SpriteText.drawStringWithScrollBackground(b, "Livestock:", this.xPositionOnScreen + Game1.tileSize * 3 / 2, this.yPositionOnScreen, "", 1f, -1);
                Game1.drawDialogueBox(this.xPositionOnScreen, this.yPositionOnScreen, this.width, this.height, false, true, null, false);
                Game1.dayTimeMoneyBox.drawMoneyBox(b, -1, -1);
                using (List <ClickableTextureComponent> .Enumerator enumerator = this.animalsToPurchase.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        ClickableTextureComponent c = enumerator.Current;
                        c.draw(b, ((c.item as Object).type != null) ? (Color.Black * 0.4f) : Color.White, 0.87f);
                    }
                    goto IL_297;
                }
            }
            if (!Game1.globalFade && this.onFarm)
            {
                string s = "Choose a " + this.animalBeingPurchased.buildingTypeILiveIn + " for your new " + this.animalBeingPurchased.type.Split(new char[]
                {
                    ' '
                }).Last <string>();
                SpriteText.drawStringWithScrollBackground(b, s, Game1.viewport.Width / 2 - SpriteText.getWidthOfString(s) / 2, Game1.tileSize / 4, "", 1f, -1);
                if (this.namingAnimal)
                {
                    b.Draw(Game1.fadeToBlackRect, Game1.graphics.GraphicsDevice.Viewport.Bounds, Color.Black * 0.75f);
                    Game1.drawDialogueBox(Game1.viewport.Width / 2 - Game1.tileSize * 4, Game1.viewport.Height / 2 - Game1.tileSize * 3 - Game1.tileSize / 2, Game1.tileSize * 8, Game1.tileSize * 3, false, true, null, false);
                    Utility.drawTextWithShadow(b, "Name your new animal: ", Game1.dialogueFont, new Vector2((float)(Game1.viewport.Width / 2 - Game1.tileSize * 4 + Game1.tileSize / 2 + 8), (float)(Game1.viewport.Height / 2 - Game1.tileSize * 2 + 8)), Game1.textColor, 1f, -1f, -1, -1, 1f, 3);
                    this.textBox.Draw(b);
                    this.doneNamingButton.draw(b);
                    this.randomButton.draw(b);
                }
            }
IL_297:
            if (!Game1.globalFade && this.okButton != null)
            {
                this.okButton.draw(b);
            }
            if (this.hovered != null)
            {
                if ((this.hovered.item as Object).type != null)
                {
                    IClickableMenu.drawHoverText(b, Game1.parseText((this.hovered.item as Object).type, Game1.dialogueFont, Game1.tileSize * 5), Game1.dialogueFont, 0, 0, -1, null, -1, null, null, 0, -1, -1, -1, -1, 1f, null);
                }
                else
                {
                    SpriteText.drawStringWithScrollBackground(b, this.hovered.hoverText, this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + Game1.tileSize, this.yPositionOnScreen + this.height + -Game1.tileSize / 2 + IClickableMenu.spaceToClearTopBorder / 2 + 8, "Truffle Pig", 1f, -1);
                    SpriteText.drawStringWithScrollBackground(b, "$" + this.hovered.name + "g", this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + Game1.tileSize * 2, this.yPositionOnScreen + this.height + Game1.tileSize + IClickableMenu.spaceToClearTopBorder / 2 + 8, "$99999g", (Game1.player.Money >= Convert.ToInt32(this.hovered.name)) ? 1f : 0.5f, -1);
                    IClickableMenu.drawHoverText(b, Game1.parseText(PurchaseAnimalsMenu.getAnimalDescription(this.hovered.hoverText), Game1.smallFont, Game1.tileSize * 5), Game1.smallFont, 0, 0, -1, this.hovered.hoverText, -1, null, null, 0, -1, -1, -1, -1, 1f, null);
                }
            }
            base.drawMouse(b);
        }
Beispiel #2
0
 public override void draw(SpriteBatch b)
 {
     if (!this.onFarm && !Game1.dialogueUp && !Game1.globalFade)
     {
         b.Draw(Game1.fadeToBlackRect, Game1.graphics.GraphicsDevice.Viewport.Bounds, Color.Black * 0.75f);
         SpriteText.drawStringWithScrollBackground(b, Game1.content.LoadString("Strings\\StringsFromCSFiles:PurchaseAnimalsMenu.cs.11354"), this.xPositionOnScreen + Game1.tileSize * 3 / 2, this.yPositionOnScreen, "", 1f, -1);
         Game1.drawDialogueBox(this.xPositionOnScreen, this.yPositionOnScreen, this.width, this.height, false, true, (string)null, false);
         Game1.dayTimeMoneyBox.drawMoneyBox(b, -1, -1);
         foreach (ClickableTextureComponent textureComponent in this.animalsToPurchase)
         {
             textureComponent.draw(b, (textureComponent.item as StardewValley.Object).type != null ? Color.Black * 0.4f : Color.White, 0.87f);
         }
     }
     else if (!Game1.globalFade && this.onFarm)
     {
         string s = Game1.content.LoadString("Strings\\StringsFromCSFiles:PurchaseAnimalsMenu.cs.11355", (object)this.animalBeingPurchased.displayHouse, (object)this.animalBeingPurchased.displayType);
         SpriteText.drawStringWithScrollBackground(b, s, Game1.viewport.Width / 2 - SpriteText.getWidthOfString(s) / 2, Game1.tileSize / 4, "", 1f, -1);
         if (this.namingAnimal)
         {
             b.Draw(Game1.fadeToBlackRect, Game1.graphics.GraphicsDevice.Viewport.Bounds, Color.Black * 0.75f);
             Game1.drawDialogueBox(Game1.viewport.Width / 2 - Game1.tileSize * 4, Game1.viewport.Height / 2 - Game1.tileSize * 3 - Game1.tileSize / 2, Game1.tileSize * 8, Game1.tileSize * 3, false, true, (string)null, false);
             Utility.drawTextWithShadow(b, Game1.content.LoadString("Strings\\StringsFromCSFiles:PurchaseAnimalsMenu.cs.11357"), Game1.dialogueFont, new Vector2((float)(Game1.viewport.Width / 2 - Game1.tileSize * 4 + Game1.tileSize / 2 + 8), (float)(Game1.viewport.Height / 2 - Game1.tileSize * 2 + 8)), Game1.textColor, 1f, -1f, -1, -1, 1f, 3);
             this.textBox.Draw(b);
             this.doneNamingButton.draw(b);
             this.randomButton.draw(b);
         }
     }
     if (!Game1.globalFade && this.okButton != null)
     {
         this.okButton.draw(b);
     }
     if (this.hovered != null)
     {
         if ((this.hovered.item as StardewValley.Object).type != null)
         {
             IClickableMenu.drawHoverText(b, Game1.parseText((this.hovered.item as StardewValley.Object).type, Game1.dialogueFont, Game1.tileSize * 5), Game1.dialogueFont, 0, 0, -1, (string)null, -1, (string[])null, (Item)null, 0, -1, -1, -1, -1, 1f, (CraftingRecipe)null);
         }
         else
         {
             string animalTitle = PurchaseAnimalsMenu.getAnimalTitle(this.hovered.hoverText);
             SpriteText.drawStringWithScrollBackground(b, animalTitle, this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + Game1.tileSize, this.yPositionOnScreen + this.height + -Game1.tileSize / 2 + IClickableMenu.spaceToClearTopBorder / 2 + 8, "Truffle Pig", 1f, -1);
             SpriteText.drawStringWithScrollBackground(b, "$" + Game1.content.LoadString("Strings\\StringsFromCSFiles:LoadGameMenu.cs.11020", (object)this.hovered.item.salePrice()), this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + Game1.tileSize * 2, this.yPositionOnScreen + this.height + Game1.tileSize + IClickableMenu.spaceToClearTopBorder / 2 + 8, "$99999999g", (float)(Game1.player.Money >= this.hovered.item.salePrice() ? 1.0 : 0.5), -1);
             string animalDescription = PurchaseAnimalsMenu.getAnimalDescription(this.hovered.hoverText);
             IClickableMenu.drawHoverText(b, Game1.parseText(animalDescription, Game1.smallFont, Game1.tileSize * 5), Game1.smallFont, 0, 0, -1, animalTitle, -1, (string[])null, (Item)null, 0, -1, -1, -1, -1, 1f, (CraftingRecipe)null);
         }
     }
     Game1.mouseCursorTransparency = 1f;
     this.drawMouse(b);
 }