Launcher: support Component icons inside apworlds (#3629)

* Add kivy overrides to allow AsyncImage source paths of the format ap:worlds.module/subpath/to/data.png that use pkgutil to load files from within an apworld

* Apply suggestions from code review

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

* change original-load variable name for clarity per review

* add comment to record pkgutil format

* remove dependency on PIL

* i hate typing

---------

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
This commit is contained in:
qwint
2024-11-29 21:58:52 -05:00
committed by GitHub
parent 845a604955
commit a537d8eb65
3 changed files with 42 additions and 4 deletions

View File

@@ -207,6 +207,7 @@ components: List[Component] = [
]
# if registering an icon from within an apworld, the format "ap:module.name/path/to/file.png" can be used
icon_paths = {
'icon': local_path('data', 'icon.png'),
'mcicon': local_path('data', 'mcicon.png'),