Skip to content

Improve Sections#1392

Merged
einarf merged 8 commits intopythonarcade:developmentfrom
alejcas:section/improvements
Nov 6, 2022
Merged

Improve Sections#1392
einarf merged 8 commits intopythonarcade:developmentfrom
alejcas:section/improvements

Conversation

@alejcas
Copy link
Member

@alejcas alejcas commented Nov 4, 2022

This PR contains improvements to Sections:

  • Complete and improved docstrings with params
  • Section.draw_order can now be smaller than zero
  • Breaking change for modal sections: Section.mouse_is_on_top now only checks for the section dimensions and not the event capture area. To check if a section should capture an event use Section.should_receive_mouse_event
  • Event capture properties removed and set as attributes that are automatically set
  • Improved some SectionManager attribute access to bypass a property
  • Improved performance of SectionManager.get_section_by_name
  • SectionManager.clear_sections will now call on_hide_section on each removed section
  • Improved performance of SectionManager.get_sections with a generator expression
  • Added event_capture param to SectionManager get_first_section and get_sections methods to allow to get sections based on event capture dimensions or on draw dimensions

Alejandro Casanovas added 3 commits November 4, 2022 23:17
Section.draw_order can now be smaller than zero
Breaking change: Section.mouse_is_on_top now only checks for the section dimensions and not the event capture area. To check if a section should capture an event use Section.should_receive_mouse_event
Event capture properties removed and set as attributes that are automatically set
Improved some attribute access
Improved SectionManager.get_section_by_name
SectionManager.clear_sections will now call Section.on_hide_section on each one
Improved SectionManager.get_sections with a generator expression
Added event_capture param to SectionManager get_first_section and get_sections to allow to get sections based on event capture dimensions or on draw dimensions
@einarf einarf merged commit d438ce5 into pythonarcade:development Nov 6, 2022
@alejcas alejcas deleted the section/improvements branch November 6, 2022 21:08
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