Skip to content

add move event to Widget and Button#149

Merged
mcarpenter622 merged 6 commits intoebitenui:masterfrom
scratch85:feature/add-move-event
Jun 2, 2024
Merged

add move event to Widget and Button#149
mcarpenter622 merged 6 commits intoebitenui:masterfrom
scratch85:feature/add-move-event

Conversation

@scratch85
Copy link
Copy Markdown
Contributor

@scratch85 scratch85 commented Jun 1, 2024

  • Adding move event to Widget to capture Mouse Cursor movement inside the Widget rect
  • Adding move event to Button to capture Mouse Cursor movement inside the Button rect, reusing ButtonCursorHoverHandlerFunc and ButtonHoverEventArgs to make it compatible to older versions.
  • Enhancing Button widget demo to showcase new event

This feature would also allow implementing a solution for #133.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 1, 2024

CLA assistant check
All committers have signed the CLA.

@scratch85
Copy link
Copy Markdown
Contributor Author

scratch85 commented Jun 2, 2024

As mentioned, I removed the ebiten.MouseButton as Pressed and Release Events will deliver that anyways. I extended the struct to include the DiffX/DiffY as this makes it easier to track the mouse movement on the widget.

@mcarpenter622 mcarpenter622 merged commit 45460b4 into ebitenui:master Jun 2, 2024
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.

3 participants