Skip to content
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

Small bugfix for ImageWidget OnClick detection #491

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

Geo5
Copy link
Contributor

@Geo5 Geo5 commented Mar 29, 2022

Added check if the current window is focused to OnClick detection of ImageWidget.

Without this ImageWidgets will also detect OnClick if there is a click on a overlapping window on top. Feel free to reject the PR, if this is desired.

There currenlty is a workaround like:

giu.Custom(func() {
    img := giu.Image(texture)
    if giu.IsWindowFocused(0) {
	img = img.OnClick(onClick)
    }
    img.Build()
})

@AllenDang AllenDang merged commit af1995d into AllenDang:master Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants