Merge pull request #6 from lukiono/SDV_1.3_beta
Migration to SMAPI 2.6-beta.8
This commit is contained in:
commit
007452cf88
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue