pygamestudio 1.0.0.dev3__tar.gz → 1.0.0.dev5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pygamestudio-1.0.0.dev5/.gitignore +6 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/PKG-INFO +1 -1
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/pyproject.toml +1 -1
- pygamestudio-1.0.0.dev5/src/pygamestudio/__init__.py +1 -0
- pygamestudio-1.0.0.dev5/src/pygamestudio/api/__init__.py +4 -0
- pygamestudio-1.0.0.dev5/src/pygamestudio/api/core/game.py +404 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/api/runtime → pygamestudio-1.0.0.dev5/src/pygamestudio/api/core}/scene.py +24 -2
- pygamestudio-1.0.0.dev5/src/pygamestudio/api/event/constant.py +153 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/i18n/languages/en.json +2 -1
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/i18n/languages/zh_CN.json +2 -1
- pygamestudio-1.0.0.dev5/src/pygamestudio/common/res/images/button.png +0 -0
- pygamestudio-1.0.0.dev5/src/pygamestudio/common/res/images/left_arrow_gray.png +0 -0
- pygamestudio-1.0.0.dev5/src/pygamestudio/common/res/images/right_arrow_gray.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/resources.qrc +3 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/resources_rc.py +312 -25
- pygamestudio-1.0.0.dev5/src/pygamestudio/common/res/templates/editor_template.pygs +4 -0
- pygamestudio-1.0.0.dev5/src/pygamestudio/common/res/templates/main_template.py +46 -0
- pygamestudio-1.0.0.dev5/src/pygamestudio/common/utils/constant.py +1 -0
- pygamestudio-1.0.0.dev5/src/pygamestudio/game/core/command.py +94 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/game/core/manager.py +69 -109
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/game/object/base.py +20 -1
- pygamestudio-1.0.0.dev5/src/pygamestudio/game/object/button.py +105 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/game/object/canvas.py +1 -1
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/game/object/ellipse.py +3 -6
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/game/object/image.py +3 -7
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/game/object/line.py +3 -6
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/game/object/rect.py +3 -6
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/game/object/text.py +4 -6
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/game/object/type.py +2 -1
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/asset/delegate.py +1 -1
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/hierarchy/delegate.py +1 -1
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/hierarchy/menu.py +3 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/hierarchy/tree.py +5 -1
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/hierarchy/widget.py +3 -0
- pygamestudio-1.0.0.dev5/src/pygamestudio/gui/inspector/color.py +644 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/component/picker.py +7 -7
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/container.py +88 -3
- pygamestudio-1.0.0.dev5/src/pygamestudio/gui/inspector/layout/button.py +108 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/widget.py +20 -2
- pygamestudio-1.0.0.dev5/src/pygamestudio/gui/inspector/window.py +67 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/scene/gizmo.py +5 -1
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/scene/screen.py +21 -13
- pygamestudio-1.0.0.dev5/src/pygamestudio/gui/settings/__init__.py +0 -0
- pygamestudio-1.0.0.dev3/.gitignore +0 -4
- pygamestudio-1.0.0.dev3/src/pygamestudio/common/res/templates/editor_template.pygs +0 -4
- pygamestudio-1.0.0.dev3/src/pygamestudio/common/res/templates/main_template.py +0 -36
- pygamestudio-1.0.0.dev3/src/pygamestudio/common/utils/constant.py +0 -1
- pygamestudio-1.0.0.dev3/src/pygamestudio/gui/inspector/window.py +0 -44
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/.github/FUNDING.yml +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/LICENSE +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/README.md +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/README_zh-CN.md +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio → pygamestudio-1.0.0.dev5/src/pygamestudio/api/config}/__init__.py +0 -0
- /pygamestudio-1.0.0.dev3/src/pygamestudio/api/runtime/config.py → /pygamestudio-1.0.0.dev5/src/pygamestudio/api/config/project.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/api/runtime → pygamestudio-1.0.0.dev5/src/pygamestudio/api/core}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/common → pygamestudio-1.0.0.dev5/src/pygamestudio/api/event}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/common/i18n → pygamestudio-1.0.0.dev5/src/pygamestudio/api/sound}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/game → pygamestudio-1.0.0.dev5/src/pygamestudio/common}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/game/core → pygamestudio-1.0.0.dev5/src/pygamestudio/common/i18n}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/i18n/translator.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/fonts/SIMHEI.ttf +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/add.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/add_item.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/browse.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/canvas.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/check.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/clear.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/close.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/create_project.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/down_arrow.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/ellipse.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/error.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/expand_or_collapse_all.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/eye_closed.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/eye_off.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/eye_open.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/heart.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/image.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/import_project.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/info.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/left_arrow.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/line.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/logo.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/maximize.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/maximize_disabled.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/minimize.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/normalize.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/project_icon.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/rect.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/refresh_asset.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/right_arrow.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/run.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/search.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/sort.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/text.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/tree_arrow_down.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/tree_arrow_right.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/up_arrow.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/images/warning.png +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/qss/dark.qss +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/qss/light.qss +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/templates/project_template.pygs +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/utils/config.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/utils/path.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/utils/theme.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/gui → pygamestudio-1.0.0.dev5/src/pygamestudio/game}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/gui/about → pygamestudio-1.0.0.dev5/src/pygamestudio/game/core}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/gui/build → pygamestudio-1.0.0.dev5/src/pygamestudio/gui}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/gui/console → pygamestudio-1.0.0.dev5/src/pygamestudio/gui/about}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/about/window.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/asset/menu.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/asset/model.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/asset/search.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/asset/tree.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/asset/type.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/asset/widget.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/asset/window.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/base/window.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/gui/dashboard → pygamestudio-1.0.0.dev5/src/pygamestudio/gui/build}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/build/desktop.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/build/window.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/gui/hierarchy → pygamestudio-1.0.0.dev5/src/pygamestudio/gui/console}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/console/browser.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/console/logger.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/console/menu.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/console/search.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/console/type.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/console/widget.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/console/window.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/gui/inspector → pygamestudio-1.0.0.dev5/src/pygamestudio/gui/dashboard}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/config.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/delegate.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/dialog.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/list.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/menu.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/model.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/search.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/type.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/widget.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/dashboard/window.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/gui/scene → pygamestudio-1.0.0.dev5/src/pygamestudio/gui/hierarchy}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/hierarchy/search.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/hierarchy/window.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/gui/settings → pygamestudio-1.0.0.dev5/src/pygamestudio/gui/inspector}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3/src/pygamestudio/game/object → pygamestudio-1.0.0.dev5/src/pygamestudio/gui/inspector/component}/button.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/component/checkbox.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/component/combobox.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/component/label.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/component/lineedit.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/component/spinbox.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/component/textedit.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/layout/canvas.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/layout/ellipse.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/layout/image.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/layout/line.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/layout/rect.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/inspector/layout/text.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/main.py +0 -0
- /pygamestudio-1.0.0.dev3/src/pygamestudio/gui/inspector/component/button.py → /pygamestudio-1.0.0.dev5/src/pygamestudio/gui/scene/__init__.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/scene/grid.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/scene/widget.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/scene/window.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/settings/editor.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/settings/project.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/gui/window.py +0 -0
- {pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/main.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .api import *
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import pygame
|
|
4
|
+
import inspect
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from pygamestudio.api.config.project import get_project_config
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Game:
|
|
10
|
+
_instance = None
|
|
11
|
+
|
|
12
|
+
def __init__(self):
|
|
13
|
+
self._fps = 60
|
|
14
|
+
self._clock = None
|
|
15
|
+
self._screen = None
|
|
16
|
+
self._project_path = ""
|
|
17
|
+
self._running = False
|
|
18
|
+
|
|
19
|
+
def _init_game(self):
|
|
20
|
+
caller_frame = inspect.stack()[-1]
|
|
21
|
+
caller_file_path = caller_frame.filename
|
|
22
|
+
self._project_path = Path(caller_file_path).parent.resolve().as_posix()
|
|
23
|
+
os.environ['PROJECT_PATH'] = self._project_path
|
|
24
|
+
project_config = get_project_config()
|
|
25
|
+
|
|
26
|
+
pygame.init()
|
|
27
|
+
pygame.display.set_caption(project_config['caption'])
|
|
28
|
+
self._screen = pygame.display.set_mode(project_config['screen_size'])
|
|
29
|
+
self._clock = pygame.time.Clock()
|
|
30
|
+
|
|
31
|
+
def run(self):
|
|
32
|
+
Game._instance = self
|
|
33
|
+
self._init_game()
|
|
34
|
+
self._running = True
|
|
35
|
+
|
|
36
|
+
self.on_start()
|
|
37
|
+
|
|
38
|
+
while self._running:
|
|
39
|
+
for event in pygame.event.get():
|
|
40
|
+
# ---------- Quit Event ----------
|
|
41
|
+
if event.type == pygame.QUIT:
|
|
42
|
+
self._running = False
|
|
43
|
+
|
|
44
|
+
# ---------- Keyboard Event ----------
|
|
45
|
+
elif event.type == pygame.KEYDOWN:
|
|
46
|
+
self.on_key_down(event.key, event.mod, event.unicode, event.scancode, getattr(event, 'window', None))
|
|
47
|
+
elif event.type == pygame.KEYUP:
|
|
48
|
+
self.on_key_up(event.key, event.mod, event.unicode, event.scancode, getattr(event, 'window', None))
|
|
49
|
+
|
|
50
|
+
# ---------- Mouse Event ----------
|
|
51
|
+
elif event.type == pygame.MOUSEMOTION:
|
|
52
|
+
self.on_mouse_motion(event.pos, event.rel, event.buttons, getattr(event, 'touch', 0), getattr(event, 'window', None))
|
|
53
|
+
elif event.type == pygame.MOUSEBUTTONDOWN:
|
|
54
|
+
self.on_mouse_button_down(event.pos, event.button, getattr(event, 'touch', 0), getattr(event, "clicks", 1), getattr(event, 'window', None))
|
|
55
|
+
elif event.type == pygame.MOUSEBUTTONUP:
|
|
56
|
+
self.on_mouse_button_up(event.pos, event.button, getattr(event, 'touch', 0), getattr(event, "clicks", 1), getattr(event, 'window', None))
|
|
57
|
+
elif event.type == pygame.MOUSEWHEEL:
|
|
58
|
+
self.on_mouse_wheel(event.which, event.flipped, event.x, event.y, getattr(event, 'touch', 0), event.precise_x, event.precise_y, getattr(event, 'window', None))
|
|
59
|
+
|
|
60
|
+
# ---------- Joystick Event ----------
|
|
61
|
+
elif event.type == pygame.JOYAXISMOTION:
|
|
62
|
+
self.on_joy_axis_motion(event.instance_id, event.axis, event.value)
|
|
63
|
+
elif event.type == pygame.JOYBALLMOTION:
|
|
64
|
+
self.on_joy_ball_motion(event.instance_id, event.ball, event.rel)
|
|
65
|
+
elif event.type == pygame.JOYHATMOTION:
|
|
66
|
+
self.on_joy_hat_motion(event.instance_id, event.hat, event.value)
|
|
67
|
+
elif event.type == pygame.JOYBUTTONDOWN:
|
|
68
|
+
self.on_joy_button_down(event.instance_id, event.button)
|
|
69
|
+
elif event.type == pygame.JOYBUTTONUP:
|
|
70
|
+
self.on_joy_button_up(event.instance_id, event.button)
|
|
71
|
+
elif event.type == pygame.JOYDEVICEADDED:
|
|
72
|
+
self.on_joy_device_added(event.device_index)
|
|
73
|
+
elif event.type == pygame.JOYDEVICEREMOVED:
|
|
74
|
+
self.on_joy_device_removed(event.instance_id)
|
|
75
|
+
elif event.type == pygame.CONTROLLERDEVICEADDED:
|
|
76
|
+
self.on_controller_added(event.device_index)
|
|
77
|
+
elif event.type == pygame.CONTROLLERDEVICEREMOVED:
|
|
78
|
+
self.on_controller_removed(event.instance_id)
|
|
79
|
+
elif event.type == pygame.CONTROLLERDEVICEREMAPPED:
|
|
80
|
+
self.on_controller_remapped(event.instance_id)
|
|
81
|
+
|
|
82
|
+
# ---------- Window Event ----------
|
|
83
|
+
elif event.type == pygame.WINDOWSHOWN:
|
|
84
|
+
self.on_window_shown(getattr(event, 'window', None))
|
|
85
|
+
elif event.type == pygame.WINDOWHIDDEN:
|
|
86
|
+
self.on_window_hidden(getattr(event, 'window', None))
|
|
87
|
+
elif event.type == pygame.WINDOWEXPOSED:
|
|
88
|
+
self.on_window_exposed(getattr(event, 'window', None))
|
|
89
|
+
elif event.type == pygame.WINDOWMOVED:
|
|
90
|
+
self.on_window_moved(event.x, event.y, getattr(event, 'window', None))
|
|
91
|
+
elif event.type == pygame.WINDOWSIZECHANGED:
|
|
92
|
+
self.on_window_size_changed(event.x, event.y, getattr(event, 'window', None))
|
|
93
|
+
elif event.type == pygame.WINDOWRESIZED:
|
|
94
|
+
self.on_window_resized(event.x, event.y, getattr(event, 'window', None))
|
|
95
|
+
elif event.type == pygame.WINDOWMINIMIZED:
|
|
96
|
+
self.on_window_minimized(getattr(event, 'window', None))
|
|
97
|
+
elif event.type == pygame.WINDOWMAXIMIZED:
|
|
98
|
+
self.on_window_maximized(getattr(event, 'window', None))
|
|
99
|
+
elif event.type == pygame.WINDOWRESTORED:
|
|
100
|
+
self.on_window_restored(getattr(event, 'window', None))
|
|
101
|
+
elif event.type == pygame.WINDOWENTER:
|
|
102
|
+
self.on_window_enter(getattr(event, 'window', None))
|
|
103
|
+
elif event.type == pygame.WINDOWLEAVE:
|
|
104
|
+
self.on_window_leave(getattr(event, 'window', None))
|
|
105
|
+
elif event.type == pygame.WINDOWFOCUSGAINED:
|
|
106
|
+
self.on_window_focus_gained(getattr(event, 'window', None))
|
|
107
|
+
elif event.type == pygame.WINDOWFOCUSLOST:
|
|
108
|
+
self.on_window_focus_lost(getattr(event, 'window', None))
|
|
109
|
+
elif event.type == pygame.WINDOWCLOSE:
|
|
110
|
+
self.on_window_close(getattr(event, 'window', None))
|
|
111
|
+
elif event.type == pygame.WINDOWTAKEFOCUS:
|
|
112
|
+
self.on_window_take_focus(getattr(event, 'window', None))
|
|
113
|
+
elif event.type == pygame.WINDOWHITTEST:
|
|
114
|
+
self.on_window_hit_test(getattr(event, 'window', None))
|
|
115
|
+
elif event.type == pygame.WINDOWICCPROFCHANGED:
|
|
116
|
+
self.on_window_icc_changed(getattr(event, 'window', None))
|
|
117
|
+
elif event.type == pygame.WINDOWDISPLAYCHANGED:
|
|
118
|
+
self.on_window_display_changed(event.display_index, getattr(event, 'window', None))
|
|
119
|
+
|
|
120
|
+
# ---------- Text Input Event ----------
|
|
121
|
+
elif event.type == pygame.TEXTEDITING:
|
|
122
|
+
self.on_text_editing(event.text, event.start, event.length, getattr(event, 'window', None))
|
|
123
|
+
elif event.type == pygame.TEXTINPUT:
|
|
124
|
+
self.on_text_input(event.text, getattr(event, 'window', None))
|
|
125
|
+
|
|
126
|
+
# ---------- Drop Event ----------
|
|
127
|
+
elif event.type == pygame.DROPBEGIN:
|
|
128
|
+
self.on_drop_begin(getattr(event, 'window', None))
|
|
129
|
+
elif event.type == pygame.DROPFILE:
|
|
130
|
+
self.on_drop_file(event.file, getattr(event, 'window', None))
|
|
131
|
+
elif event.type == pygame.DROPTEXT:
|
|
132
|
+
self.on_drop_text(event.text, getattr(event, 'window', None))
|
|
133
|
+
elif event.type == pygame.DROPCOMPLETE:
|
|
134
|
+
self.on_drop_complete(getattr(event, 'window', None))
|
|
135
|
+
|
|
136
|
+
# ---------- Touch Event ----------
|
|
137
|
+
elif event.type == pygame.FINGERDOWN:
|
|
138
|
+
self.on_finger_down(event.touch_id, event.finger_id, event.x, event.y, event.dx, event.dy, getattr(event, 'window', None))
|
|
139
|
+
elif event.type == pygame.FINGERMOTION:
|
|
140
|
+
self.on_finger_motion(event.touch_id, event.finger_id, event.x, event.y, event.dx, event.dy, getattr(event, 'window', None))
|
|
141
|
+
elif event.type == pygame.FINGERUP:
|
|
142
|
+
self.on_finger_up(event.touch_id, event.finger_id, event.x, event.y, event.dx, event.dy, getattr(event, 'window', None))
|
|
143
|
+
elif event.type == pygame.MULTIGESTURE:
|
|
144
|
+
self.on_multi_gesture(event.touch_id, event.x, event.y, event.pinched, event.rotated, event.num_fingers, getattr(event, 'window', None))
|
|
145
|
+
|
|
146
|
+
# ---------- MIDI Event ----------
|
|
147
|
+
elif event.type == pygame.AUDIODEVICEADDED:
|
|
148
|
+
self.on_audio_added(event.which, event.iscapture)
|
|
149
|
+
elif event.type == pygame.AUDIODEVICEREMOVED:
|
|
150
|
+
self.on_audio_removed(event.which, event.iscapture)
|
|
151
|
+
|
|
152
|
+
# ---------- APP Event ----------
|
|
153
|
+
elif event.type == pygame.APP_TERMINATING:
|
|
154
|
+
self.on_app_terminating()
|
|
155
|
+
elif event.type == pygame.APP_LOWMEMORY:
|
|
156
|
+
self.on_app_low_memory()
|
|
157
|
+
elif event.type == pygame.APP_WILLENTERBACKGROUND:
|
|
158
|
+
self.on_app_will_background()
|
|
159
|
+
elif event.type == pygame.APP_DIDENTERBACKGROUND:
|
|
160
|
+
self.on_app_did_background()
|
|
161
|
+
elif event.type == pygame.APP_WILLENTERFOREGROUND:
|
|
162
|
+
self.on_app_will_foreground()
|
|
163
|
+
elif event.type == pygame.APP_DIDENTERFOREGROUND:
|
|
164
|
+
self.on_app_did_foreground()
|
|
165
|
+
|
|
166
|
+
# ---------- Other Events ----------
|
|
167
|
+
elif event.type == pygame.KEYMAPCHANGED:
|
|
168
|
+
self.on_keymap_changed()
|
|
169
|
+
elif event.type == pygame.CLIPBOARDUPDATE:
|
|
170
|
+
self.on_clipboard_update()
|
|
171
|
+
elif event.type == pygame.LOCALECHANGED:
|
|
172
|
+
self.on_locale_changed()
|
|
173
|
+
elif event.type == pygame.RENDER_TARGETS_RESET:
|
|
174
|
+
self.on_render_target_reset()
|
|
175
|
+
elif event.type == pygame.RENDER_DEVICE_RESET:
|
|
176
|
+
self.on_render_device_reset()
|
|
177
|
+
|
|
178
|
+
# ---------- User Event ----------
|
|
179
|
+
else:
|
|
180
|
+
self.on_user_event(event)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
delta_time = self._clock.tick(self._fps) / 1000
|
|
184
|
+
self.on_update(delta_time)
|
|
185
|
+
pygame.display.flip()
|
|
186
|
+
|
|
187
|
+
self.on_quit()
|
|
188
|
+
pygame.quit()
|
|
189
|
+
sys.exit()
|
|
190
|
+
|
|
191
|
+
# ---------- Basic Life Cycle ----------
|
|
192
|
+
def on_start(self):
|
|
193
|
+
pass
|
|
194
|
+
|
|
195
|
+
def on_update(self, dt: float):
|
|
196
|
+
pass
|
|
197
|
+
|
|
198
|
+
def on_quit(self):
|
|
199
|
+
pass
|
|
200
|
+
|
|
201
|
+
# ---------- Keyboard Event Hooks ----------
|
|
202
|
+
def on_key_down(self, key, mod, unicode, scancode, window=None):
|
|
203
|
+
pass
|
|
204
|
+
|
|
205
|
+
def on_key_up(self, key, mod, unicode, scancode, window=None):
|
|
206
|
+
pass
|
|
207
|
+
|
|
208
|
+
# ---------- Mouse Event Hooks ----------
|
|
209
|
+
def on_mouse_motion(self, pos, rel, buttons, touch=0, window=None):
|
|
210
|
+
pass
|
|
211
|
+
|
|
212
|
+
def on_mouse_button_down(self, pos, btn, touch=0, clicks=1, window=None):
|
|
213
|
+
pass
|
|
214
|
+
|
|
215
|
+
def on_mouse_button_up(self, pos, btn, touch=0, clicks=1, window=None):
|
|
216
|
+
pass
|
|
217
|
+
|
|
218
|
+
def on_mouse_wheel(self, which, flipped, x, y, touch=0, precise_x=0.0, precise_y=0.0, window=None):
|
|
219
|
+
pass
|
|
220
|
+
|
|
221
|
+
# ---------- Joystick Event Hooks ----------
|
|
222
|
+
def on_joy_axis_motion(self, instance_id, axis, value):
|
|
223
|
+
pass
|
|
224
|
+
|
|
225
|
+
def on_joy_ball_motion(self, instance_id, ball, rel):
|
|
226
|
+
pass
|
|
227
|
+
|
|
228
|
+
def on_joy_hat_motion(self, instance_id, hat, value):
|
|
229
|
+
pass
|
|
230
|
+
|
|
231
|
+
def on_joy_button_down(self, instance_id, button):
|
|
232
|
+
pass
|
|
233
|
+
|
|
234
|
+
def on_joy_button_up(self, instance_id, button):
|
|
235
|
+
pass
|
|
236
|
+
|
|
237
|
+
def on_joy_device_added(self, device_index):
|
|
238
|
+
pass
|
|
239
|
+
|
|
240
|
+
def on_joy_device_removed(self, instance_id):
|
|
241
|
+
pass
|
|
242
|
+
|
|
243
|
+
def on_controller_added(self, device_index):
|
|
244
|
+
pass
|
|
245
|
+
|
|
246
|
+
def on_controller_removed(self, instance_id):
|
|
247
|
+
pass
|
|
248
|
+
|
|
249
|
+
def on_controller_remapped(self, instance_id):
|
|
250
|
+
pass
|
|
251
|
+
|
|
252
|
+
# ---------- Window Event Hooks ----------
|
|
253
|
+
def on_window_shown(self, window=None):
|
|
254
|
+
pass
|
|
255
|
+
|
|
256
|
+
def on_window_hidden(self, window=None):
|
|
257
|
+
pass
|
|
258
|
+
|
|
259
|
+
def on_window_exposed(self, window=None):
|
|
260
|
+
pass
|
|
261
|
+
|
|
262
|
+
def on_window_moved(self, x, y, window=None):
|
|
263
|
+
pass
|
|
264
|
+
|
|
265
|
+
def on_window_size_changed(self, x, y, window=None):
|
|
266
|
+
pass
|
|
267
|
+
|
|
268
|
+
def on_window_resized(self, x, y, window=None):
|
|
269
|
+
pass
|
|
270
|
+
|
|
271
|
+
def on_window_minimized(self, window=None):
|
|
272
|
+
pass
|
|
273
|
+
|
|
274
|
+
def on_window_maximized(self, window=None):
|
|
275
|
+
pass
|
|
276
|
+
|
|
277
|
+
def on_window_restored(self, window=None):
|
|
278
|
+
pass
|
|
279
|
+
|
|
280
|
+
def on_window_enter(self, window=None):
|
|
281
|
+
pass
|
|
282
|
+
|
|
283
|
+
def on_window_leave(self, window=None):
|
|
284
|
+
pass
|
|
285
|
+
|
|
286
|
+
def on_window_focus_gained(self, window=None):
|
|
287
|
+
pass
|
|
288
|
+
|
|
289
|
+
def on_window_focus_lost(self, window=None):
|
|
290
|
+
pass
|
|
291
|
+
|
|
292
|
+
def on_window_close(self, window=None):
|
|
293
|
+
pass
|
|
294
|
+
|
|
295
|
+
def on_window_take_focus(self, window=None):
|
|
296
|
+
pass
|
|
297
|
+
|
|
298
|
+
def on_window_hit_test(self, window=None):
|
|
299
|
+
pass
|
|
300
|
+
|
|
301
|
+
def on_window_icc_changed(self, window=None):
|
|
302
|
+
pass
|
|
303
|
+
|
|
304
|
+
def on_window_display_changed(self, display_index, window=None):
|
|
305
|
+
pass
|
|
306
|
+
|
|
307
|
+
# ---------- Text Input Event Hooks ----------
|
|
308
|
+
def on_text_editing(self, text, start, length, window=None):
|
|
309
|
+
pass
|
|
310
|
+
|
|
311
|
+
def on_text_input(self, text, window=None):
|
|
312
|
+
pass
|
|
313
|
+
|
|
314
|
+
# ---------- Drop Event Hooks ----------
|
|
315
|
+
def on_drop_begin(self, window=None):
|
|
316
|
+
pass
|
|
317
|
+
|
|
318
|
+
def on_drop_file(self, file_path, window=None):
|
|
319
|
+
pass
|
|
320
|
+
|
|
321
|
+
def on_drop_text(self, text, window=None):
|
|
322
|
+
pass
|
|
323
|
+
|
|
324
|
+
def on_drop_complete(self, window=None):
|
|
325
|
+
pass
|
|
326
|
+
|
|
327
|
+
# ---------- Touch Event Hooks ----------
|
|
328
|
+
def on_finger_down(self, touch_id, finger_id, x, y, dx, dy, window=None):
|
|
329
|
+
pass
|
|
330
|
+
|
|
331
|
+
def on_finger_motion(self, touch_id, finger_id, x, y, dx, dy, window=None):
|
|
332
|
+
pass
|
|
333
|
+
|
|
334
|
+
def on_finger_up(self, touch_id, finger_id, x, y, dx, dy, window=None):
|
|
335
|
+
pass
|
|
336
|
+
|
|
337
|
+
def on_multi_gesture(self, touch_id, x, y, pinched, rotated, num_fingers, window=None):
|
|
338
|
+
pass
|
|
339
|
+
|
|
340
|
+
# ---------- MIDI Event Hooks ----------
|
|
341
|
+
def on_audio_added(self, which, is_capture):
|
|
342
|
+
pass
|
|
343
|
+
|
|
344
|
+
def on_audio_removed(self, which, is_capture):
|
|
345
|
+
pass
|
|
346
|
+
|
|
347
|
+
# ---------- APP Event Hooks ----------
|
|
348
|
+
def on_app_terminating(self):
|
|
349
|
+
pass
|
|
350
|
+
|
|
351
|
+
def on_app_low_memory(self):
|
|
352
|
+
pass
|
|
353
|
+
|
|
354
|
+
def on_app_will_background(self):
|
|
355
|
+
pass
|
|
356
|
+
|
|
357
|
+
def on_app_did_background(self):
|
|
358
|
+
pass
|
|
359
|
+
|
|
360
|
+
def on_app_will_foreground(self):
|
|
361
|
+
pass
|
|
362
|
+
|
|
363
|
+
def on_app_did_foreground(self):
|
|
364
|
+
pass
|
|
365
|
+
|
|
366
|
+
# ---------- Other Event Hooks ----------
|
|
367
|
+
def on_keymap_changed(self):
|
|
368
|
+
pass
|
|
369
|
+
|
|
370
|
+
def on_clipboard_update(self):
|
|
371
|
+
pass
|
|
372
|
+
|
|
373
|
+
def on_locale_changed(self):
|
|
374
|
+
pass
|
|
375
|
+
|
|
376
|
+
def on_render_target_reset(self):
|
|
377
|
+
pass
|
|
378
|
+
|
|
379
|
+
def on_render_device_reset(self):
|
|
380
|
+
pass
|
|
381
|
+
|
|
382
|
+
# ---------- User Event Hooks ----------
|
|
383
|
+
def on_user_event(self, event):
|
|
384
|
+
pass
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
def get_fps():
|
|
388
|
+
return Game._instance._fps
|
|
389
|
+
|
|
390
|
+
def set_fps(value:int):
|
|
391
|
+
Game._instance._fps = value
|
|
392
|
+
|
|
393
|
+
def get_screen():
|
|
394
|
+
return Game._instance._screen
|
|
395
|
+
|
|
396
|
+
def quit():
|
|
397
|
+
Game._instance._running = False
|
|
398
|
+
|
|
399
|
+
def get_pressed_keys():
|
|
400
|
+
return pygame.key.get_pressed()
|
|
401
|
+
|
|
402
|
+
def get_pressed_buttons():
|
|
403
|
+
return pygame.mouse.get_pressed()
|
|
404
|
+
|
|
@@ -10,7 +10,8 @@ from pygamestudio.game.object.text import *
|
|
|
10
10
|
from pygamestudio.game.object.ellipse import *
|
|
11
11
|
from pygamestudio.game.object.line import *
|
|
12
12
|
from pygamestudio.game.object.image import *
|
|
13
|
-
from pygamestudio.
|
|
13
|
+
from pygamestudio.game.object.button import *
|
|
14
|
+
from pygamestudio.api.config.project import get_project_config
|
|
14
15
|
from pygamestudio.common.i18n.translator import Translator as T
|
|
15
16
|
|
|
16
17
|
|
|
@@ -81,6 +82,8 @@ class SceneLoader:
|
|
|
81
82
|
obj = ObjectLine(self, object_data, is_for_api=True)
|
|
82
83
|
elif object_type == OBJECT_IMAGE:
|
|
83
84
|
obj = ObjectImage(self, object_data, is_for_api=True)
|
|
85
|
+
elif object_type == OBJECT_BUTTON:
|
|
86
|
+
obj = ObjectButton(self, object_data, is_for_api=True)
|
|
84
87
|
return obj
|
|
85
88
|
|
|
86
89
|
def _add_object_tree_struct(self, parent_uuid, object_tree_struct_to_add):
|
|
@@ -190,6 +193,22 @@ class SceneLoader:
|
|
|
190
193
|
object_tree_struct = self._get_object_tree_struct_by_uuid(object_uuid)
|
|
191
194
|
return object_tree_struct[object_uuid]['object'] if object_tree_struct else None
|
|
192
195
|
|
|
196
|
+
def get_parent_object(self, object_uuid:str):
|
|
197
|
+
def _get(object_uuid, object_tree_struct):
|
|
198
|
+
value = list(object_tree_struct.values())[0]
|
|
199
|
+
|
|
200
|
+
if object_uuid in [list(child_object_tree_struct.keys())[0] for child_object_tree_struct in value['children']]:
|
|
201
|
+
return value['object']
|
|
202
|
+
|
|
203
|
+
for child_object_tree_struct in value['children']:
|
|
204
|
+
result = _get(object_uuid, child_object_tree_struct)
|
|
205
|
+
if result:
|
|
206
|
+
return result
|
|
207
|
+
|
|
208
|
+
return None
|
|
209
|
+
|
|
210
|
+
return _get(object_uuid, self._all_object_tree_struct)
|
|
211
|
+
|
|
193
212
|
|
|
194
213
|
scene_loader = SceneLoader()
|
|
195
214
|
|
|
@@ -200,4 +219,7 @@ def get_object_by_path(object_path:str) -> object:
|
|
|
200
219
|
return scene_loader.get_object_by_path(object_path)
|
|
201
220
|
|
|
202
221
|
def get_object_by_uuid(object_uuid:str) -> object:
|
|
203
|
-
return scene_loader.get_object_by_uuid(object_uuid)
|
|
222
|
+
return scene_loader.get_object_by_uuid(object_uuid)
|
|
223
|
+
|
|
224
|
+
def get_parent_object(object_uuid:str) -> object:
|
|
225
|
+
return scene_loader.get_parent_object(object_uuid)
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import pygame
|
|
2
|
+
|
|
3
|
+
# ----------- Keyboard Event Constant -----------
|
|
4
|
+
K_BACKSPACE = pygame.K_BACKSPACE
|
|
5
|
+
K_TAB = pygame.K_TAB
|
|
6
|
+
K_CLEAR = pygame.K_CLEAR
|
|
7
|
+
K_RETURN = pygame.K_RETURN
|
|
8
|
+
K_PAUSE = pygame.K_PAUSE
|
|
9
|
+
K_ESCAPE = pygame.K_ESCAPE
|
|
10
|
+
K_SPACE = pygame.K_SPACE
|
|
11
|
+
K_EXCLAIM = pygame.K_EXCLAIM
|
|
12
|
+
K_QUOTEDBL = pygame.K_QUOTEDBL
|
|
13
|
+
K_HASH = pygame.K_HASH
|
|
14
|
+
K_DOLLAR = pygame.K_DOLLAR
|
|
15
|
+
K_AMPERSAND = pygame.K_AMPERSAND
|
|
16
|
+
K_QUOTE = pygame.K_QUOTE
|
|
17
|
+
K_LEFTPAREN = pygame.K_LEFTPAREN
|
|
18
|
+
K_RIGHTPAREN = pygame.K_RIGHTPAREN
|
|
19
|
+
K_ASTERISK = pygame.K_ASTERISK
|
|
20
|
+
K_PLUS = pygame.K_PLUS
|
|
21
|
+
K_COMMA = pygame.K_COMMA
|
|
22
|
+
K_MINUS = pygame.K_MINUS
|
|
23
|
+
K_PERIOD = pygame.K_PERIOD
|
|
24
|
+
K_SLASH = pygame.K_SLASH
|
|
25
|
+
K_0 = pygame.K_0
|
|
26
|
+
K_1 = pygame.K_1
|
|
27
|
+
K_2 = pygame.K_2
|
|
28
|
+
K_3 = pygame.K_3
|
|
29
|
+
K_4 = pygame.K_4
|
|
30
|
+
K_5 = pygame.K_5
|
|
31
|
+
K_6 = pygame.K_6
|
|
32
|
+
K_7 = pygame.K_7
|
|
33
|
+
K_8 = pygame.K_8
|
|
34
|
+
K_9 = pygame.K_9
|
|
35
|
+
K_COLON = pygame.K_COLON
|
|
36
|
+
K_SEMICOLON = pygame.K_SEMICOLON
|
|
37
|
+
K_LESS = pygame.K_LESS
|
|
38
|
+
K_EQUALS = pygame.K_EQUALS
|
|
39
|
+
K_GREATER = pygame.K_GREATER
|
|
40
|
+
K_QUESTION = pygame.K_QUESTION
|
|
41
|
+
K_AT = pygame.K_AT
|
|
42
|
+
K_LEFTBRACKET = pygame.K_LEFTBRACKET
|
|
43
|
+
K_BACKSLASH = pygame.K_BACKSLASH
|
|
44
|
+
K_RIGHTBRACKET = pygame.K_RIGHTBRACKET
|
|
45
|
+
K_CARET = pygame.K_CARET
|
|
46
|
+
K_UNDERSCORE = pygame.K_UNDERSCORE
|
|
47
|
+
K_BACKQUOTE = pygame.K_BACKQUOTE
|
|
48
|
+
K_a = pygame.K_a
|
|
49
|
+
K_b = pygame.K_b
|
|
50
|
+
K_c = pygame.K_c
|
|
51
|
+
K_d = pygame.K_d
|
|
52
|
+
K_e = pygame.K_e
|
|
53
|
+
K_f = pygame.K_f
|
|
54
|
+
K_g = pygame.K_g
|
|
55
|
+
K_h = pygame.K_h
|
|
56
|
+
K_i = pygame.K_i
|
|
57
|
+
K_j = pygame.K_j
|
|
58
|
+
K_k = pygame.K_k
|
|
59
|
+
K_l = pygame.K_l
|
|
60
|
+
K_m = pygame.K_m
|
|
61
|
+
K_n = pygame.K_n
|
|
62
|
+
K_o = pygame.K_o
|
|
63
|
+
K_p = pygame.K_p
|
|
64
|
+
K_q = pygame.K_q
|
|
65
|
+
K_r = pygame.K_r
|
|
66
|
+
K_s = pygame.K_s
|
|
67
|
+
K_t = pygame.K_t
|
|
68
|
+
K_u = pygame.K_u
|
|
69
|
+
K_v = pygame.K_v
|
|
70
|
+
K_w = pygame.K_w
|
|
71
|
+
K_x = pygame.K_x
|
|
72
|
+
K_y = pygame.K_y
|
|
73
|
+
K_z = pygame.K_z
|
|
74
|
+
K_DELETE = pygame.K_DELETE
|
|
75
|
+
K_KP0 = pygame.K_KP0
|
|
76
|
+
K_KP1 = pygame.K_KP1
|
|
77
|
+
K_KP2 = pygame.K_KP2
|
|
78
|
+
K_KP3 = pygame.K_KP3
|
|
79
|
+
K_KP4 = pygame.K_KP4
|
|
80
|
+
K_KP5 = pygame.K_KP5
|
|
81
|
+
K_KP6 = pygame.K_KP6
|
|
82
|
+
K_KP7 = pygame.K_KP7
|
|
83
|
+
K_KP8 = pygame.K_KP8
|
|
84
|
+
K_KP9 = pygame.K_KP9
|
|
85
|
+
K_KP_PERIOD = pygame.K_KP_PERIOD
|
|
86
|
+
K_KP_DIVIDE = pygame.K_KP_DIVIDE
|
|
87
|
+
K_KP_MULTIPLY = pygame.K_KP_MULTIPLY
|
|
88
|
+
K_KP_MINUS = pygame.K_KP_MINUS
|
|
89
|
+
K_KP_PLUS = pygame.K_KP_PLUS
|
|
90
|
+
K_KP_ENTER = pygame.K_KP_ENTER
|
|
91
|
+
K_KP_EQUALS = pygame.K_KP_EQUALS
|
|
92
|
+
K_UP = pygame.K_UP
|
|
93
|
+
K_DOWN = pygame.K_DOWN
|
|
94
|
+
K_RIGHT = pygame.K_RIGHT
|
|
95
|
+
K_LEFT = pygame.K_LEFT
|
|
96
|
+
K_INSERT = pygame.K_INSERT
|
|
97
|
+
K_HOME = pygame.K_HOME
|
|
98
|
+
K_END = pygame.K_END
|
|
99
|
+
K_PAGEUP = pygame.K_PAGEUP
|
|
100
|
+
K_PAGEDOWN = pygame.K_PAGEDOWN
|
|
101
|
+
K_F1 = pygame.K_F1
|
|
102
|
+
K_F2 = pygame.K_F2
|
|
103
|
+
K_F3 = pygame.K_F3
|
|
104
|
+
K_F4 = pygame.K_F4
|
|
105
|
+
K_F5 = pygame.K_F5
|
|
106
|
+
K_F6 = pygame.K_F6
|
|
107
|
+
K_F7 = pygame.K_F7
|
|
108
|
+
K_F8 = pygame.K_F8
|
|
109
|
+
K_F9 = pygame.K_F9
|
|
110
|
+
K_F10 = pygame.K_F10
|
|
111
|
+
K_F11 = pygame.K_F11
|
|
112
|
+
K_F12 = pygame.K_F12
|
|
113
|
+
K_F13 = pygame.K_F13
|
|
114
|
+
K_F14 = pygame.K_F14
|
|
115
|
+
K_F15 = pygame.K_F15
|
|
116
|
+
K_NUMLOCK = pygame.K_NUMLOCK
|
|
117
|
+
K_CAPSLOCK = pygame.K_CAPSLOCK
|
|
118
|
+
K_SCROLLOCK = pygame.K_SCROLLOCK
|
|
119
|
+
K_RSHIFT = pygame.K_RSHIFT
|
|
120
|
+
K_LSHIFT = pygame.K_LSHIFT
|
|
121
|
+
K_RCTRL = pygame.K_RCTRL
|
|
122
|
+
K_LCTRL = pygame.K_LCTRL
|
|
123
|
+
K_RALT = pygame.K_RALT
|
|
124
|
+
K_LALT = pygame.K_LALT
|
|
125
|
+
K_RMETA = pygame.K_RMETA
|
|
126
|
+
K_LMETA = pygame.K_LMETA
|
|
127
|
+
K_LSUPER = pygame.K_LSUPER
|
|
128
|
+
K_RSUPER = pygame.K_RSUPER
|
|
129
|
+
K_MODE = pygame.K_MODE
|
|
130
|
+
K_HELP = pygame.K_HELP
|
|
131
|
+
K_PRINT = pygame.K_PRINT
|
|
132
|
+
K_SYSREQ = pygame.K_SYSREQ
|
|
133
|
+
K_BREAK = pygame.K_BREAK
|
|
134
|
+
K_MENU = pygame.K_MENU
|
|
135
|
+
K_POWER = pygame.K_POWER
|
|
136
|
+
K_EURO = pygame.K_EURO
|
|
137
|
+
K_AC_BACK = pygame.K_AC_BACK
|
|
138
|
+
KMOD_NONE = pygame.KMOD_NONE
|
|
139
|
+
KMOD_LSHIFT = pygame.KMOD_LSHIFT
|
|
140
|
+
KMOD_RSHIFT = pygame.KMOD_RSHIFT
|
|
141
|
+
KMOD_SHIFT = pygame.KMOD_SHIFT
|
|
142
|
+
KMOD_LCTRL = pygame.KMOD_LCTRL
|
|
143
|
+
KMOD_RCTRL = pygame.KMOD_RCTRL
|
|
144
|
+
KMOD_CTRL = pygame.KMOD_CTRL
|
|
145
|
+
KMOD_LALT = pygame.KMOD_LALT
|
|
146
|
+
KMOD_RALT = pygame.KMOD_RALT
|
|
147
|
+
KMOD_ALT = pygame.KMOD_ALT
|
|
148
|
+
KMOD_LMETA = pygame.KMOD_LMETA
|
|
149
|
+
KMOD_RMETA = pygame.KMOD_RMETA
|
|
150
|
+
KMOD_META = pygame.KMOD_META
|
|
151
|
+
KMOD_CAPS = pygame.KMOD_CAPS
|
|
152
|
+
KMOD_NUM = pygame.KMOD_NUM
|
|
153
|
+
KMOD_MODE = pygame.KMOD_MODE
|
|
Binary file
|
{pygamestudio-1.0.0.dev3 → pygamestudio-1.0.0.dev5}/src/pygamestudio/common/res/resources.qrc
RENAMED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<qresource prefix="/">
|
|
3
3
|
<file>images/add_item.png</file>
|
|
4
4
|
<file>images/add.png</file>
|
|
5
|
+
<file>images/button.png</file>
|
|
5
6
|
<file>images/browse.png</file>
|
|
6
7
|
<file>images/canvas.png</file>
|
|
7
8
|
<file>images/check.png</file>
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
<file>images/image.png</file>
|
|
20
21
|
<file>images/import_project.png</file>
|
|
21
22
|
<file>images/info.png</file>
|
|
23
|
+
<file>images/left_arrow_gray.png</file>
|
|
22
24
|
<file>images/left_arrow.png</file>
|
|
23
25
|
<file>images/line.png</file>
|
|
24
26
|
<file>images/logo.png</file>
|
|
@@ -29,6 +31,7 @@
|
|
|
29
31
|
<file>images/project_icon.png</file>
|
|
30
32
|
<file>images/rect.png</file>
|
|
31
33
|
<file>images/refresh_asset.png</file>
|
|
34
|
+
<file>images/right_arrow_gray.png</file>
|
|
32
35
|
<file>images/right_arrow.png</file>
|
|
33
36
|
<file>images/run.png</file>
|
|
34
37
|
<file>images/search.png</file>
|