pygamestudio 1.0.0.dev4__tar.gz → 1.0.0.dev6__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.dev6/.gitignore +6 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/PKG-INFO +3 -3
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/README.md +1 -1
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/README_zh-CN.md +1 -1
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/pyproject.toml +2 -2
- pygamestudio-1.0.0.dev6/src/pygamestudio/__init__.py +1 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/api/__init__.py +7 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/api/core/audio.py +217 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/api/core/game.py +426 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/api/runtime → pygamestudio-1.0.0.dev6/src/pygamestudio/api/core}/scene.py +145 -6
- pygamestudio-1.0.0.dev6/src/pygamestudio/api/event/constant.py +153 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/i18n/languages/en.json +21 -3
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/i18n/languages/zh_CN.json +22 -4
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/i18n/translator.py +16 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/common/res/audios/game_start.mp3 +0 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/common/res/images/button.png +0 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/common/res/images/left_arrow_gray.png +0 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/common/res/images/right_arrow_gray.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/qss/dark.qss +8 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/qss/light.qss +8 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/resources.qrc +3 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/resources_rc.py +312 -25
- pygamestudio-1.0.0.dev6/src/pygamestudio/common/res/templates/main_template.py +47 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/common/res/templates/object_script_template.py +12 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/common/utils/constant.py +1 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/utils/path.py +7 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/common/utils/system.py +87 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/game/core/command.py +117 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/game/core/manager.py +385 -158
- pygamestudio-1.0.0.dev6/src/pygamestudio/game/object/__init__.py +8 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/game/object/base.py +387 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/game/object/button.py +156 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/game/object/canvas.py +8 -4
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/game/object/ellipse.py +8 -7
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/game/object/image.py +14 -8
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/game/object/line.py +60 -7
- pygamestudio-1.0.0.dev6/src/pygamestudio/game/object/rect.py +97 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/game/object/text.py +71 -17
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/game/object/type.py +2 -1
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/asset/delegate.py +1 -1
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/asset/tree.py +46 -13
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/base/window.py +90 -43
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/console/browser.py +55 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/console/widget.py +2 -3
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/console/window.py +6 -3
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/config.py +5 -5
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/dialog.py +2 -1
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/list.py +29 -11
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/hierarchy/delegate.py +1 -1
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/hierarchy/menu.py +3 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/hierarchy/tree.py +11 -7
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/hierarchy/widget.py +3 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/gui/inspector/color.py +651 -0
- pygamestudio-1.0.0.dev6/src/pygamestudio/gui/inspector/component/lineedit.py +353 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/component/picker.py +7 -7
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/container.py +112 -11
- pygamestudio-1.0.0.dev6/src/pygamestudio/gui/inspector/layout/button.py +119 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/layout/canvas.py +12 -1
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/layout/ellipse.py +12 -1
- pygamestudio-1.0.0.dev4/src/pygamestudio/gui/inspector/layout/rect.py → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/inspector/layout/image.py +25 -2
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/layout/line.py +12 -1
- pygamestudio-1.0.0.dev4/src/pygamestudio/gui/inspector/layout/image.py → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/inspector/layout/rect.py +8 -9
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/layout/text.py +20 -9
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/widget.py +20 -2
- pygamestudio-1.0.0.dev6/src/pygamestudio/gui/inspector/window.py +67 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/scene/gizmo.py +49 -4
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/scene/screen.py +27 -21
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/settings/project.py +0 -2
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/window.py +27 -4
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/main.py +16 -0
- pygamestudio-1.0.0.dev4/.gitignore +0 -4
- pygamestudio-1.0.0.dev4/src/pygamestudio/common/res/templates/main_template.py +0 -36
- pygamestudio-1.0.0.dev4/src/pygamestudio/common/utils/constant.py +0 -1
- pygamestudio-1.0.0.dev4/src/pygamestudio/game/object/base.py +0 -100
- pygamestudio-1.0.0.dev4/src/pygamestudio/game/object/rect.py +0 -55
- pygamestudio-1.0.0.dev4/src/pygamestudio/gui/inspector/component/lineedit.py +0 -188
- pygamestudio-1.0.0.dev4/src/pygamestudio/gui/inspector/window.py +0 -44
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/.github/FUNDING.yml +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/LICENSE +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio → pygamestudio-1.0.0.dev6/src/pygamestudio/api/config}/__init__.py +0 -0
- /pygamestudio-1.0.0.dev4/src/pygamestudio/api/runtime/config.py → /pygamestudio-1.0.0.dev6/src/pygamestudio/api/config/project.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/api/runtime → pygamestudio-1.0.0.dev6/src/pygamestudio/api/core}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/common → pygamestudio-1.0.0.dev6/src/pygamestudio/api/event}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/common/i18n → pygamestudio-1.0.0.dev6/src/pygamestudio/common}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/game → pygamestudio-1.0.0.dev6/src/pygamestudio/common/i18n}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/fonts/SIMHEI.ttf +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/add.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/add_item.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/browse.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/canvas.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/check.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/clear.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/close.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/create_project.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/down_arrow.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/ellipse.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/error.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/expand_or_collapse_all.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/eye_closed.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/eye_off.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/eye_open.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/heart.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/image.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/import_project.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/info.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/left_arrow.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/line.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/logo.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/maximize.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/maximize_disabled.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/minimize.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/normalize.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/project_icon.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/rect.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/refresh_asset.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/right_arrow.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/run.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/search.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/sort.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/text.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/tree_arrow_down.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/tree_arrow_right.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/up_arrow.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/images/warning.png +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/templates/editor_template.pygs +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/res/templates/project_template.pygs +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/utils/config.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/common/utils/theme.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/game/core → pygamestudio-1.0.0.dev6/src/pygamestudio/game}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/gui → pygamestudio-1.0.0.dev6/src/pygamestudio/game/core}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/gui/about → pygamestudio-1.0.0.dev6/src/pygamestudio/gui}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/gui/build → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/about}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/about/window.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/asset/menu.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/asset/model.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/asset/search.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/asset/type.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/asset/widget.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/asset/window.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/gui/console → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/build}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/build/desktop.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/build/window.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/gui/dashboard → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/console}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/console/logger.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/console/menu.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/console/search.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/console/type.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/gui/hierarchy → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/dashboard}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/delegate.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/menu.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/model.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/search.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/type.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/widget.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/dashboard/window.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/gui/inspector → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/hierarchy}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/hierarchy/search.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/hierarchy/window.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/gui/scene → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/inspector}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/game/object → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/inspector/component}/button.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/component/checkbox.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/component/combobox.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/component/label.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/component/spinbox.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/inspector/component/textedit.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/main.py +0 -0
- {pygamestudio-1.0.0.dev4/src/pygamestudio/gui/settings → pygamestudio-1.0.0.dev6/src/pygamestudio/gui/scene}/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/scene/grid.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/scene/widget.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/scene/window.py +0 -0
- /pygamestudio-1.0.0.dev4/src/pygamestudio/gui/inspector/component/button.py → /pygamestudio-1.0.0.dev6/src/pygamestudio/gui/settings/__init__.py +0 -0
- {pygamestudio-1.0.0.dev4 → pygamestudio-1.0.0.dev6}/src/pygamestudio/gui/settings/editor.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pygamestudio
|
|
3
|
-
Version: 1.0.0.
|
|
4
|
-
Summary: Let's create
|
|
3
|
+
Version: 1.0.0.dev6
|
|
4
|
+
Summary: Let's create python games visually!
|
|
5
5
|
Project-URL: Documentation, https://pygamestudio.com/tutorial/installation
|
|
6
6
|
Project-URL: Homepage, https://pygamestudio.com
|
|
7
7
|
Project-URL: Github, https://github.com/pygamestudio/pygamestudio
|
|
@@ -42,7 +42,7 @@ Description-Content-Type: text/markdown
|
|
|
42
42
|
English | [简体中文](https://github.com/pygamestudio/pygamestudio/blob/main/README_zh-CN.md)
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
|
-
**Pygame Studio** is a visual editor built
|
|
45
|
+
**Pygame Studio** is a visual editor built with **PyGame-ce** and **PySide6**, designed to help users create Python games visually, making it easier for beginners, students, and hobby developers to get started with game development.
|
|
46
46
|
|
|
47
47
|
<br>
|
|
48
48
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
English | [简体中文](https://github.com/pygamestudio/pygamestudio/blob/main/README_zh-CN.md)
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
**Pygame Studio** is a visual editor built
|
|
16
|
+
**Pygame Studio** is a visual editor built with **PyGame-ce** and **PySide6**, designed to help users create Python games visually, making it easier for beginners, students, and hobby developers to get started with game development.
|
|
17
17
|
|
|
18
18
|
<br>
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[English](https://github.com/pygamestudio/pygamestudio) | 简体中文
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
**Pygame Studio**
|
|
16
|
+
**Pygame Studio** 是基于 **PyGame-ce** 和 **PySide6** 打造的可视化编辑器,支持以可视化方式制作 Python 游戏,让编程新手、在校学生以及业余开发者都能更轻松地入门游戏开发。
|
|
17
17
|
|
|
18
18
|
<br>
|
|
19
19
|
|
|
@@ -4,9 +4,9 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pygamestudio"
|
|
7
|
-
version = "1.0.0.
|
|
7
|
+
version = "1.0.0.dev6"
|
|
8
8
|
authors = [{ name="Louis Ren", email="louis@pygamestudio.com" }]
|
|
9
|
-
description = "Let's create
|
|
9
|
+
description = "Let's create python games visually!"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
license-files = ["LICEN[CS]E*"]
|
|
12
12
|
requires-python = ">=3.9"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .api import *
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Audio manager API for generated games.
|
|
3
|
+
|
|
4
|
+
Provides a simple interface to play sound effects and background music:
|
|
5
|
+
|
|
6
|
+
import pygamestudio as studio
|
|
7
|
+
|
|
8
|
+
studio.play_sound('./audio/jump.wav')
|
|
9
|
+
studio.play_music('./audio/bgm.ogg', loops=-1)
|
|
10
|
+
studio.set_music_volume(0.5)
|
|
11
|
+
studio.stop_sound('./audio/jump.wav')
|
|
12
|
+
|
|
13
|
+
Sound files are resolved relative to the project path (the project's `audio/`
|
|
14
|
+
folder). The audio mixer is initialized lazily on first use; if no audio device
|
|
15
|
+
is available, all calls become no-ops with a warning instead of crashing.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
import os
|
|
19
|
+
import pygame
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
from pygamestudio.common.i18n.translator import Translator as T
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class AudioManager:
|
|
25
|
+
def __init__(self):
|
|
26
|
+
self._is_available = False
|
|
27
|
+
self._sounds = {} # absolute path -> pygame.mixer.Sound
|
|
28
|
+
self._looping_channels = {} # absolute path -> Channel (looping sfx)
|
|
29
|
+
self._music_volume = 1.0
|
|
30
|
+
|
|
31
|
+
# ---------- internals ----------
|
|
32
|
+
|
|
33
|
+
def _init_mixer(self) -> bool:
|
|
34
|
+
"""Initialize pygame.mixer lazily. Returns False when audio is unavailable."""
|
|
35
|
+
if self._is_available:
|
|
36
|
+
return True
|
|
37
|
+
try:
|
|
38
|
+
if not pygame.mixer.get_init():
|
|
39
|
+
pygame.mixer.init()
|
|
40
|
+
self._is_available = True
|
|
41
|
+
except Exception as e:
|
|
42
|
+
print(T.tr('api.fail_to_init_mixer', 'Failed to initialize audio mixer: {}').format(e))
|
|
43
|
+
self._is_available = False
|
|
44
|
+
return self._is_available
|
|
45
|
+
|
|
46
|
+
def _resolve_path(self, sound_path) -> Path:
|
|
47
|
+
path = Path(sound_path)
|
|
48
|
+
if path.is_absolute():
|
|
49
|
+
return path
|
|
50
|
+
return Path(os.environ.get('PROJECT_PATH', '')) / path
|
|
51
|
+
|
|
52
|
+
def _load_sound(self, sound_path):
|
|
53
|
+
if not self._init_mixer():
|
|
54
|
+
return None
|
|
55
|
+
|
|
56
|
+
absolute_path = self._resolve_path(sound_path)
|
|
57
|
+
if not absolute_path.exists():
|
|
58
|
+
print(T.tr('api.no_sound_path', 'The sound path {} does not exist.').format(absolute_path))
|
|
59
|
+
return None
|
|
60
|
+
|
|
61
|
+
key = absolute_path.as_posix()
|
|
62
|
+
if key not in self._sounds:
|
|
63
|
+
try:
|
|
64
|
+
self._sounds[key] = pygame.mixer.Sound(str(absolute_path))
|
|
65
|
+
except Exception as e:
|
|
66
|
+
print(T.tr('api.fail_to_load_sound', 'Failed to load sound {}: {}').format(absolute_path, e))
|
|
67
|
+
return None
|
|
68
|
+
return self._sounds[key]
|
|
69
|
+
|
|
70
|
+
# ---------- sound effects ----------
|
|
71
|
+
|
|
72
|
+
def load_sound(self, sound_path):
|
|
73
|
+
"""Load (and cache) a sound effect. Returns a pygame Sound or None."""
|
|
74
|
+
return self._load_sound(sound_path)
|
|
75
|
+
|
|
76
|
+
def play_sound(self, sound_path, volume=1.0, loops=0, fade_ms=0):
|
|
77
|
+
"""
|
|
78
|
+
Play a sound effect. Returns the pygame Channel, or None on failure.
|
|
79
|
+
|
|
80
|
+
:param sound_path: path relative to the project (e.g. './audio/jump.wav')
|
|
81
|
+
:param volume: playback volume in [0.0, 1.0]
|
|
82
|
+
:param loops: 0 = play once, -1 = loop forever, N = play N+1 times
|
|
83
|
+
:param fade_ms: fade-in duration in milliseconds
|
|
84
|
+
"""
|
|
85
|
+
sound = self._load_sound(sound_path)
|
|
86
|
+
if sound is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
try:
|
|
90
|
+
channel = sound.play(loops=loops, fade_ms=fade_ms)
|
|
91
|
+
if channel:
|
|
92
|
+
channel.set_volume(max(0.0, min(1.0, float(volume))))
|
|
93
|
+
if loops != 0:
|
|
94
|
+
self._looping_channels[self._resolve_path(sound_path).as_posix()] = channel
|
|
95
|
+
return channel
|
|
96
|
+
except Exception as e:
|
|
97
|
+
print(T.tr('api.fail_to_play_sound', 'Failed to play sound {}: {}').format(self._resolve_path(sound_path), e))
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
def stop_sound(self, sound_path):
|
|
101
|
+
"""Stop a looping sound effect started with play_sound(loops=...)."""
|
|
102
|
+
key = self._resolve_path(sound_path).as_posix()
|
|
103
|
+
channel = self._looping_channels.pop(key, None)
|
|
104
|
+
if channel:
|
|
105
|
+
channel.stop()
|
|
106
|
+
|
|
107
|
+
def stop_all_sounds(self):
|
|
108
|
+
"""Stop every currently playing sound effect."""
|
|
109
|
+
if self._is_available:
|
|
110
|
+
pygame.mixer.stop()
|
|
111
|
+
self._looping_channels.clear()
|
|
112
|
+
|
|
113
|
+
# ---------- background music ----------
|
|
114
|
+
|
|
115
|
+
def play_music(self, music_path, loops=-1, fade_ms=0):
|
|
116
|
+
"""
|
|
117
|
+
Play a background music track (one stream at a time).
|
|
118
|
+
|
|
119
|
+
:param music_path: path relative to the project (e.g. './audio/bgm.ogg')
|
|
120
|
+
:param loops: -1 = loop forever (default), 0 = play once
|
|
121
|
+
:param fade_ms: fade-in duration in milliseconds
|
|
122
|
+
"""
|
|
123
|
+
if not self._init_mixer():
|
|
124
|
+
return False
|
|
125
|
+
|
|
126
|
+
absolute_path = self._resolve_path(music_path)
|
|
127
|
+
if not absolute_path.exists():
|
|
128
|
+
print(T.tr('api.no_sound_path', 'The sound path {} does not exist.').format(absolute_path))
|
|
129
|
+
return False
|
|
130
|
+
|
|
131
|
+
try:
|
|
132
|
+
pygame.mixer.music.load(str(absolute_path))
|
|
133
|
+
pygame.mixer.music.set_volume(self._music_volume)
|
|
134
|
+
pygame.mixer.music.play(loops=loops, fade_ms=fade_ms)
|
|
135
|
+
return True
|
|
136
|
+
except Exception as e:
|
|
137
|
+
print(T.tr('api.fail_to_play_music', 'Failed to play music {}: {}').format(absolute_path, e))
|
|
138
|
+
return False
|
|
139
|
+
|
|
140
|
+
def stop_music(self, fade_ms=0):
|
|
141
|
+
"""Stop the background music (with an optional fade-out in ms)."""
|
|
142
|
+
if not self._is_available:
|
|
143
|
+
return
|
|
144
|
+
if fade_ms > 0:
|
|
145
|
+
pygame.mixer.music.fadeout(fade_ms)
|
|
146
|
+
else:
|
|
147
|
+
pygame.mixer.music.stop()
|
|
148
|
+
|
|
149
|
+
def pause_music(self):
|
|
150
|
+
if self._is_available:
|
|
151
|
+
pygame.mixer.music.pause()
|
|
152
|
+
|
|
153
|
+
def resume_music(self):
|
|
154
|
+
if self._is_available:
|
|
155
|
+
pygame.mixer.music.unpause()
|
|
156
|
+
|
|
157
|
+
def is_music_playing(self) -> bool:
|
|
158
|
+
if not self._is_available:
|
|
159
|
+
return False
|
|
160
|
+
return pygame.mixer.music.get_busy()
|
|
161
|
+
|
|
162
|
+
def set_music_volume(self, volume):
|
|
163
|
+
"""Set background music volume in [0.0, 1.0]."""
|
|
164
|
+
self._music_volume = max(0.0, min(1.0, float(volume)))
|
|
165
|
+
if self._is_available:
|
|
166
|
+
pygame.mixer.music.set_volume(self._music_volume)
|
|
167
|
+
|
|
168
|
+
def get_music_volume(self) -> float:
|
|
169
|
+
return self._music_volume
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
# Module-level singleton, mirroring scene_loader.
|
|
173
|
+
audio_manager = AudioManager()
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def load_sound(sound_path):
|
|
177
|
+
return audio_manager.load_sound(sound_path)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def play_sound(sound_path, volume=1.0, loops=0, fade_ms=0):
|
|
181
|
+
return audio_manager.play_sound(sound_path, volume, loops, fade_ms)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def stop_sound(sound_path):
|
|
185
|
+
return audio_manager.stop_sound(sound_path)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
def stop_all_sounds():
|
|
189
|
+
return audio_manager.stop_all_sounds()
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def play_music(music_path, loops=-1, fade_ms=0):
|
|
193
|
+
return audio_manager.play_music(music_path, loops, fade_ms)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def stop_music(fade_ms=0):
|
|
197
|
+
return audio_manager.stop_music(fade_ms)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def pause_music():
|
|
201
|
+
return audio_manager.pause_music()
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def resume_music():
|
|
205
|
+
return audio_manager.resume_music()
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def is_music_playing() -> bool:
|
|
209
|
+
return audio_manager.is_music_playing()
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def set_music_volume(volume):
|
|
213
|
+
return audio_manager.set_music_volume(volume)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def get_music_volume() -> float:
|
|
217
|
+
return audio_manager.get_music_volume()
|