Skip to content

Sections improvements#1364

Merged
einarf merged 8 commits intopythonarcade:developmentfrom
alejcas:sections/improvements
Oct 27, 2022
Merged

Sections improvements#1364
einarf merged 8 commits intopythonarcade:developmentfrom
alejcas:sections/improvements

Conversation

@alejcas
Copy link
Member

@alejcas alejcas commented Oct 27, 2022

This PR adds a few improvements and fixes to Sections:

  • Section new param accept_mouse_events to allow a section to accept certain mouse events if any
  • Section breaking change: param accept_keyboard_events renamed to accept_keyboard_keys
  • SectionManager now returns pyglet event standard return values: EVENT_HANDLED / EVENT_UNHANDLED
  • Added init docstrings to Section
  • Improved typing in Section
  • Improved: Window.show_view will only push the handlers if they are not empty
  • View.section_manager is now lazily instantiated
  • You can now configure View.on_draw, View.on_update and View.on_resize to be called after the section corresponding methods or not being call at all.

Alejandro Casanovas added 8 commits October 27, 2022 14:35
Section breaking change param renamed accept_keyboard_keys
Fix event return type to pyglet standard EVENT_HANDLED / EVENT_UNHANDLED
Section init docstrings added
Section typing improvements
Window.show_view will not push view handlers if empty
View.section_manager is now lazily instantiated
@einarf einarf merged commit 5129f71 into pythonarcade:development Oct 27, 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.

2 participants