VertexEngine 1.9.6__tar.gz → 2.0rc1__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.
- {vertexengine-1.9.6/src/VertexEngine.egg-info → vertexengine-2.0rc1}/PKG-INFO +21 -53
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/README.md +16 -46
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/pyproject.toml +5 -7
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/InputSystem/BtnInputs.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/InputSystem/Events.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/InputSystem/KeyInputs.py +6 -6
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/Vertex/__init__.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ChatBubble.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/CheckBox.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Counter.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Dropdown.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/List.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/OptionBtnWidget.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/StatusLight.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ToggleSwitch.py +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/WindowMods.py +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Windows.py +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py +6 -6
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/__init__.py +8 -9
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/_base.py +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/assets.py +49 -1
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/engine.py +10 -3
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/examples/games/snake/main.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/examples/test.py +4 -4
- {vertexengine-1.9.6 → vertexengine-2.0rc1/src/VertexEngine.egg-info}/PKG-INFO +21 -53
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine.egg-info/SOURCES.txt +3 -2
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine.egg-info/requires.txt +1 -1
- vertexengine-2.0rc1/tests/test_engine_delta_time.py +28 -0
- vertexengine-2.0rc1/tests/test_spritesheet_manager.py +15 -0
- vertexengine-1.9.6/src/VertexEngine/VertexScreenModifiers.py +0 -70
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/LICENSE +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/setup.cfg +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/Collisions/__init__.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/Collisions/collisions.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/Math/_Vector2.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/Math/__init__.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/PygameVWidgets/__init__.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/WHY.mp3 +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/audio.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/Wangi.png +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/main.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/universfield-ui-button-click-147358.mp3 +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/examples/pygwidget_test.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/scenes.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine.egg-info/dependency_links.txt +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine.egg-info/top_level.txt +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0rc1}/tests/test_pygame_vwidgets_style.py +0 -0
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: VertexEngine
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0rc1
|
|
4
4
|
Summary: A high-performance SDK for Python Development.
|
|
5
|
-
Author-email: Tyrel Miguel <
|
|
5
|
+
Author-email: Tyrel Miguel <FinalFacility0828@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://vertexengine-zii6.onrender.com
|
|
8
8
|
Project-URL: Documentation, https://vertexenginedocs.netlify.app
|
|
9
|
-
Project-URL:
|
|
10
|
-
Project-URL: Official Tech Site, https://tyrel.onrender.com
|
|
9
|
+
Project-URL: Developer Site, https://tyrel.onrender.com
|
|
11
10
|
Project-URL: Source, https://github.com/VertexEngine-Projects/VertexEngine-Code
|
|
12
11
|
Project-URL: Issues, https://github.com/VertexEngine-Projects/VertexEngine-Code/issues
|
|
13
|
-
|
|
14
|
-
Keywords: gamedev,game-development,game-engine,pyqt6,pygame,pygame-ce,sdk,gui
|
|
12
|
+
Keywords: gamedev,game-development,game-engine,PySide6,pygame,pygame-ce,sdk,gui
|
|
15
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
16
14
|
Classifier: Intended Audience :: Developers
|
|
17
15
|
Classifier: Topic :: Software Development :: Build Tools
|
|
@@ -28,7 +26,7 @@ Classifier: Operating System :: OS Independent
|
|
|
28
26
|
Requires-Python: >=3.10
|
|
29
27
|
Description-Content-Type: text/markdown
|
|
30
28
|
License-File: LICENSE
|
|
31
|
-
Requires-Dist:
|
|
29
|
+
Requires-Dist: PySide6>=6.7.0
|
|
32
30
|
Requires-Dist: pygame>=2.6; python_version < "3.14"
|
|
33
31
|
Requires-Dist: pygame-ce>=2.5.0; python_version >= "3.14"
|
|
34
32
|
Dynamic: license-file
|
|
@@ -48,8 +46,8 @@ Dynamic: license-file
|
|
|
48
46
|
</a>
|
|
49
47
|
</p>
|
|
50
48
|
|
|
51
|
-
# VertexEngine
|
|
52
|
-
VertexEngine is a GUI and Game Engine for
|
|
49
|
+
# VertexEngine
|
|
50
|
+
VertexEngine is a GUI and Game Engine for Python applications.
|
|
53
51
|
|
|
54
52
|
## Official Extensions:
|
|
55
53
|
- [VertexEngine-JSON](https://pypi.org/project/VertexEngine-json)
|
|
@@ -59,7 +57,10 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
59
57
|
- The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
60
58
|
- Support Email: FinalFacility0828@gmail.com
|
|
61
59
|
|
|
62
|
-
## Change Logs (1.8rc1 -
|
|
60
|
+
## Change Logs (1.8rc1 - 2.0rc1)
|
|
61
|
+
### 2.0rc1
|
|
62
|
+
- Added Spritesheets, Delta Time, New Import Shortcuts
|
|
63
|
+
- Fundemental Change: All Code references of PyQt6 have been replaced with the more lenient PySide6.
|
|
63
64
|
### 1.9.6
|
|
64
65
|
- Engine Optimizations
|
|
65
66
|
### 1.9.5
|
|
@@ -75,65 +76,32 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
75
76
|
### 1.9.1
|
|
76
77
|
- NEW DEMO
|
|
77
78
|
- How to Run: python3.x -m VertexEngine.examples.pygwidget_test
|
|
78
|
-
- Fixed engine clash bug (pygame and
|
|
79
|
+
- Fixed engine clash bug (pygame and PySide6 bug)
|
|
79
80
|
### 1.9
|
|
80
81
|
- FINALLY fixed the demos!
|
|
81
82
|
- how to run:
|
|
82
83
|
- Snake: python3.x -m VertexEngine.examples.games.snake.main
|
|
83
84
|
- Event tester: python3.x -m VertexEngine.examples.test
|
|
84
85
|
- I was very tired while making this so the RNG text was generated by AI. sory abt that :q
|
|
85
|
-
### 1.8.9
|
|
86
|
-
- Small optimizations
|
|
87
|
-
- Removed dependence on Python Garbage Collection.
|
|
88
|
-
### 1.8.7
|
|
89
|
-
- 3rd Final 1.8.x Branch Security Patch
|
|
90
|
-
- Final 1.8.x update is 1.8.9
|
|
91
|
-
- 1.9rc1 soon.
|
|
92
|
-
|
|
93
|
-
### 1.8.6
|
|
94
|
-
- Fixed Engine bugs
|
|
95
|
-
- Fixed mouse dragging events (EVENT-ID: 1024)
|
|
96
|
-
|
|
97
|
-
### 1.8.5
|
|
98
|
-
- Fixed buttons!
|
|
99
|
-
### 1.8.4
|
|
100
|
-
- Are you here?
|
|
101
|
-
- jk :D
|
|
102
|
-
- Bug fixes!
|
|
103
|
-
### 1.8.3
|
|
104
|
-
- Added some setup for the next versions!
|
|
105
|
-
- Inviting people to the VertexEngine Projects planned for VertexEngine 2.0.0
|
|
106
|
-
### 1.8.2
|
|
107
|
-
- Graphical Math Tweaks!
|
|
108
|
-
- Old classes now moved into Math
|
|
109
|
-
- GraphicalMath is now just Math
|
|
110
|
-
### 1.8.1
|
|
111
|
-
- Some Fixes!
|
|
112
|
-
- Tweaks!
|
|
113
|
-
### 1.8.0
|
|
114
|
-
- Updated Documentation!
|
|
115
|
-
- Engine Fixes!
|
|
116
|
-
### 1.8rc2
|
|
117
|
-
- Fixed math not defined errors
|
|
118
|
-
- Renamed to GraphicalMath
|
|
119
|
-
- Added the utility functions (clamp, lerp, etc.)
|
|
120
|
-
### 1.8rc1
|
|
121
|
-
- Patched some runtime errors
|
|
122
|
-
- Added MATH! (from VertexEngine.math import *)
|
|
123
86
|
|
|
124
87
|
## How to install VertexEngine:
|
|
125
|
-
|
|
88
|
+
Type in `pip install VertexEngine`
|
|
89
|
+
|
|
90
|
+
## Delta time
|
|
126
91
|
|
|
127
|
-
|
|
92
|
+
`GameEngine.delta_time` contains the elapsed time since the previous frame, in seconds. Use it to make movement independent of the frame rate:
|
|
128
93
|
|
|
129
|
-
|
|
94
|
+
```python
|
|
95
|
+
def update(self):
|
|
96
|
+
self.player.x += self.speed * self.engine.delta_time
|
|
97
|
+
```
|
|
130
98
|
|
|
131
99
|
## Dependencies
|
|
132
100
|
VertexEngine obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
133
101
|
|
|
134
102
|
| Dependency | Version |
|
|
135
103
|
|------------------|--------------------------------------|
|
|
136
|
-
|
|
|
104
|
+
| PySide6 | >=6.7 |
|
|
137
105
|
| Pygame | >=2.0 |
|
|
138
106
|
| Python | >=3.10 |
|
|
139
107
|
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
</a>
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
|
-
# VertexEngine
|
|
17
|
-
VertexEngine is a GUI and Game Engine for
|
|
16
|
+
# VertexEngine
|
|
17
|
+
VertexEngine is a GUI and Game Engine for Python applications.
|
|
18
18
|
|
|
19
19
|
## Official Extensions:
|
|
20
20
|
- [VertexEngine-JSON](https://pypi.org/project/VertexEngine-json)
|
|
@@ -24,7 +24,10 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
24
24
|
- The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
25
25
|
- Support Email: FinalFacility0828@gmail.com
|
|
26
26
|
|
|
27
|
-
## Change Logs (1.8rc1 -
|
|
27
|
+
## Change Logs (1.8rc1 - 2.0rc1)
|
|
28
|
+
### 2.0rc1
|
|
29
|
+
- Added Spritesheets, Delta Time, New Import Shortcuts
|
|
30
|
+
- Fundemental Change: All Code references of PyQt6 have been replaced with the more lenient PySide6.
|
|
28
31
|
### 1.9.6
|
|
29
32
|
- Engine Optimizations
|
|
30
33
|
### 1.9.5
|
|
@@ -40,65 +43,32 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
40
43
|
### 1.9.1
|
|
41
44
|
- NEW DEMO
|
|
42
45
|
- How to Run: python3.x -m VertexEngine.examples.pygwidget_test
|
|
43
|
-
- Fixed engine clash bug (pygame and
|
|
46
|
+
- Fixed engine clash bug (pygame and PySide6 bug)
|
|
44
47
|
### 1.9
|
|
45
48
|
- FINALLY fixed the demos!
|
|
46
49
|
- how to run:
|
|
47
50
|
- Snake: python3.x -m VertexEngine.examples.games.snake.main
|
|
48
51
|
- Event tester: python3.x -m VertexEngine.examples.test
|
|
49
52
|
- I was very tired while making this so the RNG text was generated by AI. sory abt that :q
|
|
50
|
-
### 1.8.9
|
|
51
|
-
- Small optimizations
|
|
52
|
-
- Removed dependence on Python Garbage Collection.
|
|
53
|
-
### 1.8.7
|
|
54
|
-
- 3rd Final 1.8.x Branch Security Patch
|
|
55
|
-
- Final 1.8.x update is 1.8.9
|
|
56
|
-
- 1.9rc1 soon.
|
|
57
|
-
|
|
58
|
-
### 1.8.6
|
|
59
|
-
- Fixed Engine bugs
|
|
60
|
-
- Fixed mouse dragging events (EVENT-ID: 1024)
|
|
61
|
-
|
|
62
|
-
### 1.8.5
|
|
63
|
-
- Fixed buttons!
|
|
64
|
-
### 1.8.4
|
|
65
|
-
- Are you here?
|
|
66
|
-
- jk :D
|
|
67
|
-
- Bug fixes!
|
|
68
|
-
### 1.8.3
|
|
69
|
-
- Added some setup for the next versions!
|
|
70
|
-
- Inviting people to the VertexEngine Projects planned for VertexEngine 2.0.0
|
|
71
|
-
### 1.8.2
|
|
72
|
-
- Graphical Math Tweaks!
|
|
73
|
-
- Old classes now moved into Math
|
|
74
|
-
- GraphicalMath is now just Math
|
|
75
|
-
### 1.8.1
|
|
76
|
-
- Some Fixes!
|
|
77
|
-
- Tweaks!
|
|
78
|
-
### 1.8.0
|
|
79
|
-
- Updated Documentation!
|
|
80
|
-
- Engine Fixes!
|
|
81
|
-
### 1.8rc2
|
|
82
|
-
- Fixed math not defined errors
|
|
83
|
-
- Renamed to GraphicalMath
|
|
84
|
-
- Added the utility functions (clamp, lerp, etc.)
|
|
85
|
-
### 1.8rc1
|
|
86
|
-
- Patched some runtime errors
|
|
87
|
-
- Added MATH! (from VertexEngine.math import *)
|
|
88
53
|
|
|
89
54
|
## How to install VertexEngine:
|
|
90
|
-
|
|
55
|
+
Type in `pip install VertexEngine`
|
|
56
|
+
|
|
57
|
+
## Delta time
|
|
91
58
|
|
|
92
|
-
|
|
59
|
+
`GameEngine.delta_time` contains the elapsed time since the previous frame, in seconds. Use it to make movement independent of the frame rate:
|
|
93
60
|
|
|
94
|
-
|
|
61
|
+
```python
|
|
62
|
+
def update(self):
|
|
63
|
+
self.player.x += self.speed * self.engine.delta_time
|
|
64
|
+
```
|
|
95
65
|
|
|
96
66
|
## Dependencies
|
|
97
67
|
VertexEngine obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
98
68
|
|
|
99
69
|
| Dependency | Version |
|
|
100
70
|
|------------------|--------------------------------------|
|
|
101
|
-
|
|
|
71
|
+
| PySide6 | >=6.7 |
|
|
102
72
|
| Pygame | >=2.0 |
|
|
103
73
|
| Python | >=3.10 |
|
|
104
74
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "VertexEngine"
|
|
3
|
-
version = "
|
|
3
|
+
version = "2.0rc1"
|
|
4
4
|
description = "A high-performance SDK for Python Development."
|
|
5
5
|
authors = [
|
|
6
|
-
{ name = "Tyrel Miguel", email = "
|
|
6
|
+
{ name = "Tyrel Miguel", email = "FinalFacility0828@gmail.com" }
|
|
7
7
|
]
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
license = { text = "MIT" }
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
|
|
12
12
|
dependencies = [
|
|
13
|
-
"
|
|
13
|
+
"PySide6>=6.7.0",
|
|
14
14
|
"pygame>=2.6; python_version < '3.14'",
|
|
15
15
|
"pygame-ce>=2.5.0; python_version >= '3.14'"
|
|
16
16
|
]
|
|
@@ -19,7 +19,7 @@ keywords = [
|
|
|
19
19
|
"gamedev",
|
|
20
20
|
"game-development",
|
|
21
21
|
"game-engine",
|
|
22
|
-
"
|
|
22
|
+
"PySide6",
|
|
23
23
|
"pygame",
|
|
24
24
|
"pygame-ce",
|
|
25
25
|
"sdk",
|
|
@@ -45,11 +45,9 @@ classifiers = [
|
|
|
45
45
|
[project.urls]
|
|
46
46
|
Homepage = "https://vertexengine-zii6.onrender.com"
|
|
47
47
|
Documentation = "https://vertexenginedocs.netlify.app"
|
|
48
|
-
|
|
49
|
-
"Official Tech Site" = "https://tyrel.onrender.com"
|
|
48
|
+
"Developer Site" = "https://tyrel.onrender.com"
|
|
50
49
|
Source = "https://github.com/VertexEngine-Projects/VertexEngine-Code"
|
|
51
50
|
Issues = "https://github.com/VertexEngine-Projects/VertexEngine-Code/issues"
|
|
52
|
-
Discord = "https://discord.gg/jqG8kQjX"
|
|
53
51
|
|
|
54
52
|
[tool.setuptools]
|
|
55
53
|
# Instructs setuptools to bundle non-python data assets
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from PySide6.QtCore import Qt
|
|
2
|
+
from PySide6.QtGui import QShortcut, QKeySequence
|
|
3
3
|
|
|
4
4
|
KEY_MAP = {
|
|
5
5
|
# Arrows
|
|
@@ -70,11 +70,11 @@ for key, qt_name in punctuation_map.items():
|
|
|
70
70
|
try:
|
|
71
71
|
KEY_MAP[key] = getattr(Qt.Key, f"Key_{qt_name}")
|
|
72
72
|
except AttributeError:
|
|
73
|
-
# Some symbols might not exist in
|
|
73
|
+
# Some symbols might not exist in PySide6's Qt.Key
|
|
74
74
|
pass
|
|
75
75
|
|
|
76
|
-
from
|
|
77
|
-
from
|
|
76
|
+
from PySide6.QtCore import Qt
|
|
77
|
+
from PySide6.QtGui import QShortcut, QKeySequence
|
|
78
78
|
|
|
79
79
|
KEY_MAP = {
|
|
80
80
|
# Arrows
|
|
@@ -145,7 +145,7 @@ for key, qt_name in punctuation_map.items():
|
|
|
145
145
|
try:
|
|
146
146
|
KEY_MAP[key] = getattr(Qt.Key, f"Key_{qt_name}")
|
|
147
147
|
except AttributeError:
|
|
148
|
-
# Some symbols might not exist in
|
|
148
|
+
# Some symbols might not exist in PySide6's Qt.Key
|
|
149
149
|
pass
|
|
150
150
|
|
|
151
151
|
class Input:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"""VertexEngine.Vertex: VWidget, Layouts, Dialogs, App Management"""
|
|
2
2
|
|
|
3
3
|
import sys
|
|
4
|
-
from
|
|
4
|
+
from PySide6.QtWidgets import (
|
|
5
5
|
QApplication, QWidget, QVBoxLayout, QHBoxLayout,
|
|
6
6
|
QDialog, QLabel, QPushButton, QLineEdit
|
|
7
7
|
)
|
|
8
|
-
from
|
|
8
|
+
from PySide6.QtCore import Qt
|
|
9
9
|
# ------------------------
|
|
10
10
|
# Base widget wrapper
|
|
11
11
|
# ------------------------
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QWidget, QHBoxLayout, QPushButton, QApplication
|
|
2
|
+
from PySide6.QtCore import pyqtSignal
|
|
3
3
|
import sys
|
|
4
4
|
|
|
5
5
|
# -----------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QWidget
|
|
2
|
+
from PySide6.QtCore import Qt, pyqtSignal, QRect
|
|
3
|
+
from PySide6.QtGui import QPainter, QColor
|
|
4
4
|
|
|
5
5
|
class ToggleSwitch(QWidget):
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import (
|
|
2
2
|
QTreeWidget, QTreeWidgetItem,
|
|
3
3
|
QTableWidget, QTableWidgetItem,
|
|
4
4
|
QSplitter,
|
|
5
5
|
QScrollArea,
|
|
6
6
|
QDockWidget, QWidget
|
|
7
7
|
)
|
|
8
|
-
from
|
|
9
|
-
from
|
|
8
|
+
from PySide6.QtCore import Qt, QThread, pyqtSignal, QSettings
|
|
9
|
+
from PySide6.QtGui import QPainter, QFont
|
|
10
10
|
|
|
11
11
|
class StarRating(QWidget):
|
|
12
12
|
def __init__(self, stars=5):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QMessageBox, QFileDialog, QSlider, QProgressBar, QSpinBox, QToolBar
|
|
2
|
+
from PySide6.QtCore import Qt
|
|
3
|
+
from PySide6.QtGui import QAction
|
|
4
4
|
class VPopup:
|
|
5
5
|
@staticmethod
|
|
6
6
|
def info(text, title="Info"):
|
{vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QPushButton, QLineEdit
|
|
2
|
+
from PySide6.QtGui import QFont
|
|
3
|
+
from PySide6.QtWidgets import QPushButton
|
|
4
|
+
from PySide6.QtGui import QCursor
|
|
5
|
+
from PySide6.QtCore import Qt
|
|
6
|
+
from PySide6.QtWidgets import QLabel
|
|
7
7
|
|
|
8
8
|
class LegacyButton(QPushButton):
|
|
9
9
|
def __init__(
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# VertexEngine/__init__.py
|
|
2
|
-
# Copyright (C)
|
|
2
|
+
# Copyright (C) 2026
|
|
3
3
|
# This library/SDK is free. You can redistribute it.
|
|
4
|
-
|
|
5
|
-
# annbasilan0828@gmail.com
|
|
6
|
-
"""VertexEngine is an SDK for Application Development. It's also supported by many others.
|
|
4
|
+
"""VertexEngine is an SDK for Application Development. Specifically games, or heavier Applications
|
|
7
5
|
|
|
8
6
|
Supported OSes
|
|
9
7
|
--------------
|
|
10
|
-
- RainOS
|
|
11
8
|
- Windows
|
|
12
9
|
- MacOS
|
|
13
10
|
- OS X
|
|
@@ -15,14 +12,16 @@ Supported OSes
|
|
|
15
12
|
- FreeBSD
|
|
16
13
|
- IRIX
|
|
17
14
|
- and Linux
|
|
18
|
-
|
|
19
|
-
It is written on top of the excellent Pygame library which is ran on the even more excellent SDL library which runs on every Desktop OS with SDL."""
|
|
20
|
-
import pygame
|
|
15
|
+
"""
|
|
21
16
|
from ._base import *
|
|
22
17
|
from .engine import GameEngine
|
|
23
18
|
from .scenes import Scene, SceneManager
|
|
24
19
|
from .assets import AssetManager
|
|
25
20
|
from .audio import AudioManager
|
|
21
|
+
from .Vertex import App
|
|
22
|
+
from .InputSystem.KeyInputs import *
|
|
23
|
+
from .InputSystem.BtnInputs import *
|
|
24
|
+
from .InputSystem.Events import *
|
|
26
25
|
import os
|
|
27
26
|
|
|
28
27
|
|
|
@@ -586,7 +585,7 @@ import os
|
|
|
586
585
|
# This comment serves as a warning to the next developer.
|
|
587
586
|
# If you are reading this, you have probably found a bug or an issue with the code.
|
|
588
587
|
# Your problem.
|
|
589
|
-
# Hours Wasted:
|
|
588
|
+
# Hours Wasted: 78
|
|
590
589
|
# ----------------------------------------------------------------------
|
|
591
590
|
# Btw ur balls are big and i like them. I hope you have a nice day. :)
|
|
592
591
|
# ~ VSCode Copilot auto-generated comment.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import pygame
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
2
|
+
from PySide6.QtWidgets import QPushButton, QLineEdit, QLabel, QWidget
|
|
3
|
+
from PySide6.QtGui import QFont, QCursor, QFontMetrics
|
|
4
|
+
from PySide6.QtCore import Qt
|
|
5
5
|
from VertexEngine.Vertex import VBox
|
|
6
6
|
|
|
7
7
|
class VertexScreen():
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import pygame
|
|
2
|
-
from
|
|
2
|
+
from PySide6.QtGui import QImage
|
|
3
3
|
import typing_extensions as typing
|
|
4
4
|
|
|
5
5
|
@typing.deprecated('This is not a public API, use AssetManager pls :D')
|
|
@@ -46,6 +46,7 @@ class AssetManager:
|
|
|
46
46
|
"""The `AssetManager` is a class to draw and load images and assets of any kind."""
|
|
47
47
|
def __init__(self):
|
|
48
48
|
self.images = {}
|
|
49
|
+
self.spritesheets = {}
|
|
49
50
|
self._scaled_cache = {} # cache for scaled versions
|
|
50
51
|
|
|
51
52
|
def load_image(self, name: str, path: str):
|
|
@@ -103,3 +104,50 @@ class AssetManager:
|
|
|
103
104
|
scaled_img = self._scaled_cache[cache_key]
|
|
104
105
|
|
|
105
106
|
target_surface.blit(scaled_img, pos)
|
|
107
|
+
|
|
108
|
+
def load_spritesheet(self, name: str, path: str, frame_size):
|
|
109
|
+
"""Load a spritesheet and split it into equally sized frames.
|
|
110
|
+
|
|
111
|
+
``frame_size`` is ``(width, height)``. Incomplete frames at the
|
|
112
|
+
right or bottom edges are ignored.
|
|
113
|
+
"""
|
|
114
|
+
if name in self.spritesheets:
|
|
115
|
+
return self.spritesheets[name]
|
|
116
|
+
|
|
117
|
+
frame_width, frame_height = (int(value) for value in frame_size)
|
|
118
|
+
if frame_width <= 0 or frame_height <= 0:
|
|
119
|
+
raise ValueError("frame_size values must be greater than zero")
|
|
120
|
+
|
|
121
|
+
try:
|
|
122
|
+
sheet = pygame.image.load(path)
|
|
123
|
+
except FileNotFoundError:
|
|
124
|
+
print(f"[Warning] Spritesheet '{path}' not found!")
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
sheet_width, sheet_height = sheet.get_size()
|
|
128
|
+
frames = [
|
|
129
|
+
sheet.subsurface((x, y, frame_width, frame_height)).copy()
|
|
130
|
+
for y in range(0, sheet_height - frame_height + 1, frame_height)
|
|
131
|
+
for x in range(0, sheet_width - frame_width + 1, frame_width)
|
|
132
|
+
]
|
|
133
|
+
self.spritesheets[name] = frames
|
|
134
|
+
return frames
|
|
135
|
+
|
|
136
|
+
def get_sprite(self, name: str, index: int):
|
|
137
|
+
"""Return one frame from a loaded spritesheet."""
|
|
138
|
+
spritesheet = self.spritesheets.get(name)
|
|
139
|
+
if spritesheet is None:
|
|
140
|
+
print(f"[Warning] Spritesheet '{name}' not loaded!")
|
|
141
|
+
return None
|
|
142
|
+
return spritesheet[index]
|
|
143
|
+
|
|
144
|
+
def draw_sprite(self, target_surface, name: str, index: int,
|
|
145
|
+
pos=(0, 0), size=None):
|
|
146
|
+
"""Draw one frame from a loaded spritesheet."""
|
|
147
|
+
sprite = self.get_sprite(name, index)
|
|
148
|
+
if sprite is None:
|
|
149
|
+
return
|
|
150
|
+
|
|
151
|
+
if size is not None:
|
|
152
|
+
sprite = pygame.transform.smoothscale(sprite, tuple(size))
|
|
153
|
+
target_surface.blit(sprite, pos)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QWidget
|
|
2
|
+
from PySide6.QtGui import QImage, QPainter
|
|
3
|
+
from PySide6.QtCore import QTimer, Qt
|
|
4
4
|
import pygame
|
|
5
|
+
import time
|
|
5
6
|
from .scenes import SceneManager
|
|
6
7
|
from VertexEngine.InputSystem.KeyInputs import Input
|
|
7
8
|
|
|
@@ -17,6 +18,8 @@ class GameEngine(QWidget):
|
|
|
17
18
|
self.fps = fps
|
|
18
19
|
self.position = position
|
|
19
20
|
self.resizable = resizable
|
|
21
|
+
self.delta_time = 0.0
|
|
22
|
+
self._last_frame_time = time.perf_counter()
|
|
20
23
|
|
|
21
24
|
self.keys_down = set()
|
|
22
25
|
|
|
@@ -70,6 +73,10 @@ class GameEngine(QWidget):
|
|
|
70
73
|
# ---------------------- UPDATE ----------------------
|
|
71
74
|
|
|
72
75
|
def _update_frame(self):
|
|
76
|
+
current_time = time.perf_counter()
|
|
77
|
+
self.delta_time = current_time - self._last_frame_time
|
|
78
|
+
self._last_frame_time = current_time
|
|
79
|
+
|
|
73
80
|
if not self.hasFocus():
|
|
74
81
|
Input.clear()
|
|
75
82
|
|
|
@@ -2,8 +2,8 @@ import sys
|
|
|
2
2
|
import random
|
|
3
3
|
import pygame
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
5
|
+
from PySide6.QtWidgets import QApplication
|
|
6
|
+
from PySide6.QtCore import Qt
|
|
7
7
|
|
|
8
8
|
from VertexEngine.engine import GameEngine
|
|
9
9
|
from VertexEngine.scenes import Scene
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from VertexEngine.InputSystem.Events import ButtonEvents
|
|
2
2
|
from VertexEngine import VertexUI
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
3
|
+
from PySide6.QtWidgets import QApplication, QWidget, QVBoxLayout
|
|
4
|
+
from PySide6.QtCore import Qt
|
|
5
|
+
from PySide6.QtGui import QFont
|
|
6
6
|
import sys
|
|
7
7
|
import random
|
|
8
8
|
Buttons = ButtonEvents()
|
|
@@ -35,7 +35,7 @@ def random_text():
|
|
|
35
35
|
messages = [
|
|
36
36
|
"VertexEngine 🔥",
|
|
37
37
|
"Buttons clicked 😄",
|
|
38
|
-
"
|
|
38
|
+
"PySide6 is clean ✨",
|
|
39
39
|
"Event system FTW 🎮",
|
|
40
40
|
"Random works 🎲"
|
|
41
41
|
]
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: VertexEngine
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0rc1
|
|
4
4
|
Summary: A high-performance SDK for Python Development.
|
|
5
|
-
Author-email: Tyrel Miguel <
|
|
5
|
+
Author-email: Tyrel Miguel <FinalFacility0828@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://vertexengine-zii6.onrender.com
|
|
8
8
|
Project-URL: Documentation, https://vertexenginedocs.netlify.app
|
|
9
|
-
Project-URL:
|
|
10
|
-
Project-URL: Official Tech Site, https://tyrel.onrender.com
|
|
9
|
+
Project-URL: Developer Site, https://tyrel.onrender.com
|
|
11
10
|
Project-URL: Source, https://github.com/VertexEngine-Projects/VertexEngine-Code
|
|
12
11
|
Project-URL: Issues, https://github.com/VertexEngine-Projects/VertexEngine-Code/issues
|
|
13
|
-
|
|
14
|
-
Keywords: gamedev,game-development,game-engine,pyqt6,pygame,pygame-ce,sdk,gui
|
|
12
|
+
Keywords: gamedev,game-development,game-engine,PySide6,pygame,pygame-ce,sdk,gui
|
|
15
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
16
14
|
Classifier: Intended Audience :: Developers
|
|
17
15
|
Classifier: Topic :: Software Development :: Build Tools
|
|
@@ -28,7 +26,7 @@ Classifier: Operating System :: OS Independent
|
|
|
28
26
|
Requires-Python: >=3.10
|
|
29
27
|
Description-Content-Type: text/markdown
|
|
30
28
|
License-File: LICENSE
|
|
31
|
-
Requires-Dist:
|
|
29
|
+
Requires-Dist: PySide6>=6.7.0
|
|
32
30
|
Requires-Dist: pygame>=2.6; python_version < "3.14"
|
|
33
31
|
Requires-Dist: pygame-ce>=2.5.0; python_version >= "3.14"
|
|
34
32
|
Dynamic: license-file
|
|
@@ -48,8 +46,8 @@ Dynamic: license-file
|
|
|
48
46
|
</a>
|
|
49
47
|
</p>
|
|
50
48
|
|
|
51
|
-
# VertexEngine
|
|
52
|
-
VertexEngine is a GUI and Game Engine for
|
|
49
|
+
# VertexEngine
|
|
50
|
+
VertexEngine is a GUI and Game Engine for Python applications.
|
|
53
51
|
|
|
54
52
|
## Official Extensions:
|
|
55
53
|
- [VertexEngine-JSON](https://pypi.org/project/VertexEngine-json)
|
|
@@ -59,7 +57,10 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
59
57
|
- The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
60
58
|
- Support Email: FinalFacility0828@gmail.com
|
|
61
59
|
|
|
62
|
-
## Change Logs (1.8rc1 -
|
|
60
|
+
## Change Logs (1.8rc1 - 2.0rc1)
|
|
61
|
+
### 2.0rc1
|
|
62
|
+
- Added Spritesheets, Delta Time, New Import Shortcuts
|
|
63
|
+
- Fundemental Change: All Code references of PyQt6 have been replaced with the more lenient PySide6.
|
|
63
64
|
### 1.9.6
|
|
64
65
|
- Engine Optimizations
|
|
65
66
|
### 1.9.5
|
|
@@ -75,65 +76,32 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
75
76
|
### 1.9.1
|
|
76
77
|
- NEW DEMO
|
|
77
78
|
- How to Run: python3.x -m VertexEngine.examples.pygwidget_test
|
|
78
|
-
- Fixed engine clash bug (pygame and
|
|
79
|
+
- Fixed engine clash bug (pygame and PySide6 bug)
|
|
79
80
|
### 1.9
|
|
80
81
|
- FINALLY fixed the demos!
|
|
81
82
|
- how to run:
|
|
82
83
|
- Snake: python3.x -m VertexEngine.examples.games.snake.main
|
|
83
84
|
- Event tester: python3.x -m VertexEngine.examples.test
|
|
84
85
|
- I was very tired while making this so the RNG text was generated by AI. sory abt that :q
|
|
85
|
-
### 1.8.9
|
|
86
|
-
- Small optimizations
|
|
87
|
-
- Removed dependence on Python Garbage Collection.
|
|
88
|
-
### 1.8.7
|
|
89
|
-
- 3rd Final 1.8.x Branch Security Patch
|
|
90
|
-
- Final 1.8.x update is 1.8.9
|
|
91
|
-
- 1.9rc1 soon.
|
|
92
|
-
|
|
93
|
-
### 1.8.6
|
|
94
|
-
- Fixed Engine bugs
|
|
95
|
-
- Fixed mouse dragging events (EVENT-ID: 1024)
|
|
96
|
-
|
|
97
|
-
### 1.8.5
|
|
98
|
-
- Fixed buttons!
|
|
99
|
-
### 1.8.4
|
|
100
|
-
- Are you here?
|
|
101
|
-
- jk :D
|
|
102
|
-
- Bug fixes!
|
|
103
|
-
### 1.8.3
|
|
104
|
-
- Added some setup for the next versions!
|
|
105
|
-
- Inviting people to the VertexEngine Projects planned for VertexEngine 2.0.0
|
|
106
|
-
### 1.8.2
|
|
107
|
-
- Graphical Math Tweaks!
|
|
108
|
-
- Old classes now moved into Math
|
|
109
|
-
- GraphicalMath is now just Math
|
|
110
|
-
### 1.8.1
|
|
111
|
-
- Some Fixes!
|
|
112
|
-
- Tweaks!
|
|
113
|
-
### 1.8.0
|
|
114
|
-
- Updated Documentation!
|
|
115
|
-
- Engine Fixes!
|
|
116
|
-
### 1.8rc2
|
|
117
|
-
- Fixed math not defined errors
|
|
118
|
-
- Renamed to GraphicalMath
|
|
119
|
-
- Added the utility functions (clamp, lerp, etc.)
|
|
120
|
-
### 1.8rc1
|
|
121
|
-
- Patched some runtime errors
|
|
122
|
-
- Added MATH! (from VertexEngine.math import *)
|
|
123
86
|
|
|
124
87
|
## How to install VertexEngine:
|
|
125
|
-
|
|
88
|
+
Type in `pip install VertexEngine`
|
|
89
|
+
|
|
90
|
+
## Delta time
|
|
126
91
|
|
|
127
|
-
|
|
92
|
+
`GameEngine.delta_time` contains the elapsed time since the previous frame, in seconds. Use it to make movement independent of the frame rate:
|
|
128
93
|
|
|
129
|
-
|
|
94
|
+
```python
|
|
95
|
+
def update(self):
|
|
96
|
+
self.player.x += self.speed * self.engine.delta_time
|
|
97
|
+
```
|
|
130
98
|
|
|
131
99
|
## Dependencies
|
|
132
100
|
VertexEngine obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
133
101
|
|
|
134
102
|
| Dependency | Version |
|
|
135
103
|
|------------------|--------------------------------------|
|
|
136
|
-
|
|
|
104
|
+
| PySide6 | >=6.7 |
|
|
137
105
|
| Pygame | >=2.0 |
|
|
138
106
|
| Python | >=3.10 |
|
|
139
107
|
|
|
@@ -2,7 +2,6 @@ LICENSE
|
|
|
2
2
|
README.md
|
|
3
3
|
pyproject.toml
|
|
4
4
|
setup.cfg
|
|
5
|
-
src/VertexEngine/VertexScreenModifiers.py
|
|
6
5
|
src/VertexEngine/WHY.mp3
|
|
7
6
|
src/VertexEngine/__init__.py
|
|
8
7
|
src/VertexEngine/_base.py
|
|
@@ -41,4 +40,6 @@ src/VertexEngine/examples/MajorSystemTest/Wangi.png
|
|
|
41
40
|
src/VertexEngine/examples/MajorSystemTest/main.py
|
|
42
41
|
src/VertexEngine/examples/MajorSystemTest/universfield-ui-button-click-147358.mp3
|
|
43
42
|
src/VertexEngine/examples/games/snake/main.py
|
|
44
|
-
tests/
|
|
43
|
+
tests/test_engine_delta_time.py
|
|
44
|
+
tests/test_pygame_vwidgets_style.py
|
|
45
|
+
tests/test_spritesheet_manager.py
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
from types import SimpleNamespace
|
|
3
|
+
|
|
4
|
+
import pytest
|
|
5
|
+
|
|
6
|
+
pytest.importorskip("PySide6")
|
|
7
|
+
|
|
8
|
+
from VertexEngine.engine import GameEngine
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_update_frame_sets_delta_time(monkeypatch):
|
|
12
|
+
frame_times = iter((10.0, 10.25))
|
|
13
|
+
engine_module = importlib.import_module("VertexEngine.engine")
|
|
14
|
+
monkeypatch.setattr(engine_module.time, "perf_counter", lambda: next(frame_times))
|
|
15
|
+
|
|
16
|
+
engine = SimpleNamespace(
|
|
17
|
+
_last_frame_time=next(frame_times),
|
|
18
|
+
delta_time=0.0,
|
|
19
|
+
hasFocus=lambda: True,
|
|
20
|
+
screen=SimpleNamespace(fill=lambda color: None),
|
|
21
|
+
color=(0, 0, 0),
|
|
22
|
+
scene_manager=SimpleNamespace(_update=lambda: None, draw=lambda surface: None),
|
|
23
|
+
_sync_qimage=lambda: None,
|
|
24
|
+
update=lambda: None,
|
|
25
|
+
)
|
|
26
|
+
GameEngine._update_frame(engine)
|
|
27
|
+
|
|
28
|
+
assert engine.delta_time == pytest.approx(0.25)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import pygame
|
|
2
|
+
|
|
3
|
+
from VertexEngine import AssetManager
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_load_spritesheet_splits_frames(monkeypatch):
|
|
7
|
+
sheet = pygame.Surface((20, 10), pygame.SRCALPHA)
|
|
8
|
+
monkeypatch.setattr(pygame.image, "load", lambda path: sheet)
|
|
9
|
+
manager = AssetManager()
|
|
10
|
+
|
|
11
|
+
frames = manager.load_spritesheet("player", "player.png", (10, 10))
|
|
12
|
+
|
|
13
|
+
assert len(frames) == 2
|
|
14
|
+
assert [frame.get_size() for frame in frames] == [(10, 10), (10, 10)]
|
|
15
|
+
assert manager.get_sprite("player", 1).get_size() == (10, 10)
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"""WARNING: This library of Vertex is not made for games, if you want to make a game window, use the `GameEngine` Class instead."""
|
|
2
|
-
from PyQt6.QtWidgets import QMainWindow, QVBoxLayout, QWidget, QApplication
|
|
3
|
-
import sys
|
|
4
|
-
from VertexEngine import VertexUI
|
|
5
|
-
# ===== Base window class =====
|
|
6
|
-
class BaseWindow(QMainWindow):
|
|
7
|
-
def __init__(self, title="Base Window", width=400, height=300):
|
|
8
|
-
super().__init__()
|
|
9
|
-
self.setWindowTitle(title)
|
|
10
|
-
self.setGeometry(100, 100, width, height)
|
|
11
|
-
self.central_widget = QWidget()
|
|
12
|
-
self.setCentralWidget(self.central_widget)
|
|
13
|
-
self.layout = QVBoxLayout()
|
|
14
|
-
self.central_widget.setLayout(self.layout)
|
|
15
|
-
print(f"[DEBUG] Initialized window '{title}' with size {width}x{height}")
|
|
16
|
-
|
|
17
|
-
def add_label(self, text):
|
|
18
|
-
label = VertexUI.Text(text)
|
|
19
|
-
self.layout.addWidget(label)
|
|
20
|
-
print(f"[DEBUG] Added label: '{text}'")
|
|
21
|
-
|
|
22
|
-
def add_button(self, text, callback=None):
|
|
23
|
-
button = VertexUI.FancyButton(text)
|
|
24
|
-
if callback:
|
|
25
|
-
button.clicked.connect(callback)
|
|
26
|
-
self.layout.addWidget(button)
|
|
27
|
-
print(f"[DEBUG] Added button: '{text}'")
|
|
28
|
-
|
|
29
|
-
# ===== Fancy themed window =====
|
|
30
|
-
class FancyWindow(BaseWindow):
|
|
31
|
-
def __init__(self, title="Fancy Window", width=500, height=400, theme_color="#FF69B4"):
|
|
32
|
-
super().__init__(title, width, height)
|
|
33
|
-
self.theme_color = theme_color
|
|
34
|
-
self.apply_theme()
|
|
35
|
-
|
|
36
|
-
def apply_theme(self):
|
|
37
|
-
self.setStyleSheet(f"""
|
|
38
|
-
QMainWindow {{
|
|
39
|
-
background-color: {self.theme_color};
|
|
40
|
-
}}
|
|
41
|
-
QLabel {{
|
|
42
|
-
color: white;
|
|
43
|
-
font-size: 18px;
|
|
44
|
-
}}
|
|
45
|
-
QPushButton {{
|
|
46
|
-
background-color: white;
|
|
47
|
-
color: {self.theme_color};
|
|
48
|
-
border-radius: 5px;
|
|
49
|
-
padding: 5px 10px;
|
|
50
|
-
}}
|
|
51
|
-
""")
|
|
52
|
-
print(f"[DEBUG] Applied theme color: {self.theme_color}")
|
|
53
|
-
|
|
54
|
-
# ===== Random fun window with auto-close button =====
|
|
55
|
-
class FunWindow(BaseWindow):
|
|
56
|
-
def __init__(self, title="Fun Window"):
|
|
57
|
-
super().__init__(title)
|
|
58
|
-
self.add_label("Welcome to FunWindow!")
|
|
59
|
-
self.add_button("Close me", self.close)
|
|
60
|
-
|
|
61
|
-
if __name__ == "__main__":
|
|
62
|
-
app = QApplication(sys.argv)
|
|
63
|
-
|
|
64
|
-
# Choose your boredom mode
|
|
65
|
-
window = FancyWindow(theme_color="#8A2BE2")
|
|
66
|
-
window.add_label("This is super fancy 💎")
|
|
67
|
-
window.add_button("Click me!", lambda: print("You clicked the fancy button!"))
|
|
68
|
-
|
|
69
|
-
window.show()
|
|
70
|
-
sys.exit(app.exec())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/PygameVWidgets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/Wangi.png
RENAMED
|
File without changes
|
{vertexengine-1.9.6 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/main.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|