Fixed mouse disappearing in one case. Updated version info.
This commit is contained in:
parent
e1fabeb4d5
commit
b785ecae04
|
@ -79,6 +79,7 @@ namespace UIInfoSuite
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
}
|
}
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
|
writer.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.7.18.0")]
|
[assembly: AssemblyVersion("1.7.20.0")]
|
||||||
[assembly: AssemblyFileVersion("1.7.18.0")]
|
[assembly: AssemblyFileVersion("1.7.20.0")]
|
||||||
|
|
|
@ -28,6 +28,7 @@ namespace UIInfoSuite.UIElements
|
||||||
private const int MaxBarWidth = 175;
|
private const int MaxBarWidth = 175;
|
||||||
|
|
||||||
private int[] _currentExperience = new int[5];
|
private int[] _currentExperience = new int[5];
|
||||||
|
private int[] _currentLevelExtenderExperience = new int[5];
|
||||||
private readonly List<ExperiencePointDisplay> _experiencePointDisplays = new List<ExperiencePointDisplay>();
|
private readonly List<ExperiencePointDisplay> _experiencePointDisplays = new List<ExperiencePointDisplay>();
|
||||||
private readonly TimeSpan _levelUpPauseTime = TimeSpan.FromSeconds(2);
|
private readonly TimeSpan _levelUpPauseTime = TimeSpan.FromSeconds(2);
|
||||||
private readonly Color _iconColor = Color.White;
|
private readonly Color _iconColor = Color.White;
|
||||||
|
@ -75,7 +76,7 @@ namespace UIInfoSuite.UIElements
|
||||||
helper.Events.Display.RenderingHud += OnRenderingHud;
|
helper.Events.Display.RenderingHud += OnRenderingHud;
|
||||||
helper.Events.Player.Warped += OnWarped_RemoveAllExperiencePointDisplays;
|
helper.Events.Player.Warped += OnWarped_RemoveAllExperiencePointDisplays;
|
||||||
|
|
||||||
//var something = _helper.ModRegistry.GetApi("DevinLematty.LevelExtender");
|
var something = _helper.ModRegistry.GetApi("DevinLematty.LevelExtender");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_levelExtenderAPI = _helper.ModRegistry.GetApi<LevelExtenderInterface>("DevinLematty.LevelExtender");
|
_levelExtenderAPI = _helper.ModRegistry.GetApi<LevelExtenderInterface>("DevinLematty.LevelExtender");
|
||||||
|
@ -145,12 +146,19 @@ namespace UIInfoSuite.UIElements
|
||||||
_currentExperience[i] = Game1.player.experiencePoints[i];
|
_currentExperience[i] = Game1.player.experiencePoints[i];
|
||||||
_showExperienceGain = showExperienceGain;
|
_showExperienceGain = showExperienceGain;
|
||||||
|
|
||||||
|
if (_levelExtenderAPI != null)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < _currentLevelExtenderExperience.Length; ++i)
|
||||||
|
_currentLevelExtenderExperience[i] = _levelExtenderAPI.currentXP()[i];
|
||||||
|
}
|
||||||
|
|
||||||
if (showExperienceGain)
|
if (showExperienceGain)
|
||||||
{
|
{
|
||||||
_helper.Events.GameLoop.UpdateTicked += OnUpdateTicked_DetermineIfExperienceHasBeenGained;
|
_helper.Events.GameLoop.UpdateTicked += OnUpdateTicked_DetermineIfExperienceHasBeenGained;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void ToggleShowExperienceBar(bool showExperienceBar)
|
public void ToggleShowExperienceBar(bool showExperienceBar)
|
||||||
{
|
{
|
||||||
_helper.Events.GameLoop.UpdateTicked -= OnUpdateTicked_DetermineIfExperienceHasBeenGained;
|
_helper.Events.GameLoop.UpdateTicked -= OnUpdateTicked_DetermineIfExperienceHasBeenGained;
|
||||||
|
@ -241,9 +249,15 @@ namespace UIInfoSuite.UIElements
|
||||||
|
|
||||||
int currentLevelIndex = -1;
|
int currentLevelIndex = -1;
|
||||||
|
|
||||||
|
int[] levelExtenderExperience = null;
|
||||||
|
if (_levelExtenderAPI != null)
|
||||||
|
levelExtenderExperience = _levelExtenderAPI.currentXP();
|
||||||
|
|
||||||
for (int i = 0; i < _currentExperience.Length; ++i)
|
for (int i = 0; i < _currentExperience.Length; ++i)
|
||||||
{
|
{
|
||||||
if (_currentExperience[i] != Game1.player.experiencePoints[i])
|
if (_currentExperience[i] != Game1.player.experiencePoints[i] ||
|
||||||
|
(_levelExtenderAPI != null &&
|
||||||
|
_currentLevelExtenderExperience[i] != levelExtenderExperience[i]))
|
||||||
{
|
{
|
||||||
currentLevelIndex = i;
|
currentLevelIndex = i;
|
||||||
break;
|
break;
|
||||||
|
@ -312,14 +326,31 @@ namespace UIInfoSuite.UIElements
|
||||||
if (_showExperienceGain &&
|
if (_showExperienceGain &&
|
||||||
_experienceRequiredToLevel > 0)
|
_experienceRequiredToLevel > 0)
|
||||||
{
|
{
|
||||||
_experiencePointDisplays.Add(
|
int currentExperienceToUse = Game1.player.experiencePoints[currentLevelIndex];
|
||||||
new ExperiencePointDisplay(
|
int previousExperienceToUse = _currentExperience[currentLevelIndex];
|
||||||
Game1.player.experiencePoints[currentLevelIndex] - _currentExperience[currentLevelIndex],
|
if (_levelExtenderAPI != null &&
|
||||||
Game1.player.getLocalPosition(Game1.viewport)));
|
_currentSkillLevel > 9)
|
||||||
|
{
|
||||||
|
currentExperienceToUse = _levelExtenderAPI.currentXP()[currentLevelIndex];
|
||||||
|
previousExperienceToUse = _currentLevelExtenderExperience[currentLevelIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
int experienceGain = currentExperienceToUse - previousExperienceToUse;
|
||||||
|
|
||||||
|
if (experienceGain > 0)
|
||||||
|
{
|
||||||
|
_experiencePointDisplays.Add(
|
||||||
|
new ExperiencePointDisplay(
|
||||||
|
experienceGain,
|
||||||
|
Game1.player.getLocalPosition(Game1.viewport)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_currentExperience[currentLevelIndex] = Game1.player.experiencePoints[currentLevelIndex];
|
_currentExperience[currentLevelIndex] = Game1.player.experiencePoints[currentLevelIndex];
|
||||||
|
|
||||||
|
if (_levelExtenderAPI != null)
|
||||||
|
_currentLevelExtenderExperience[currentLevelIndex] = _levelExtenderAPI.currentXP()[currentLevelIndex];
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (_previousItem != currentItem)
|
else if (_previousItem != currentItem)
|
||||||
{
|
{
|
||||||
|
|
|
@ -495,22 +495,25 @@ namespace UIInfoSuite.UIElements
|
||||||
4),
|
4),
|
||||||
Color.BurlyWood);
|
Color.BurlyWood);
|
||||||
}
|
}
|
||||||
//Game1.spriteBatch.Draw(
|
if (!Game1.options.hardwareCursor)
|
||||||
// Game1.mouseCursors,
|
{
|
||||||
// new Vector2(
|
Game1.spriteBatch.Draw(
|
||||||
// Game1.getMouseX(),
|
Game1.mouseCursors,
|
||||||
// Game1.getMouseY()),
|
new Vector2(
|
||||||
// Game1.getSourceRectForStandardTileSheet(
|
Game1.getMouseX(),
|
||||||
// Game1.mouseCursors,
|
Game1.getMouseY()),
|
||||||
// Game1.mouseCursor,
|
Game1.getSourceRectForStandardTileSheet(
|
||||||
// 16,
|
Game1.mouseCursors,
|
||||||
// 16),
|
Game1.mouseCursor,
|
||||||
// Color.White,
|
16,
|
||||||
// 0.0f,
|
16),
|
||||||
// Vector2.Zero,
|
Color.White,
|
||||||
// Game1.pixelZoom + (Game1.dialogueButtonScale / 150.0f),
|
0.0f,
|
||||||
// SpriteEffects.None,
|
Vector2.Zero,
|
||||||
// 1f);
|
Game1.pixelZoom + (Game1.dialogueButtonScale / 150.0f),
|
||||||
|
SpriteEffects.None,
|
||||||
|
1f);
|
||||||
|
}
|
||||||
|
|
||||||
if (checkbox.bounds.Contains(Game1.getMouseX(), Game1.getMouseY()))
|
if (checkbox.bounds.Contains(Game1.getMouseX(), Game1.getMouseY()))
|
||||||
IClickableMenu.drawHoverText(
|
IClickableMenu.drawHoverText(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"Name": "UI Info Suite",
|
"Name": "UI Info Suite",
|
||||||
"Author": "Cdaragorn",
|
"Author": "Cdaragorn",
|
||||||
"Version": "1.7.18",
|
"Version": "1.7.20",
|
||||||
"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.",
|
||||||
"UniqueID": "Cdaragorn.UiInfoSuite",
|
"UniqueID": "Cdaragorn.UiInfoSuite",
|
||||||
"EntryDll": "UIInfoSuite.dll",
|
"EntryDll": "UIInfoSuite.dll",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Pathoschild.Stardew.ModBuildConfig" version="2.2.0" targetFramework="net45" />
|
||||||
|
</packages>
|
Loading…
Reference in New Issue