Merge pull request #6 from lukiono/SDV_1.3_beta

Migration to SMAPI 2.6-beta.8
This commit is contained in:
cdaragorn 2018-05-07 11:06:01 -06:00 committed by GitHub
commit 007452cf88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 17 deletions

View File

@ -62,14 +62,14 @@ namespace UIInfoSuite.UIElements
}
_timeToDisappear.Elapsed += StopTimerAndFadeBarOut;
GraphicsEvents.OnPreRenderHudEvent += OnPreRenderHudEvent;
LocationEvents.CurrentLocationChanged += RemoveAllExperiencePointDisplays;
PlayerEvents.Warped += RemoveAllExperiencePointDisplays;
}
public void Dispose()
{
PlayerEvents.LeveledUp -= OnLevelUp;
GraphicsEvents.OnPreRenderHudEvent -= OnPreRenderHudEvent;
LocationEvents.CurrentLocationChanged -= RemoveAllExperiencePointDisplays;
PlayerEvents.Warped -= RemoveAllExperiencePointDisplays;
_timeToDisappear.Stop();
_timeToDisappear.Dispose();
}
@ -98,12 +98,12 @@ namespace UIInfoSuite.UIElements
public void ToggleShowExperienceBar(bool showExperienceBar)
{
//GraphicsEvents.OnPreRenderHudEvent -= OnPreRenderHudEvent;
//LocationEvents.CurrentLocationChanged -= RemoveAllExperiencePointDisplays;
//PlayerEvents.Warped -= RemoveAllExperiencePointDisplays;
_showExperienceBar = showExperienceBar;
//if (showExperienceBar)
//{
// GraphicsEvents.OnPreRenderHudEvent += OnPreRenderHudEvent;
// LocationEvents.CurrentLocationChanged += RemoveAllExperiencePointDisplays;
// PlayerEvents.Warped += RemoveAllExperiencePointDisplays;
//}
}
@ -161,7 +161,7 @@ namespace UIInfoSuite.UIElements
_experienceBarShouldBeVisible = false;
}
private void RemoveAllExperiencePointDisplays(object sender, EventArgsCurrentLocationChanged e)
private void RemoveAllExperiencePointDisplays(object sender, EventArgsPlayerWarped e)
{
_experiencePointDisplays.Clear();
}

View File

@ -21,7 +21,7 @@ namespace UIInfoSuite.UIElements
public void Toggle(bool showLuckOfDay)
{
LocationEvents.CurrentLocationChanged -= AdjustIconXToBlackBorder;
PlayerEvents.Warped -= AdjustIconXToBlackBorder;
GraphicsEvents.OnPreRenderHudEvent -= DrawDiceIcon;
GraphicsEvents.OnPostRenderHudEvent -= DrawHoverTextOverEverything;
GameEvents.HalfSecondTick -= CalculateLuck;
@ -29,7 +29,7 @@ namespace UIInfoSuite.UIElements
if (showLuckOfDay)
{
AdjustIconXToBlackBorder(null, null);
LocationEvents.CurrentLocationChanged += AdjustIconXToBlackBorder;
PlayerEvents.Warped += AdjustIconXToBlackBorder;
GameEvents.HalfSecondTick += CalculateLuck;
GraphicsEvents.OnPreRenderHudEvent += DrawDiceIcon;
GraphicsEvents.OnPostRenderHudEvent += DrawHoverTextOverEverything;
@ -93,7 +93,7 @@ namespace UIInfoSuite.UIElements
}
}
private void AdjustIconXToBlackBorder(object sender, EventArgsCurrentLocationChanged e)
private void AdjustIconXToBlackBorder(object sender, EventArgsPlayerWarped e)
{
_icon = new ClickableTextureComponent("",
new Rectangle(Tools.GetWidthInPlayArea() - 134,

View File

@ -33,13 +33,13 @@ namespace UIInfoSuite.UIElements
public void ToggleOption(bool showWhenAnimalNeedsPet)
{
_timer.Stop();
LocationEvents.CurrentLocationChanged -= OnLocationChange;
PlayerEvents.Warped -= OnLocationChange;
GraphicsEvents.OnPreRenderHudEvent -= DrawAnimalHasProduct;
if (showWhenAnimalNeedsPet)
{
_timer.Start();
LocationEvents.CurrentLocationChanged += OnLocationChange;
PlayerEvents.Warped += OnLocationChange;
GraphicsEvents.OnPreRenderHudEvent += DrawAnimalHasProduct;
}
}
@ -95,7 +95,7 @@ namespace UIInfoSuite.UIElements
}
}
private void OnLocationChange(object sender, EventArgsCurrentLocationChanged e)
private void OnLocationChange(object sender, EventArgsPlayerWarped e)
{
if (e.NewLocation is AnimalHouse ||
e.NewLocation is Farm)

View File

@ -1,12 +1,7 @@
{
"Name": "UI Info Suite",
"Author": "Cdaragorn",
"Version": {
"MajorVersion": 1,
"MinorVersion": 7,
"PatchVersion": 1,
"Build": null
},
"Version": "1.7.2",
"Description": "Adds a lot of useful information to the user interface. This is based on Demiacle's excellent UIModSuite.",
"UniqueID": "Cdaragorn.UiInfoSuite",
"EntryDll": "UIInfoSuite.dll",