-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closing a Window via the close button does not unset the hot region #33
Comments
Proposed fix: provide a if IsCloseHovered then
DrawCommands.Circle(
'fill',
CloseX,
CloseY,
CloseBgRadius,
Style.WindowCloseBgColor
)
if Mouse.IsClicked(1) then
ActiveInstance.IsOpen = false
Options.IsOpen = false
ActiveInstance.IsMoving = false
Region.Obstruct()
end
end``` |
I think I've found a better solution - this seems to be solved more neatly and robustly by adding a frame number counter to |
Hi @sdleffler thanks for reporting this issue. I was able to reproduce this and have checked in a fix. You can see the commit at 5395f26. This fix will be added to the next update. I went with keeping the frame number in Window since it is used to update what windows are visible and their stack order. I added a function to clear the hot region if the given window has been removed from the stack. This is handled in Window.Validate which is called every Draw before the actual rendering occurs. |
When closing a window via the close button, if
BeginWindow
is not later called withIsOpen = false
(going fromBeginWindow(... { ... IsOpen = true ... })
to not callingBeginWindow
at all but still callingSlab.Update
) then theRegion.HotInstance
variable remains set to the now closed window and does not get corrected until another Slab object is hovered over and then unhovered. This interferes badly withSlab.IsVoidHovered
.The text was updated successfully, but these errors were encountered: