Skip to content

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