Pass mouse out event to pressed widget

This commit is contained in:
Trevor Slocum 2024-01-09 18:25:20 -08:00
parent e094469352
commit 127665c198
3 changed files with 8 additions and 4 deletions

View file

@ -193,7 +193,11 @@ func Update() error {
}
}
if !pressed && !clicked {
if !pressed && !clicked && pressedWidget != nil {
_, err := pressedWidget.HandleMouse(cursor, false, false)
if err != nil {
return err
}
pressedWidget = nil
}

2
go.mod
View file

@ -3,7 +3,7 @@ module code.rocket9labs.com/tslocum/etk
go 1.18
require (
code.rocketnine.space/tslocum/kibodo v1.0.3-0.20240109203209-1e5886fd3422
code.rocketnine.space/tslocum/kibodo v1.0.3-0.20240110043547-31f31eb07497
code.rocketnine.space/tslocum/messeji v1.0.6-0.20240109205105-4ffeffdd2441
github.com/hajimehoshi/ebiten/v2 v2.6.3
github.com/llgcode/draw2d v0.0.0-20231212091825-f55e0c776b44

4
go.sum
View file

@ -1,5 +1,5 @@
code.rocketnine.space/tslocum/kibodo v1.0.3-0.20240109203209-1e5886fd3422 h1:T2WK/ci6fc/Ee+Puu/0k+ziU3EI49F7uYEREhrtmqbA=
code.rocketnine.space/tslocum/kibodo v1.0.3-0.20240109203209-1e5886fd3422/go.mod h1:U9KpaLHr7nPZ8XfRUI81uAQMrxob+bI3C/IXzeXe7gw=
code.rocketnine.space/tslocum/kibodo v1.0.3-0.20240110043547-31f31eb07497 h1:QpzLvcDV7DsaeFKrQZcHkDfq1PqsHcwUVnRXRKBAxe0=
code.rocketnine.space/tslocum/kibodo v1.0.3-0.20240110043547-31f31eb07497/go.mod h1:U9KpaLHr7nPZ8XfRUI81uAQMrxob+bI3C/IXzeXe7gw=
code.rocketnine.space/tslocum/messeji v1.0.6-0.20240109205105-4ffeffdd2441 h1:pe5QsaN6Tvil0Y+jodbMLfdMWaL5MBb2vyorBIfQwqk=
code.rocketnine.space/tslocum/messeji v1.0.6-0.20240109205105-4ffeffdd2441/go.mod h1:cznUGfvC7BKbc5sx4I36XpLsF0ar3TPJYZlrND0IlDQ=
github.com/ebitengine/purego v0.5.1 h1:hNunhThpOf1vzKl49v6YxIsXLhl92vbBEv1/2Ez3ZrY=