DeadlyBossMods / DBM-Unified

The heart of DBM. This contains the parts of Core, GUI, and DBT that allow all versions of DBM to function.
11 stars 19 forks source link

[Feature] Nameplate Cooldown Icons Continued #295

Open MysticalOS opened 1 year ago

MysticalOS commented 1 year ago
cont1nuity commented 1 year ago

Maybe: additional option to separate growth direction from anchor. The current name of the option is misleading towards what it actually does: setting the growth direction for the icons AND anchoring.

cont1nuity commented 1 year ago
  • Add a test mode that can be triggered via button I'll put in GUI so users can test their settings, including a callback so if Plater is being used instead of DBM, Plater can be put into test mode via DBMs button sending request.

This is done in Plater and prepared for DBM.

MysticalOS commented 1 year ago

Performance note. Nameplates registers callbacks even if it doesn't need to (ie plater installed). They return end if not actually being used but it's a small micro optimize to avoid registering them at all just to go "nevermind" every event.

TODO:

  1. Register callback and unregister callback wrapper function made that basically says "if enabled and (not handoff or not plater) and callbacks not registered then register callbacks. and the reverse check for if callbacks registered and toggle is off yada yada unregister them. Able to be called externally so function can run on UI option toggle in the GUI
  2. On module initialized used to also call above function to register callbacks on load.
MysticalOS commented 1 year ago

Err wait, nameplates isn't even a module so doesn't have OnModuleLoad ability :D wonder if nameplates should be moved to modular code. Probably too much refactoring to do that (and it might not even be efficient to do so), so guess it'd just need it's own onload check.

cont1nuity commented 1 year ago

I think the hand-off change to not register if another addon is present might make sense. Question is: when do we register (or not)? Do we want to listen to "ADDON_LOADED" here? Or simply un-register once we hit a hand-off situation?

cont1nuity commented 8 months ago

As a note: I have not seen any errors in the callbacks.

cont1nuity commented 8 months ago

First two points are taken care of in #359