Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

borders for the item icon and aura icons + various options relating to that #48

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

NoBetaBoredom
Copy link
Contributor

@NoBetaBoredom NoBetaBoredom commented Feb 7, 2022

I implemented borders for the item icon and the aura icons. It just copies the borderstyle of the parent tooltip. Additionally I added various options for the auras:

  • X and Y offsets for the aura icons
  • border colors, either copy the border color of the parent tooltip, or set custom colors for buffs and debuffs
  • current behaviour with only debuffs having a border is still available

The borders are pixel-perfect and align perfectly with the parent tooltip, no shuffling or jumping at all. Max aura count per row etc. also works.

This includes #47 if you want to merge both, otherwise I can rebase this later if this is not acceptable yet.

How my tooltips look now as an example (censored):
example
example

Edit: additional changes in this branch:

  • option to use the default blizz colors instead (DebuffTypeColor)
  • positive insets correctly work for aura and item icons
  • comparing items are positioned with item icons in mind
  • tooltip item and aura icons are also clamped to the screen now

@NoBetaBoredom
Copy link
Contributor Author

NoBetaBoredom commented Feb 9, 2022

I also fixed item comparisons, they now take the itemicon and position into account:
itemcomparison

Let me know if you want me to split this into different PRs.

Edit: now works on retail too, I only tested on tbcc initially. I also noticed that the first line of text in tooltips is a bit jumpy only on retail, not sure why.
Edit2: nvm, the jumpiness goes away once I activate the "UI Scale" option in the graphics settings - perfect again!

@frozn
Copy link
Owner

frozn commented Feb 9, 2022

I pushed out a new release (v22.02.09) to a) make available the latest bugfixes to stabilize the actual version and b) freeze this version before I include your extensive changes, because I will need some time for that. 💪

@NoBetaBoredom
Copy link
Contributor Author

NoBetaBoredom commented Feb 20, 2022

I went ahead and made pixel-perfect scaling/positioning/offsets for the aura icons an option, since you probably wouldn't have added it as default.
Also changed the implementation to just scaling the aura frames themselves. Cleaner, but not as clean as I want it to be, especially for calculating the clamping rect. I tried to implement clamping by setting the icons themselves to be clamped, but unfortunately that just makes them move away from their anchor instead. Not sure if it's possible to clamp 2 anchored frames that keep their anchors/offsets.

@glassleo
Copy link

How about adding Masque support instead? It'd be really nice if I could have my tooltip icons match the rest of my UI.

@frozn
Copy link
Owner

frozn commented Feb 20, 2022

Looks interesting. I would move this enhancement to a separate issue. I think displaying and styling of tooltip icons/auras should work out of the box without an external library by default. Using Masque would be optional (e.g. would add a checkbox for it in options).

@frozn frozn added 1_enhancement New feature or request 2_to develop Development can begin labels Feb 20, 2022
@glassleo
Copy link

Looks interesting. I would move this enhancement to a separate issue. I think displaying and styling of tooltip icons/auras should work out of the box without an external library by default. Using Masque would be optional (e.g. would add a checkbox for it in options).

More options are not bad, but instead of doing all this work you could just implement Masque which does all of this out of the box with way more customization. It is widely supported by most major addons that have any sort of icon displays (WeakAuras, Bartender, OPie, Raven, etc, etc) so many people already use it for other addons... No need to reinvent the wheel.

@frozn
Copy link
Owner

frozn commented Feb 20, 2022

I have taken a look at WeakAuras and Bartender4. Masque is an optional dependency here. They have also implemented an alternative way of displaying the buttons if Masque is missing.

But I know what you mean... 😉

@NoBetaBoredom
Copy link
Contributor Author

No need to reinvent the wheel.

It's work that has to be done anyways, it just adds borders that were not there before. Masque support can always be added afterwards. The other option that provides pixel-perfect scaling/positioning/offsets also has to be implemented because Masque doesn't provide that (from a quick search I did, you always have to make sure the icons are already correctly scaled to have pixel-perfect skins).

@glassleo
Copy link

It's work that has to be done anyways, it just adds borders that were not there before. Masque support can always be added afterwards. The other option that provides pixel-perfect scaling/positioning/offsets also has to be implemented because Masque doesn't provide that (from a quick search I did, you always have to make sure the icons are already correctly scaled to have pixel-perfect skins).

True. Scaling and positioning would be really nice to have!

@HiMarioLopez
Copy link

Any updates on this PR? Was just running into some issues related to the tooltips and the ideas behind it are still very much wanted! Wondering if the implementation details ever got figured out. @frozn

image

^ Some item tooltip stuff I'm seeing today (missing styles, somehow a duplicate item tooltip icon).

Cheers

@frozn
Copy link
Owner

frozn commented Jul 30, 2023

Yes, this feature is still nice to have and I want to implement this sometime. But because my spare time is limited and other issues (e.g. after patches) are more important, I haven't had the chance to do it yet. 🙁

@HiMarioLopez
Copy link

Mate, no worries. Thank you for your diligent work on such an amazing tool. Looking forward to future updates!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1_enhancement New feature or request 2_to develop Development can begin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants