VertexEngine 1.4.dev1__tar.gz → 1.5rc1__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.
Files changed (36) hide show
  1. {vertexengine-1.4.dev1/src/VertexEngine.egg-info → vertexengine-1.5rc1}/PKG-INFO +15 -2
  2. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/README.md +13 -1
  3. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/pyproject.toml +2 -1
  4. vertexengine-1.5rc1/src/VertexEngine/VertexWidgets/AdvancedVWidgets/OptionBtnWidget.py +75 -0
  5. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/assets.py +11 -1
  6. {vertexengine-1.4.dev1 → vertexengine-1.5rc1/src/VertexEngine.egg-info}/PKG-INFO +15 -2
  7. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine.egg-info/SOURCES.txt +1 -0
  8. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/LICENSE +0 -0
  9. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/setup.cfg +0 -0
  10. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/InputSystem/BtnInputs.py +0 -0
  11. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/InputSystem/Events.py +0 -0
  12. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/InputSystem/KeyInputs.py +0 -0
  13. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/Vertex/__init__.py +0 -0
  14. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexScreenModifiers.py +0 -0
  15. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ChatBubble.py +0 -0
  16. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/CheckBox.py +0 -0
  17. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Counter.py +0 -0
  18. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Dropdown.py +0 -0
  19. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/List.py +0 -0
  20. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/StatusLight.py +0 -0
  21. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ToggleSwitch.py +0 -0
  22. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/WindowMods.py +0 -0
  23. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Windows.py +0 -0
  24. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py +0 -0
  25. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/__init__.py +0 -0
  26. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/audio.py +0 -0
  27. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/engine.py +0 -0
  28. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/example.py +0 -0
  29. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/examples/games/Dodge/main.py +0 -0
  30. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/examples/games/platformer/main.py +0 -0
  31. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/examples/games/snake/main.py +0 -0
  32. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/examples/test.py +0 -0
  33. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine/scenes.py +0 -0
  34. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine.egg-info/dependency_links.txt +0 -0
  35. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine.egg-info/requires.txt +0 -0
  36. {vertexengine-1.4.dev1 → vertexengine-1.5rc1}/src/VertexEngine.egg-info/top_level.txt +0 -0
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: VertexEngine
3
- Version: 1.4.dev1
3
+ Version: 1.5rc1
4
4
  Summary: A high-performance SDK for Python Development.
5
5
  Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
6
6
  License: MIT
7
+ Project-URL: Homepage, https://vertexengine.onrender.com
7
8
  Project-URL: Documentation, https://vertexenginedocs.netlify.app/
8
9
  Project-URL: Source, https://github.com/TyrelGomez/VertexEngine-Code
9
10
  Project-URL: Issues, https://github.com/TyrelGomez/VertexEngine-Code/issues
@@ -27,7 +28,19 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
27
28
  ## Community
28
29
  Discord is out NOW!
29
30
  [Discord Server](https://discord.com/channels/1468208686869643327/1468208687670890588)
30
- ## Change Logs (1.0rc1 - 1.3.0), NEW!
31
+ ## Change Logs (1.0rc1 - 1.5rc1), NEW!
32
+ ### 1.5rc1
33
+ - Homepage only updates on major updates now.
34
+ - Fixed asset manager bugs
35
+ ### 1.4.0
36
+ - Fixed a lot of bugs
37
+ - Updated outdated templates!
38
+ - Docs update!
39
+ ### 1.4rc2
40
+ - Final RC!
41
+ - Fixed internals for the WebEngine and CLI.
42
+ - Added 1 New Module:
43
+ - OptionBtnWidget
31
44
  ### 1.4rc1
32
45
  - 21 Stablization Fixes!
33
46
  - Added builtin KeyDown/Up events to GameEngine!
@@ -9,7 +9,19 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
9
9
  ## Community
10
10
  Discord is out NOW!
11
11
  [Discord Server](https://discord.com/channels/1468208686869643327/1468208687670890588)
12
- ## Change Logs (1.0rc1 - 1.3.0), NEW!
12
+ ## Change Logs (1.0rc1 - 1.5rc1), NEW!
13
+ ### 1.5rc1
14
+ - Homepage only updates on major updates now.
15
+ - Fixed asset manager bugs
16
+ ### 1.4.0
17
+ - Fixed a lot of bugs
18
+ - Updated outdated templates!
19
+ - Docs update!
20
+ ### 1.4rc2
21
+ - Final RC!
22
+ - Fixed internals for the WebEngine and CLI.
23
+ - Added 1 New Module:
24
+ - OptionBtnWidget
13
25
  ### 1.4rc1
14
26
  - 21 Stablization Fixes!
15
27
  - Added builtin KeyDown/Up events to GameEngine!
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "VertexEngine"
3
- version = "1.4dev1"
3
+ version = "1.5rc1"
4
4
  description = "A high-performance SDK for Python Development."
5
5
  authors = [
6
6
  { name = "Tyrel Miguel", email = "annbasilan0828@gmail.com" }
@@ -16,6 +16,7 @@ dependencies = [
16
16
  ]
17
17
 
18
18
  [project.urls]
19
+ Homepage = "https://vertexengine.onrender.com"
19
20
  Documentation = "https://vertexenginedocs.netlify.app/"
20
21
  Source = "https://github.com/TyrelGomez/VertexEngine-Code"
21
22
  Issues = "https://github.com/TyrelGomez/VertexEngine-Code/issues"
@@ -0,0 +1,75 @@
1
+ from PyQt6.QtWidgets import QWidget, QHBoxLayout, QPushButton, QApplication
2
+ from PyQt6.QtCore import pyqtSignal
3
+ import sys
4
+
5
+ # -----------------------------
6
+ # Custom OptionButtonWidget
7
+ # -----------------------------
8
+ class OptionButtonWidget(QWidget):
9
+ """Widget for Option buttons. Options by default is A, B and C.
10
+ Usage:
11
+ .. code-block :: python
12
+ options_widget = OptionButtonWidget(["Option A", "Option B", "Option C"]) \n
13
+ layout.addWidget(options_widget) \n
14
+ def on_option_clicked(option): \n
15
+ print(f"You clicked: {option}") \n
16
+
17
+ options_widget.optionClicked.connect(on_option_clicked)
18
+ """
19
+ # Signal emits the clicked option text
20
+ optionClicked = pyqtSignal(str)
21
+
22
+ def __init__(self, options=None):
23
+ super().__init__()
24
+ options = options or ["A", "B", "C"] # default options
25
+
26
+ # Layout
27
+ layout = QHBoxLayout()
28
+ self.setLayout(layout)
29
+
30
+ # Create buttons
31
+ self.buttons = []
32
+ for opt in options:
33
+ btn = QPushButton(opt)
34
+ btn.setCheckable(True) # allows toggle behavior
35
+ btn.clicked.connect(lambda checked, o=opt: self._on_clicked(o))
36
+ layout.addWidget(btn)
37
+ self.buttons.append(btn)
38
+
39
+ def _on_clicked(self, option):
40
+ # Uncheck all other buttons
41
+ for btn in self.buttons:
42
+ if btn.text() != option:
43
+ btn.setChecked(False)
44
+ # Emit signal
45
+ self.optionClicked.emit(option)
46
+
47
+ # Optional: get currently selected option
48
+ def selected_option(self):
49
+ for btn in self.buttons:
50
+ if btn.isChecked():
51
+ return btn.text()
52
+ return None
53
+
54
+ # -----------------------------
55
+ # Demo usage
56
+ # -----------------------------
57
+ if __name__ == "__main__":
58
+ app = QApplication(sys.argv)
59
+ window = QWidget()
60
+ window.setWindowTitle("Option Button Demo")
61
+ layout = QHBoxLayout()
62
+ window.setLayout(layout)
63
+
64
+ # Create option button widget
65
+ options_widget = OptionButtonWidget(["Option A", "Option B", "Option C"])
66
+ layout.addWidget(options_widget)
67
+
68
+ # Connect the clicked signal
69
+ def on_option_clicked(option):
70
+ print(f"You clicked: {option}")
71
+
72
+ options_widget.optionClicked.connect(on_option_clicked)
73
+
74
+ window.show()
75
+ sys.exit(app.exec())
@@ -47,11 +47,12 @@ class AssetManager:
47
47
  self.images = {}
48
48
 
49
49
  def load_image(self, name: str, path: str):
50
+ """Load an image with a name to accompany it to not manually type the path. `Path` is the place that `name` points to."""
50
51
  if name in self.images:
51
52
  return self.images[name]
52
53
 
53
54
  try:
54
- surface = pygame.image.load(path).convert_alpha()
55
+ surface = pygame.image.load(path)
55
56
  self.images[name] = surface
56
57
  return surface
57
58
 
@@ -60,4 +61,13 @@ class AssetManager:
60
61
  return None
61
62
 
62
63
  def get_image(self, name: str):
64
+ """Get an image by using it's `name` as the identifier"""
63
65
  return self.images.get(name)
66
+
67
+ def draw(self, target_surface, name, pos=(0, 0)):
68
+ """Blit the image with the given name onto target_surface at position pos."""
69
+ img = self.images.get(name)
70
+ if img:
71
+ target_surface.blit(img, pos)
72
+ else:
73
+ print(f"[Warning] Image '{name}' not loaded!")
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: VertexEngine
3
- Version: 1.4.dev1
3
+ Version: 1.5rc1
4
4
  Summary: A high-performance SDK for Python Development.
5
5
  Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
6
6
  License: MIT
7
+ Project-URL: Homepage, https://vertexengine.onrender.com
7
8
  Project-URL: Documentation, https://vertexenginedocs.netlify.app/
8
9
  Project-URL: Source, https://github.com/TyrelGomez/VertexEngine-Code
9
10
  Project-URL: Issues, https://github.com/TyrelGomez/VertexEngine-Code/issues
@@ -27,7 +28,19 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
27
28
  ## Community
28
29
  Discord is out NOW!
29
30
  [Discord Server](https://discord.com/channels/1468208686869643327/1468208687670890588)
30
- ## Change Logs (1.0rc1 - 1.3.0), NEW!
31
+ ## Change Logs (1.0rc1 - 1.5rc1), NEW!
32
+ ### 1.5rc1
33
+ - Homepage only updates on major updates now.
34
+ - Fixed asset manager bugs
35
+ ### 1.4.0
36
+ - Fixed a lot of bugs
37
+ - Updated outdated templates!
38
+ - Docs update!
39
+ ### 1.4rc2
40
+ - Final RC!
41
+ - Fixed internals for the WebEngine and CLI.
42
+ - Added 1 New Module:
43
+ - OptionBtnWidget
31
44
  ### 1.4rc1
32
45
  - 21 Stablization Fixes!
33
46
  - Added builtin KeyDown/Up events to GameEngine!
@@ -23,6 +23,7 @@ src/VertexEngine/VertexWidgets/AdvancedVWidgets/CheckBox.py
23
23
  src/VertexEngine/VertexWidgets/AdvancedVWidgets/Counter.py
24
24
  src/VertexEngine/VertexWidgets/AdvancedVWidgets/Dropdown.py
25
25
  src/VertexEngine/VertexWidgets/AdvancedVWidgets/List.py
26
+ src/VertexEngine/VertexWidgets/AdvancedVWidgets/OptionBtnWidget.py
26
27
  src/VertexEngine/VertexWidgets/AdvancedVWidgets/StatusLight.py
27
28
  src/VertexEngine/VertexWidgets/AdvancedVWidgets/ToggleSwitch.py
28
29
  src/VertexEngine/VertexWidgets/AdvancedVWidgets/WindowMods.py
File without changes
File without changes