diff --git a/go.mod b/go.mod index 141bfa9..11239e7 100644 --- a/go.mod +++ b/go.mod @@ -2,9 +2,9 @@ module git.dummkopf.live/InventorX/pinwindows go 1.22.2 -require github.com/gen2brain/raylib-go/raylib v0.0.0-20240418150228-9548fadb54e6 +require github.com/gen2brain/raylib-go/raylib v0.0.0-20240421191056-278df68f40bb require ( - github.com/ebitengine/purego v0.6.0-alpha.1.0.20231122024802-192c5e846faa // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/ebitengine/purego v0.7.1 // indirect + golang.org/x/sys v0.19.0 // indirect ) diff --git a/go.sum b/go.sum index 6276b23..343432d 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,12 @@ github.com/ebitengine/purego v0.6.0-alpha.1.0.20231122024802-192c5e846faa h1:Ik7QikRgeH+bFOfAcMpttCbs6XxWXxCLXMm4awxtOXk= github.com/ebitengine/purego v0.6.0-alpha.1.0.20231122024802-192c5e846faa/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= +github.com/ebitengine/purego v0.7.1 h1:6/55d26lG3o9VCZX8lping+bZcmShseiqlh2bnUDiPA= +github.com/ebitengine/purego v0.7.1/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= github.com/gen2brain/raylib-go/raylib v0.0.0-20240418150228-9548fadb54e6 h1:mNKFgLZIU0eEHKHjb7Uk9ZuSy65DdgmEf2xxum0Tof4= github.com/gen2brain/raylib-go/raylib v0.0.0-20240418150228-9548fadb54e6/go.mod h1:P/hDjVwz/9fhR0ww3+umzDpDA7Bf7Tce4xNChHIEFqE= +github.com/gen2brain/raylib-go/raylib v0.0.0-20240421191056-278df68f40bb h1:2CdDr/LfDc9uLOW/+3ffSM5Ia7xZZMgjC6UmP7KTjRw= +github.com/gen2brain/raylib-go/raylib v0.0.0-20240421191056-278df68f40bb/go.mod h1:P/hDjVwz/9fhR0ww3+umzDpDA7Bf7Tce4xNChHIEFqE= golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= diff --git a/window.go b/window.go index bfb10bd..ba3eaf5 100644 --- a/window.go +++ b/window.go @@ -66,7 +66,7 @@ func (win *RayGuiWindow) DidStartResizeDrag() bool { } func (window *RayGuiWindow) isLeftClicked() bool { - return rl.IsMouseButtonPressed(rl.MouseButtonLeft) && rl.CheckCollisionPointRec(rl.GetMousePosition(), rl.NewRectangle(float32(window.Pos.X), float32(window.Pos.Y-20), float32(window.Size.X), float32(window.Size.Y+20))) + return rl.IsMouseButtonPressed(rl.MouseButtonLeft) && rl.CheckCollisionPointRec(rl.GetMousePosition(), rl.NewRectangle(float32(window.Pos.X), float32(window.Pos.Y-window.GetBorderRect().Height), float32(window.Size.X), float32(window.Size.Y+window.GetBorderRect().Height))) } func (window *RayGuiWindow) BeginDrawMode() {