diff --git a/src/engine/Input/Input.jl b/src/engine/Input/Input.jl index 4401521..eff9a7f 100644 --- a/src/engine/Input/Input.jl +++ b/src/engine/Input/Input.jl @@ -134,6 +134,7 @@ module InputModule screenButton.mouseOverSprite = eventWasInsideThisButton if !eventWasInsideThisButton + screenButton.isHovered = false continue end insideAnyButton = true diff --git a/src/engine/UI/ScreenButton.jl b/src/engine/UI/ScreenButton.jl index e6117cc..a9ab81a 100644 --- a/src/engine/UI/ScreenButton.jl +++ b/src/engine/UI/ScreenButton.jl @@ -66,6 +66,7 @@ module ScreenButtonModule this.currentTexture === nothing #|| this.textTexture === nothing return end + @assert SDL2.SDL_RenderCopyExF( JulGame.Renderer::Ptr{SDL2.SDL_Renderer}, this.currentTexture, @@ -152,7 +153,7 @@ module ScreenButtonModule Base.invokelatest(eventToCall,(evt = evt, x = x, y = y)) end elseif evt.type == SDL2.SDL_MOUSEMOTION - #println("mouse move") + this.isHovered = true end end