-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
Submodule ECommons
updated
from 89a1e9 to 86a2aa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Dalamud.Game.Addon.Lifecycle; | ||
using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; | ||
using ECommons.Automation; | ||
using YesAlready.BaseFeatures; | ||
|
||
namespace YesAlready.Features; | ||
internal class BannerPreview : BaseFeature | ||
{ | ||
public override void Enable() | ||
{ | ||
base.Enable(); | ||
Svc.AddonLifecycle.RegisterListener(AddonEvent.PostSetup, "BannerPreview", AddonSetup); | ||
} | ||
|
||
public override void Disable() | ||
{ | ||
base.Disable(); | ||
Svc.AddonLifecycle.UnregisterListener(AddonSetup); | ||
} | ||
|
||
protected static unsafe void AddonSetup(AddonEvent eventType, AddonArgs addonInfo) | ||
{ | ||
if (!P.Active || !P.Config.BannerPreviewUpdate) return; | ||
Callback.Fire(addonInfo.Base(), true, 0); | ||
// FIX: this causes a "Character not in frame error" when done PostSetup ... somehow | ||
//new AddonMaster.BannerPreview(addonInfo.Base()).Update(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters