-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Implement contextual icons with clickable actions #62
base: main
Are you sure you want to change the base?
Conversation
- Activated achievement icon - Activated wiki icon, and implemented click to launch web page
This pull request has the side effect of enabling the BasicTooltipText
I don't know enough about this system to know when this BasicTooltip is shown vs the full tooltip. It kind of looks like it only shows in situations where the regular tooltip hasn't finished rendering? But I thought I'd point it out. You'll want to comment out those lines if you wish to disable this. |
Yes, we do not want to include this at all. It predates the implementation of the tooltip that we have now and was for testing the concept early on. |
Ok. Just removed it. Do you have any icon that you'd think of using for "completed achievement"? |
Likely a combination of the normal icon + a small ✔️ in the bottom right (like a small version of texture 154979) or something. This looks pretty good. I can look at the textures and see if I can provide something that fits what I was imagining. I'll also give the build a test. Regarding process.start for the URLs, yes, that's perfectly fine and exactly what we do elsewhere in Blish HUD to ensure the default browser is used. |
The story master completed icon does look nice if it did fit nicely. The prior of the latter two icons also looks nice (a bit brighter - less dull). I'm still not sure the best option about the disabling vs. unchecking vs. something else. Trying to think through what makes sense intuitively. Especially for a user trying to make a distinction between an actually unchecked category and one that is completed (despite the icon change 🤔). |
Continuing on from your existing work, this enables the contextual icons and makes them clickable. Currently the achievement icon is just informative (that the marker is tied to an achivement), while the wiki icon is clickable, and will open the browser to the wiki.
Do check this works, as I run
System.Diagnostics.Process.Start(url);
to open the web page, which works fine for me, but is one of those weird things that may not for you.Tooltips are not yet enabled.
Regarding implementation, it turns out
onClick
doesn't fire when a field is disabled, but to me it made sense that these icons still be clickable. So at least for now I've overridenOnLeftMouseButtonReleased
. It also doesn't check the exact bounds, but instead looks for the click within the 18px window that frames the icon (so no gap between the icons) and uses the full height of the menu item.I also decided to change your empty Actions into
null
. This allowed for me to implement a check where anull
Action indicates that the icon should have no click functionality, and thus just click through to the underlying menu item. This felt better to me than having an icon that clicking it just did... nothing.For the URL for the search, I just use the achievement named URL encoded into the same format that GW2 Efficiency uses for their search. I assume this is good in 99% of cases. Absolutely no idea how it handles achievements that share the same name (if they exist).
Anyway, tell me if you want any other changes.