Fixed animal pet and milk icon positions when outdoors.
This commit is contained in:
parent
2ebade76be
commit
803788a1d3
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.7.0")]
|
[assembly: AssemblyVersion("1.2.8.0")]
|
||||||
[assembly: AssemblyFileVersion("1.2.7.0")]
|
[assembly: AssemblyFileVersion("1.2.8.0")]
|
||||||
|
|
|
@ -96,7 +96,7 @@ namespace UIInfoSuite.UIElements
|
||||||
if (e.NewLocation is AnimalHouse ||
|
if (e.NewLocation is AnimalHouse ||
|
||||||
e.NewLocation is Farm)
|
e.NewLocation is Farm)
|
||||||
{
|
{
|
||||||
_timer.Interval = 5000;
|
_timer.Interval = 1000;
|
||||||
_timer.Start();
|
_timer.Start();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -118,6 +118,7 @@ namespace UIInfoSuite.UIElements
|
||||||
|
|
||||||
private void StartDrawingPetNeeds(object sender, ElapsedEventArgs e)
|
private void StartDrawingPetNeeds(object sender, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
|
_timer.Stop();
|
||||||
GraphicsEvents.OnPreRenderHudEvent += DrawNeedsPetTooltip;
|
GraphicsEvents.OnPreRenderHudEvent += DrawNeedsPetTooltip;
|
||||||
GameEvents.SecondUpdateTick += UpdatePetDraw;
|
GameEvents.SecondUpdateTick += UpdatePetDraw;
|
||||||
_scale = 4f;
|
_scale = 4f;
|
||||||
|
@ -139,6 +140,7 @@ namespace UIInfoSuite.UIElements
|
||||||
if (_alpha < 0.1f)
|
if (_alpha < 0.1f)
|
||||||
{
|
{
|
||||||
StopDrawingPetNeeds();
|
StopDrawingPetNeeds();
|
||||||
|
_timer.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,8 +189,8 @@ namespace UIInfoSuite.UIElements
|
||||||
!_helper.Reflection.GetPrivateField<bool>(character, "wasPetToday").GetValue())
|
!_helper.Reflection.GetPrivateField<bool>(character, "wasPetToday").GetValue())
|
||||||
{
|
{
|
||||||
Vector2 positionAboveAnimal = GetPetPositionAboveAnimal(character);
|
Vector2 positionAboveAnimal = GetPetPositionAboveAnimal(character);
|
||||||
positionAboveAnimal.X += 60f;
|
positionAboveAnimal.X += 50f;
|
||||||
positionAboveAnimal.Y -= 70f;
|
positionAboveAnimal.Y -= 20f;
|
||||||
Game1.spriteBatch.Draw(
|
Game1.spriteBatch.Draw(
|
||||||
Game1.mouseCursors,
|
Game1.mouseCursors,
|
||||||
new Vector2(positionAboveAnimal.X, positionAboveAnimal.Y + _yMovementPerDraw),
|
new Vector2(positionAboveAnimal.X, positionAboveAnimal.Y + _yMovementPerDraw),
|
||||||
|
@ -205,8 +207,8 @@ namespace UIInfoSuite.UIElements
|
||||||
|
|
||||||
private Vector2 GetPetPositionAboveAnimal(Character animal)
|
private Vector2 GetPetPositionAboveAnimal(Character animal)
|
||||||
{
|
{
|
||||||
return new Vector2(Game1.viewport.Width <= Game1.currentLocation.map.DisplayWidth ? animal.position.X - Game1.viewport.X - 16 : animal.position.X + ((Game1.viewport.Width - Game1.currentLocation.map.DisplayWidth) / 2 + 18),
|
return new Vector2(Game1.viewport.Width <= Game1.currentLocation.map.DisplayWidth ? animal.position.X - Game1.viewport.X + 16 : animal.position.X + ((Game1.viewport.Width - Game1.currentLocation.map.DisplayWidth) / 2 + 18),
|
||||||
Game1.viewport.Height <= Game1.currentLocation.map.DisplayHeight ? animal.position.Y - Game1.viewport.Y + 54 : animal.position.Y + ((Game1.viewport.Height - Game1.currentLocation.map.DisplayHeight) / 2 - 50));
|
Game1.viewport.Height <= Game1.currentLocation.map.DisplayHeight ? animal.position.Y - Game1.viewport.Y - 34 : animal.position.Y + ((Game1.viewport.Height - Game1.currentLocation.map.DisplayHeight) / 2 - 50));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dictionary<long, FarmAnimal> GetAnimalsInCurrentLocation()
|
private Dictionary<long, FarmAnimal> GetAnimalsInCurrentLocation()
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"Version": {
|
"Version": {
|
||||||
"MajorVersion": 1,
|
"MajorVersion": 1,
|
||||||
"MinorVersion": 2,
|
"MinorVersion": 2,
|
||||||
"PatchVersion": 7,
|
"PatchVersion": 8,
|
||||||
"Build": null
|
"Build": null
|
||||||
},
|
},
|
||||||
"Description": "Adds a lot of useful information to the user interface. This is based on Demiacle's excellent UIModSuite.",
|
"Description": "Adds a lot of useful information to the user interface. This is based on Demiacle's excellent UIModSuite.",
|
||||||
|
|
Loading…
Reference in New Issue