VertexEngine 1.2rc4__4-py3-none-any.whl
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/AdvancedVWidgets/ChekBox.py +8 -0
- VertexEngine/AdvancedVWidgets/Dropdown.py +12 -0
- VertexEngine/AdvancedVWidgets/List.py +12 -0
- VertexEngine/AdvancedVWidgets/WindowMods.py +71 -0
- VertexEngine/AdvancedVWidgets/Windows.py +66 -0
- VertexEngine/InputSystem/BtnInputs.py +63 -0
- VertexEngine/InputSystem/Events.py +73 -0
- VertexEngine/InputSystem/KeyInputs.py +64 -0
- VertexEngine/SimpleGUI.py +142 -0
- VertexEngine/Vertex/__init__.py +224 -0
- VertexEngine/VertexScreenModifiers.py +70 -0
- VertexEngine/__init__.py +322 -0
- VertexEngine/assets.py +63 -0
- VertexEngine/audio.py +25 -0
- VertexEngine/engine.py +70 -0
- VertexEngine/example.py +59 -0
- VertexEngine/examples/games/Dodge/main.py +233 -0
- VertexEngine/examples/games/platformer/main.py +205 -0
- VertexEngine/examples/games/snake/main.py +135 -0
- VertexEngine/examples/test.py +55 -0
- VertexEngine/scenes.py +46 -0
- vertexengine-1.2.0rc4.dist-info/METADATA +100 -0
- vertexengine-1.2.0rc4.dist-info/RECORD +26 -0
- vertexengine-1.2.0rc4.dist-info/WHEEL +5 -0
- vertexengine-1.2.0rc4.dist-info/licenses/LICENSE +21 -0
- vertexengine-1.2.0rc4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
from VertexEngine.InputSystem.Events import ButtonEvents
|
|
2
|
+
from VertexEngine import VertexUI
|
|
3
|
+
from PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout
|
|
4
|
+
from PyQt6.QtCore import Qt
|
|
5
|
+
from PyQt6.QtGui import QFont
|
|
6
|
+
import sys
|
|
7
|
+
import random
|
|
8
|
+
Buttons = ButtonEvents()
|
|
9
|
+
|
|
10
|
+
app = QApplication(sys.argv)
|
|
11
|
+
|
|
12
|
+
window = QWidget()
|
|
13
|
+
window.setWindowTitle('Button Demo')
|
|
14
|
+
window.resize(300, 200)
|
|
15
|
+
|
|
16
|
+
layout = QVBoxLayout()
|
|
17
|
+
|
|
18
|
+
label = VertexUI.Text('Click a Button', font_size=32, font_weight=QFont.Weight.Bold)
|
|
19
|
+
label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
20
|
+
|
|
21
|
+
btn_hello = VertexUI.FancyButton("Hello")
|
|
22
|
+
btn_random = VertexUI.FancyButton("Random")
|
|
23
|
+
btn_clear = VertexUI.FancyButton("Clear")
|
|
24
|
+
|
|
25
|
+
layout.addWidget(label)
|
|
26
|
+
layout.addWidget(btn_hello)
|
|
27
|
+
layout.addWidget(btn_random)
|
|
28
|
+
layout.addWidget(btn_clear)
|
|
29
|
+
|
|
30
|
+
# ---------------- Actions ----------------
|
|
31
|
+
def say_hello():
|
|
32
|
+
label.setText("Hello 👋")
|
|
33
|
+
|
|
34
|
+
def random_text():
|
|
35
|
+
messages = [
|
|
36
|
+
"VertexEngine 🔥",
|
|
37
|
+
"Buttons clicked 😄",
|
|
38
|
+
"PyQt6 is clean ✨",
|
|
39
|
+
"Event system FTW 🎮",
|
|
40
|
+
"Random works 🎲"
|
|
41
|
+
]
|
|
42
|
+
label.setText(random.choice(messages))
|
|
43
|
+
|
|
44
|
+
def clear_text():
|
|
45
|
+
label.setText("Click a button")
|
|
46
|
+
|
|
47
|
+
# ---------------- Bind Events ----------------
|
|
48
|
+
Buttons.on_click(btn_hello, say_hello)
|
|
49
|
+
Buttons.on_click(btn_random, random_text)
|
|
50
|
+
Buttons.on_click(btn_clear, clear_text)
|
|
51
|
+
|
|
52
|
+
window.setLayout(layout)
|
|
53
|
+
|
|
54
|
+
window.show()
|
|
55
|
+
sys.exit(app.exec())
|
VertexEngine/scenes.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# scenes/scene.py
|
|
2
|
+
from .Vertex import VWidget
|
|
3
|
+
|
|
4
|
+
class Scene(VWidget):
|
|
5
|
+
def __init__(self, engine):
|
|
6
|
+
super().__init__(engine) # parent = engine widget
|
|
7
|
+
self.engine = engine
|
|
8
|
+
|
|
9
|
+
# Optional: scenes can receive focus
|
|
10
|
+
self.setFocusPolicy(engine.focusPolicy())
|
|
11
|
+
|
|
12
|
+
def on_enter(self):
|
|
13
|
+
"""Called when the scene becomes active"""
|
|
14
|
+
self.setFocus()
|
|
15
|
+
|
|
16
|
+
def on_exit(self):
|
|
17
|
+
"""Called when the scene is removed"""
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
def update(self):
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
def draw(self, surface):
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
# scenes/scene_manager.py
|
|
27
|
+
class SceneManager:
|
|
28
|
+
def __init__(self):
|
|
29
|
+
self.current_scene = None
|
|
30
|
+
|
|
31
|
+
def set_scene(self, scene):
|
|
32
|
+
if self.current_scene:
|
|
33
|
+
self.current_scene.on_exit()
|
|
34
|
+
self.current_scene.hide()
|
|
35
|
+
|
|
36
|
+
self.current_scene = scene
|
|
37
|
+
self.current_scene.show()
|
|
38
|
+
self.current_scene.on_enter()
|
|
39
|
+
|
|
40
|
+
def update(self):
|
|
41
|
+
if self.current_scene:
|
|
42
|
+
self.current_scene.update()
|
|
43
|
+
|
|
44
|
+
def draw(self, surface):
|
|
45
|
+
if self.current_scene:
|
|
46
|
+
self.current_scene.draw(surface)
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: VertexEngine
|
|
3
|
+
Version: 1.2.0rc4
|
|
4
|
+
Summary: An SDK for Python Development.
|
|
5
|
+
Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Documentation, https://vertexenginedocs.netlify.app/
|
|
8
|
+
Project-URL: Homepage, https://github.com/TyrelGomez/VertexEngine-Code
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: pygame>=2.0
|
|
13
|
+
Requires-Dist: PyQt6>=6.7
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# VertexEngine/Vertex
|
|
17
|
+
VertexEngine is a GUI and Game Engine for python applications, it works best if you use py installer
|
|
18
|
+
## Offical Extensions:
|
|
19
|
+
[VertexEngine-WebEngine](https://pypi.org/project/VertexEngine-WebEngine)
|
|
20
|
+
[VertexEngine-CLI](https://pypi.org/project/VertexEngine-CLI/1.0/)
|
|
21
|
+
## Change Logs (1.0rc1 - 1.2rc3), NEW!
|
|
22
|
+
### 1.2rc4
|
|
23
|
+
- Final RC!
|
|
24
|
+
- Docs will be updated on Feb 04, 2026.
|
|
25
|
+
- New Library!:
|
|
26
|
+
~ VertexEngine.AdvancedWidgets
|
|
27
|
+
### 1.2rc3
|
|
28
|
+
- Added 1 New Library:
|
|
29
|
+
~ HBox, VBox but horizontally not vertically.
|
|
30
|
+
### 1.2rc1
|
|
31
|
+
- Added a new Extension: [VertexEngine-CLI](https://pypi.org/project/VertexEngine-CLI/1.0/)
|
|
32
|
+
|
|
33
|
+
### 1.1
|
|
34
|
+
- Bugfixed WebEngine
|
|
35
|
+
- Compression
|
|
36
|
+
|
|
37
|
+
### 1.1rc4
|
|
38
|
+
- FINAL RC!
|
|
39
|
+
- Added 2 New Libraries: ~ VertexEngine.WebEngine ~ VertexEngine.WebView
|
|
40
|
+
|
|
41
|
+
### 1.1rc3
|
|
42
|
+
Revamped Input System!
|
|
43
|
+
DEMO GAMES!
|
|
44
|
+
Updated Scene Docs
|
|
45
|
+
|
|
46
|
+
### Version 1.1rc2
|
|
47
|
+
Documentation Expansion! ~ Fixed the Changelogs
|
|
48
|
+
New Input System!
|
|
49
|
+
Old System (Qt) depreceated and not recomended for use.
|
|
50
|
+
|
|
51
|
+
### Version 1.1rc1
|
|
52
|
+
New Library! (And Modules)!: ~ InputSystem ~ Buttons (Mouse and Widget) ~ Keyboard Input
|
|
53
|
+
|
|
54
|
+
### Version 1.0.1
|
|
55
|
+
Added Changelogs!
|
|
56
|
+
|
|
57
|
+
### Version 1.0
|
|
58
|
+
Added 2 New Libraries: ~ VertexEngine.SimpleGUI ~ VertexEngine.VertexScreenModifiers
|
|
59
|
+
|
|
60
|
+
### Version 1.0rc2
|
|
61
|
+
Final Release Candidate
|
|
62
|
+
Added 1 New Library!: ~ VertexUI
|
|
63
|
+
|
|
64
|
+
### Version 1.0rc1
|
|
65
|
+
Size Compression
|
|
66
|
+
Added 1 New Library!: ~ VertexScreen
|
|
67
|
+
|
|
68
|
+
## How to install Pyinstaller
|
|
69
|
+
Step 1. Type in: pip install pyinstaller
|
|
70
|
+
|
|
71
|
+
Step 2. Wait a few min, don't worry if it takes 1 hr or more, it will finish
|
|
72
|
+
|
|
73
|
+
Step 3. How to use pyinstaller type: python -m PyInstaller --onefile *.py
|
|
74
|
+
|
|
75
|
+
There are flags: --noconsole > disables the console when you run the app --onefile > compress all of the code into one file --icon > the *.ico file after you type it will be set as the app icon.
|
|
76
|
+
|
|
77
|
+
## How to install VertexEngine/Vertex:
|
|
78
|
+
Step 1: Type in pip install VertexEngine
|
|
79
|
+
|
|
80
|
+
Step 2: Wait a few min, don't worry if it takes 1 hr or more, it will finish
|
|
81
|
+
|
|
82
|
+
Pygame or PyQt6 systems are compatible with Vertex so you can use pygame collision system or PyQt6's UI system in VertexEngine.
|
|
83
|
+
|
|
84
|
+
## Help
|
|
85
|
+
The documentation is in the following link: (Documentation)["https://vertexenginedocs.netlify.app/"] for help.
|
|
86
|
+
|
|
87
|
+
## Dependencies
|
|
88
|
+
Vertex obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
89
|
+
|
|
90
|
+
| Dependency | Version |
|
|
91
|
+
|------------------|--------------------------------------|
|
|
92
|
+
| PyQt6 | >=6.7 |
|
|
93
|
+
| Pygame | >=2.0 |
|
|
94
|
+
| Python | >=3.10 |
|
|
95
|
+
|
|
96
|
+
## About Me ❔
|
|
97
|
+
I Am a solo developer in Diliman, Quezon City that makes things for fun :) 77 Rd 1, 53 Rd 3 Bg-Asa QC Email: FinalFacility0828@gmail.com
|
|
98
|
+
|
|
99
|
+
## 📄 License
|
|
100
|
+
VertexEngine/Vertex is Managed by the MIT License. This license allows others to tweak the code. However, I would like my name be in the credits if you choose this as your starting ground for your next library.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
VertexEngine/SimpleGUI.py,sha256=ZlTVTLSL3kVw_xmjVAKsmEJcU5ARGp2qRKy2WFEp94Q,4461
|
|
2
|
+
VertexEngine/VertexScreenModifiers.py,sha256=6sqNSJ931-ZGmwHj8fgYoS_m5jtu_nGhMMvGzG-UZK8,2606
|
|
3
|
+
VertexEngine/__init__.py,sha256=GnhwvmSzX45RZJ6gO7Bi3KpHuibFSYrN3ZtVHEOAaNw,11474
|
|
4
|
+
VertexEngine/assets.py,sha256=L8pH7PY-r8S8krwgQ-YwEH1fyyBLvlcQ1RqVTnRGX9k,1900
|
|
5
|
+
VertexEngine/audio.py,sha256=c4gKT15lRlA1d9xSjUiDUssg0chDyZ867kQzm0KMFyA,644
|
|
6
|
+
VertexEngine/engine.py,sha256=AhSV2R02dZLL_K-UQ9fM7I0DZlq3bsO7j9YEEKFfA-g,1958
|
|
7
|
+
VertexEngine/example.py,sha256=BGf4u0OMDJCvcXq8hcP1fx42LMqxlEXI2qy5V_bDK3U,1921
|
|
8
|
+
VertexEngine/scenes.py,sha256=qyEwHBlsf4sD5QEVqiZinV-cyNpE3TsOPyJanvYJZFc,1150
|
|
9
|
+
VertexEngine/AdvancedVWidgets/ChekBox.py,sha256=e8z96zrMnwCcFRiyVni9owwNzNUdF-OgWgj44JGxxIE,238
|
|
10
|
+
VertexEngine/AdvancedVWidgets/Dropdown.py,sha256=w2P8UtJl1SXpnZydHnErw97-44qf8HBrLr_HCfFrlNE,300
|
|
11
|
+
VertexEngine/AdvancedVWidgets/List.py,sha256=qY9XN9rLg3jX7inGPoHffOJv8FHMN2w8SRDbZiYiOqo,292
|
|
12
|
+
VertexEngine/AdvancedVWidgets/WindowMods.py,sha256=FbEt6uKQAwa_ItwnP3e3Y-CvGYQPnqZhnztNJSlUXQc,1952
|
|
13
|
+
VertexEngine/AdvancedVWidgets/Windows.py,sha256=FyFnruZKsyWb8GC8Y-fH9AmDg5RCVtMcu3GXe2zyLAI,1810
|
|
14
|
+
VertexEngine/InputSystem/BtnInputs.py,sha256=7iUtONSZ1NawypUqA6qJsYOi_Pqt7g16wwTZZwsvjmk,1798
|
|
15
|
+
VertexEngine/InputSystem/Events.py,sha256=AKu7ZzZG-lCzWlvbrM-6exAaW99LwVRWb7pPaYlpJww,2314
|
|
16
|
+
VertexEngine/InputSystem/KeyInputs.py,sha256=wk_IfcJHrZ9zRKFJSYleeZe1R2gEToDeT31tUdzBpK4,1714
|
|
17
|
+
VertexEngine/Vertex/__init__.py,sha256=OLats_iLC6kRsG9o2op7iu7lcMMcwWt1omz2mpVhfPw,6402
|
|
18
|
+
VertexEngine/examples/test.py,sha256=Vzpxo8dg0pfLbvqaEyNDD3ScS_BpdLkg9W3Q0o7JhxM,1445
|
|
19
|
+
VertexEngine/examples/games/Dodge/main.py,sha256=B4w6UmK8zPxXXTudoUC_UKiVo3Y_aPqbI6zPo4q0DAc,5956
|
|
20
|
+
VertexEngine/examples/games/platformer/main.py,sha256=6qIKefxHPmIUPdRVazTmBp6fe56Co7jTdzphOKaSQIE,5410
|
|
21
|
+
VertexEngine/examples/games/snake/main.py,sha256=NYiOyONAUHp64wZDRbhalruqI99MDD8Qa75G4qMU2-k,3345
|
|
22
|
+
vertexengine-1.2.0rc4.dist-info/licenses/LICENSE,sha256=dV2_I9Rq_DHkqouiT6TD2tsQVh9pgzlqFrkT8BuW2X8,1096
|
|
23
|
+
vertexengine-1.2.0rc4.dist-info/METADATA,sha256=lB7yd-bqOhIIMJrDyqGiA7pDzrVv4xFao8PRiSzpQ4k,3562
|
|
24
|
+
vertexengine-1.2.0rc4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
25
|
+
vertexengine-1.2.0rc4.dist-info/top_level.txt,sha256=ONNMJUQViY7bNuEYPB2TaUwj7Jo1Is2yuBY4KOv19wM,13
|
|
26
|
+
vertexengine-1.2.0rc4.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tyrel Miguel Gomez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VertexEngine
|