This PR refactors the ListScreen.py and adds helpful elements to ui_elements.py (renamed image_button.py).
ui_elements.py
Added UIModifiedScrollingContainer: this is not yet utilized, but I hope will help with customizing the look of scrollbars on scrolling containers
Added UIImageVerticalScrollBar for use by UIModifiedScrollingContainer
Added UIDropDownContainer to hold and control dropdowns
Added UICheckBox to create and control checkboxes: not yet utilized
Added UIBasicCatListDisplay to create and control cat list displays without the name of the cat
Added UINamedCatListDisplay to create and control cat list displays with the name of the cat
ListScreen.py
Essentially rewrote the whole screen
Some slight cosmetic changes to cat list bar:
"show dead/living" is now "view dead/living" for clarity
"filtered by" is now "sort by" for clarity
Added QoL page number input and first/last page buttons.
If player inputs a page number higher than the current max, the page will automatically switch to the last page and set the number to match.
If the player inputs a number below 1, the page will automatically switch to first page and set the number to match
Various small visual quirks have been fixed, screen in general should feel nicer to use
Why This Is Good For ClanGen
Cleans up the code massively and makes it much easier to use on the dev side! The use of containers makes it easier to control elements as a whole and object_ids have been liberally applied to make the f2 debug much more helpful. QoL changes will make it easier to use on the player side.
About The Pull Request
This PR refactors the ListScreen.py and adds helpful elements to ui_elements.py (renamed image_button.py).
ui_elements.py
UIModifiedScrollingContainer
: this is not yet utilized, but I hope will help with customizing the look of scrollbars on scrolling containersUIImageVerticalScrollBar
for use byUIModifiedScrollingContainer
UIDropDownContainer
to hold and control dropdownsUICheckBox
to create and control checkboxes: not yet utilizedUIBasicCatListDisplay
to create and control cat list displays without the name of the catUINamedCatListDisplay
to create and control cat list displays with the name of the catListScreen.py
Why This Is Good For ClanGen
Cleans up the code massively and makes it much easier to use on the dev side! The use of containers makes it easier to control elements as a whole and object_ids have been liberally applied to make the f2 debug much more helpful. QoL changes will make it easier to use on the player side.
Linked Issues
Fixes #2137
Proof of Testing
https://github.com/ClanGenOfficial/clangen/assets/115410010/4bf27df8-0411-47be-b986-f12436c7e5b1
Changelog/Credits