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

[orx-gui] Collapsed GUI intercepts and handles some mouse and keyboard events #297

Open
Yvee1 opened this issue Mar 19, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Yvee1
Copy link
Contributor

Yvee1 commented Mar 19, 2023

Operating System

Windows

OPENRNDR version

latest from Github at the time of writing

ORX version

latest from Github at the time of writing

Java version (if applicable)

No response

Describe the bug

A GUI that is collapsed still intercepts and handles some mouse and keyboard events. In particular, I noticed this for the following events:

  • Scrolling in the area of a collapsed GUI;
  • Pressing the spacebar when a button is focused.

Steps to reproduce the bug

  1. Run the following program.
fun main() = application {
    program {
        val s = object {
            @ActionParameter("Button")
            fun f() { println("Clicked") }
        }
        val gui = GUI()
        gui.add(s)
        extend(gui)
        mouse.scrolled.listen { println(it.propagationCancelled) }
        keyboard.keyDown.listen { println(it.propagationCancelled) }
    }
}
  1. Collapse the GUI and scroll with the scrollwheel in the area of the GUI.
  2. Open the GUI and notice that it has scrolled. The console is filled with "true" indicating that the scroll event was handled.
  3. Click on "Button" under "No name".
  4. Close the GUI, and press the spacebar. Note that "Clicked" and "true" is printed in the console.
@Yvee1 Yvee1 added the bug Something isn't working label Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant