Rewrite for AnimalQueryMenu
This commit is contained in:
parent
739bb4ee37
commit
3086a3833c
|
@ -0,0 +1,78 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.Xna.Framework;
|
||||
using StardewValley;
|
||||
using StardewValley.Menus;
|
||||
|
||||
namespace StardewModdingAPI.Framework.RewriteFacades
|
||||
{
|
||||
public class AnimalQueryMenuMethods : AnimalQueryMenu
|
||||
{
|
||||
public AnimalQueryMenuMethods(FarmAnimal animal) : base(animal)
|
||||
{
|
||||
}
|
||||
|
||||
public ClickableTextureComponent AllowReproductionButtonProp
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.allowReproductionButton != null)
|
||||
{
|
||||
return new ClickableTextureComponent(this.allowReproductionButton.bounds, Game1.mouseCursors, new Rectangle(0x80, 0x189, 9, 9), this.allowReproductionButton.scale, false);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
this.allowReproductionButton = new ClickableComponent(value.bounds, "reproButton");
|
||||
}
|
||||
this.allowReproductionButton = null;
|
||||
}
|
||||
}
|
||||
|
||||
public ClickableTextureComponent SellButtonProp
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.sellButton != null)
|
||||
{
|
||||
return new ClickableTextureComponent(this.sellButton.bounds, Game1.mouseCursors, new Rectangle(0, 0x180, 0x10, 0x10), this.sellButton.scale, false);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
this.sellButton = new ClickableComponent(value.bounds, "sellButton");
|
||||
}
|
||||
this.sellButton = null;
|
||||
}
|
||||
}
|
||||
|
||||
public ClickableTextureComponent MoveHomeButtonProp
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.moveHomeButton != null)
|
||||
{
|
||||
return new ClickableTextureComponent(this.moveHomeButton.bounds, Game1.mouseCursors, new Rectangle(0x10, 0x180, 0x10, 0x10), this.moveHomeButton.scale, false);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
this.moveHomeButton = new ClickableComponent(value.bounds, "moveHomeButton");
|
||||
}
|
||||
this.moveHomeButton = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -68,6 +68,9 @@ namespace StardewModdingAPI.Metadata
|
|||
yield return new TypeFieldToAnotherTypePropertyRewriter(typeof(ShopMenu), typeof(ShopMenuMethods), "forSale", "ForSaleProp");
|
||||
yield return new TypeFieldToAnotherTypePropertyRewriter(typeof(MenuWithInventory), typeof(MenuWithInventoryMethods), "trashCan", "TrashCanProp");
|
||||
yield return new TypeFieldToAnotherTypePropertyRewriter(typeof(ItemGrabMenu), typeof(ItemGrabMenuMethods), "fillStacksButton", "FillStacksButtonProp");
|
||||
yield return new TypeFieldToAnotherTypePropertyRewriter(typeof(AnimalQueryMenu), typeof(AnimalQueryMenuMethods), "allowReproductionButton", "AllowReproductionButtonProp");
|
||||
yield return new TypeFieldToAnotherTypePropertyRewriter(typeof(AnimalQueryMenu), typeof(AnimalQueryMenuMethods), "sellButton", "SellButtonProp");
|
||||
yield return new TypeFieldToAnotherTypePropertyRewriter(typeof(AnimalQueryMenu), typeof(AnimalQueryMenuMethods), "moveHomeButton", "MoveHomeButtonProp");
|
||||
|
||||
// Rewrite Missing Type
|
||||
yield return new TypeReferenceRewriter("StardewValley.Menus.CraftingPage", typeof(CraftingPageMobile));
|
||||
|
|
|
@ -262,6 +262,7 @@
|
|||
<Compile Include="Framework\RewriteFacades\CraftingPageMobileMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\DialogueBoxMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\DayTimeMoneyBoxMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\AnimalQueryMenuMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\ShopMenuMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\FarmerMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\FarmerRenderMethods.cs" />
|
||||
|
|
Loading…
Reference in New Issue