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

Add tooltip support to ImGuiWidgets.Icon #168

Merged
merged 6 commits into from
Feb 3, 2025

Conversation

Damon3000s
Copy link
Collaborator

It is now possible to define a Func that will return the tooltip for the Icon that applies to the Dummy created that covers the entire Icon area.

It is now possible to define a Func that will return the tooltip for the Icon that applies to the Dummy created that covers the entire Icon area.
ImGuiWidgets/Icon.cs Outdated Show resolved Hide resolved
ImGuiWidgets/Icon.cs Outdated Show resolved Hide resolved
ImGuiWidgets/Icon.cs Outdated Show resolved Hide resolved
ImGuiWidgetsDemo/ImGuiWidgetsDemo.cs Outdated Show resolved Hide resolved
- Changed how the tooltip implementation is done and migrate all optional variables into an Options class
- The number of parameters and API interface was very large already so all of the optional parameters were moved into the Options struct while the required parameters were kept as direct parameters.
All members are now directly within IconOptions
@Damon3000s Damon3000s changed the title Added OnGetTooltip to Icon Delegates Add tooltip support to ImGuiWidgets.Icon Jan 31, 2025
ImGuiWidgets/Icon.cs Outdated Show resolved Hide resolved
ImGuiWidgets/Icon.cs Outdated Show resolved Hide resolved
Change set; to init;
- Only throw for null label. Empty is technically valid
- Move the Options throw into the implementation to simplify the public API body
The user should be explicit about how they want the icon to be laid out. We can't safely assume the users intent and provide a default.
@matt-edmondson matt-edmondson merged commit 457fb77 into ktsu-dev:main Feb 3, 2025
2 checks passed
@Damon3000s Damon3000s deleted the add-tooltip-delegate branch February 3, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants