Skip to content

UIFocusMixin consumes Space #2727

Description

@eruvanos

It seems like the focus is not showing if there is no controller, which is good in my opinion, but the space key press event is still catched
even if there is, seems like its still catched and not forwarded
for some reason, the space event is handled instantly:

if isinstance(event, UIKeyPressEvent):
    if event.symbol == arcade.key.TAB:
        if event.modifiers & arcade.key.MOD_SHIFT:
            self.focus_previous()
        else:
            self.focus_next()

        return EVENT_HANDLED

    elif event.symbol == arcade.key.SPACE:
        self._start_interaction()
        return EVENT_HANDLED

https://discord.com/channels/458662222697070613/1344768086821175447/1374397523409768468

Update

  • The UIFocusGroup still catches space even if no controller is connected.
  • what do you think about renaming UIFocusGroup to UIFocusAnchorLayout and making a UIFocusBoxLayout and UIFocusGridLayout?

Activity

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

Metadata

Metadata

Assignees

Labels

guiRelated to arcade GUI (sub module arcade.gui)

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions