Skip to content

Using :setEnterFunc() causes the game to freeze #10

Open

Description

@toomanynights

If I assign an enter function to an entry field and then press "Enter", the game no longer responds to any key press. The only way to make it work again is to press any UI element with a mouse cursor.

Using the same function binded to "Enter", but some other way (i.e. via custom hotkey or a button) doesn't cause this problem.

Activity

  1. toomanynights commented on Mar 2, 2024

    @toomanynights
    Author

    To others concerned: it happens because Enter, unlike UIToggle(), doesn't remove focus from an entry field. To work around that, simply remove the focus yourself:

    UI["newItemText"].javaObject:unfocus()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions