Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@xescugc
Copy link
Contributor

@xescugc xescugc commented Aug 29, 2025

This changes allow for a Widget to have multiple ToolTips at once and also added a new option KeepOnHover(bool) to keep the ToolTip open when the cursor is hovering it

This introduces a breaking change as the Widget.Tooltip was a *ToolTip and now it's a []*ToolTip. I could also name it ToolTips to be more cohesive as we are already introducing a breaking change 🤷

Closes #300

Copy link
Collaborator

@mcarpenter622 mcarpenter622 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to break things lets go ahead and rename it to ToolTips

@xescugc xescugc force-pushed the fg-300 branch 2 times, most recently from eaf46fa to 0cc59ef Compare September 4, 2025 04:01
@xescugc
Copy link
Contributor Author

xescugc commented Sep 4, 2025

So I've pushed the change (on the first commit).

The only thing I changed is the widget.ToolTip to widget.ToolTips.

I did not change the FireToolTipEvent nor WidgetToolTipEventArgs as they affect only the ToolTip being removed so still singular.

Did also not change the main func (o WidgetOptions) ToolTip(toolTips ...*ToolTip) WidgetOpt as I feel it would break too many things.

If you want I can change any of those mentioned

Copy link
Collaborator

@mcarpenter622 mcarpenter622 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the demo example in page.go?

It'll allow the ToolTip to not be hidden when the cursor is hovering it
For the multiple option and the KeepOnHover
@xescugc
Copy link
Contributor Author

xescugc commented Sep 23, 2025

Done!

@mcarpenter622 mcarpenter622 merged commit c71b4ae into ebitenui:master Sep 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

ToolTip improvements.

2 participants