VertexEngine 1.9.2__tar.gz → 1.9.4__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 (44) hide show
  1. {vertexengine-1.9.2/src/VertexEngine.egg-info → vertexengine-1.9.4}/PKG-INFO +10 -6
  2. {vertexengine-1.9.2 → vertexengine-1.9.4}/README.md +6 -5
  3. {vertexengine-1.9.2 → vertexengine-1.9.4}/pyproject.toml +4 -1
  4. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/PygameVWidgets/__init__.py +161 -0
  5. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/engine.py +4 -1
  6. {vertexengine-1.9.2 → vertexengine-1.9.4/src/VertexEngine.egg-info}/PKG-INFO +10 -6
  7. {vertexengine-1.9.2 → vertexengine-1.9.4}/LICENSE +0 -0
  8. {vertexengine-1.9.2 → vertexengine-1.9.4}/setup.cfg +0 -0
  9. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/Collisions/__init__.py +0 -0
  10. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/Collisions/collisions.py +0 -0
  11. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/InputSystem/BtnInputs.py +0 -0
  12. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/InputSystem/Events.py +0 -0
  13. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/InputSystem/KeyInputs.py +0 -0
  14. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/Math/_Vector2.py +0 -0
  15. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/Math/__init__.py +0 -0
  16. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/Vertex/__init__.py +0 -0
  17. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexScreenModifiers.py +0 -0
  18. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ChatBubble.py +0 -0
  19. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/CheckBox.py +0 -0
  20. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Counter.py +0 -0
  21. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Dropdown.py +0 -0
  22. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/List.py +0 -0
  23. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/OptionBtnWidget.py +0 -0
  24. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/StatusLight.py +0 -0
  25. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ToggleSwitch.py +0 -0
  26. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/WindowMods.py +0 -0
  27. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Windows.py +0 -0
  28. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py +0 -0
  29. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/WHY.mp3 +0 -0
  30. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/__init__.py +0 -0
  31. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/_base.py +0 -0
  32. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/assets.py +0 -0
  33. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/audio.py +0 -0
  34. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/examples/MajorSystemTest/Wangi.png +0 -0
  35. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/examples/MajorSystemTest/main.py +0 -0
  36. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/examples/MajorSystemTest/universfield-ui-button-click-147358.mp3 +0 -0
  37. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/examples/games/snake/main.py +0 -0
  38. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/examples/pygwidget_test.py +0 -0
  39. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/examples/test.py +0 -0
  40. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine/scenes.py +0 -0
  41. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine.egg-info/SOURCES.txt +0 -0
  42. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine.egg-info/dependency_links.txt +0 -0
  43. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine.egg-info/requires.txt +0 -0
  44. {vertexengine-1.9.2 → vertexengine-1.9.4}/src/VertexEngine.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: VertexEngine
3
- Version: 1.9.2
3
+ Version: 1.9.4
4
4
  Summary: A high-performance SDK for Python Development.
5
5
  Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
6
6
  License: MIT
@@ -21,6 +21,9 @@ Classifier: Programming Language :: Python :: 3
21
21
  Classifier: Programming Language :: Python :: 3.10
22
22
  Classifier: Programming Language :: Python :: 3.11
23
23
  Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Programming Language :: Python :: 3.15
24
27
  Classifier: Operating System :: OS Independent
25
28
  Requires-Python: >=3.10
26
29
  Description-Content-Type: text/markdown
@@ -56,11 +59,12 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
56
59
  - The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
57
60
  - Support Email: FinalFacility0828@gmail.com
58
61
 
59
- ## Community
60
- Discord is out NOW!
61
- [Discord Server](https://discord.gg/VertexEngine)
62
-
63
- ## Change Logs (1.7.0 - 1.9.2)
62
+ ## Change Logs (1.7.0 - 1.9.4)
63
+ ### 1.9.4
64
+ - NEW ENGINE FLAG: resizable (bool)
65
+ ### 1.9.3
66
+ - 3 NEW WIDGETS
67
+ - Card, Progess Bar, Toggle
64
68
  ### 1.9.2
65
69
  - NEW DEMO
66
70
  - How to run: python3.x -m VertexEngine.examples.MajorSystemTest.main
@@ -24,11 +24,12 @@ 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
- ## Community
28
- Discord is out NOW!
29
- [Discord Server](https://discord.gg/VertexEngine)
30
-
31
- ## Change Logs (1.7.0 - 1.9.2)
27
+ ## Change Logs (1.7.0 - 1.9.4)
28
+ ### 1.9.4
29
+ - NEW ENGINE FLAG: resizable (bool)
30
+ ### 1.9.3
31
+ - 3 NEW WIDGETS
32
+ - Card, Progess Bar, Toggle
32
33
  ### 1.9.2
33
34
  - NEW DEMO
34
35
  - How to run: python3.x -m VertexEngine.examples.MajorSystemTest.main
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "VertexEngine"
3
- version = "1.9.2"
3
+ version = "1.9.4"
4
4
  description = "A high-performance SDK for Python Development."
5
5
  authors = [
6
6
  { name = "Tyrel Miguel", email = "annbasilan0828@gmail.com" }
@@ -36,6 +36,9 @@ classifiers = [
36
36
  "Programming Language :: Python :: 3.10",
37
37
  "Programming Language :: Python :: 3.11",
38
38
  "Programming Language :: Python :: 3.12",
39
+ "Programming Language :: Python :: 3.13",
40
+ "Programming Language :: Python :: 3.14",
41
+ "Programming Language :: Python :: 3.15",
39
42
  "Operating System :: OS Independent"
40
43
  ]
41
44
 
@@ -305,6 +305,167 @@ class Slider(Widget):
305
305
  self.knob_radius
306
306
  )
307
307
 
308
+ class Card(Widget):
309
+ """A drawable container for grouping related widgets."""
310
+
311
+ def __init__(self, x, y, width, height, style=None):
312
+ super().__init__(x, y, width, height, style)
313
+
314
+ def update_rect(self):
315
+ """Update this card and all child rects in screen coordinates."""
316
+ super().update_rect()
317
+ for child in self.children:
318
+ child.update_rect()
319
+
320
+ def draw(self, surface):
321
+ if not self.visible:
322
+ return
323
+
324
+ rect = self.rect()
325
+ pygame.draw.rect(
326
+ surface,
327
+ self.style.bg_color,
328
+ rect,
329
+ border_radius=self.style.border_radius
330
+ )
331
+ if self.style.border_width:
332
+ pygame.draw.rect(
333
+ surface,
334
+ self.style.border_color,
335
+ rect,
336
+ width=self.style.border_width,
337
+ border_radius=self.style.border_radius
338
+ )
339
+
340
+ for child in self.children:
341
+ child.draw(surface)
342
+
343
+
344
+ class ProgressBar(Widget):
345
+ """Displays progress between a configurable minimum and maximum."""
346
+
347
+ def __init__(
348
+ self,
349
+ x,
350
+ y,
351
+ width,
352
+ height=20,
353
+ min_value=0,
354
+ max_value=100,
355
+ value=0,
356
+ on_change=None,
357
+ style=None
358
+ ):
359
+ super().__init__(x, y, width, height, style)
360
+ if max_value < min_value:
361
+ raise ValueError("max_value must be greater than or equal to min_value")
362
+
363
+ self.min = min_value
364
+ self.max = max_value
365
+ self.value = max(self.min, min(self.max, value))
366
+ self.on_change = on_change
367
+
368
+ def set_value(self, value):
369
+ """Set the value, clamp it to the range, and notify on changes."""
370
+ new_value = max(self.min, min(self.max, value))
371
+ if new_value != self.value:
372
+ self.value = new_value
373
+ if self.on_change:
374
+ self.on_change(self.value)
375
+
376
+ def draw(self, surface):
377
+ if not self.visible:
378
+ return
379
+
380
+ rect = self.rect()
381
+ pygame.draw.rect(
382
+ surface,
383
+ self.style.bg_color,
384
+ rect,
385
+ border_radius=self.style.border_radius
386
+ )
387
+
388
+ progress = 0
389
+ if self.max != self.min:
390
+ progress = (self.value - self.min) / (self.max - self.min)
391
+ fill_width = int(rect.width * progress)
392
+ if fill_width:
393
+ pygame.draw.rect(
394
+ surface,
395
+ self.style.hover_color,
396
+ pygame.Rect(rect.x, rect.y, fill_width, rect.height),
397
+ border_radius=self.style.border_radius
398
+ )
399
+
400
+ if self.style.border_width:
401
+ pygame.draw.rect(
402
+ surface,
403
+ self.style.border_color,
404
+ rect,
405
+ width=self.style.border_width,
406
+ border_radius=self.style.border_radius
407
+ )
408
+
409
+
410
+ class Toggle(Widget):
411
+ """A clickable two-state control."""
412
+
413
+ def __init__(self, x, y, width=60, height=30, value=False, on_toggle=None, style=None):
414
+ super().__init__(x, y, width, height, style)
415
+ self.value = bool(value)
416
+ self.on_toggle = on_toggle
417
+ self.hovered = False
418
+ self.pressed = False
419
+
420
+ @property
421
+ def is_on(self):
422
+ return self.value
423
+
424
+ def set_value(self, value):
425
+ """Set the state and notify only when it changes."""
426
+ new_value = bool(value)
427
+ if new_value != self.value:
428
+ self.value = new_value
429
+ if self.on_toggle:
430
+ self.on_toggle(self.value)
431
+
432
+ def update(self):
433
+ self.hovered = self.rect().collidepoint(pygame.mouse.get_pos())
434
+
435
+ def handle_event(self, event):
436
+ if event.type == pygame.MOUSEBUTTONDOWN and self.rect().collidepoint(event.pos):
437
+ self.pressed = True
438
+ elif event.type == pygame.MOUSEBUTTONUP:
439
+ if self.pressed and self.rect().collidepoint(event.pos):
440
+ self.set_value(not self.value)
441
+ self.pressed = False
442
+
443
+ def draw(self, surface):
444
+ if not self.visible:
445
+ return
446
+
447
+ rect = self.rect()
448
+ color = self.style.pressed_color if self.value else self.style.bg_color
449
+ if self.hovered and not self.value:
450
+ color = self.style.hover_color
451
+ pygame.draw.rect(
452
+ surface,
453
+ color,
454
+ rect,
455
+ border_radius=min(self.style.border_radius, rect.height // 2)
456
+ )
457
+ if self.style.border_width:
458
+ pygame.draw.rect(
459
+ surface,
460
+ self.style.border_color,
461
+ rect,
462
+ width=self.style.border_width,
463
+ border_radius=min(self.style.border_radius, rect.height // 2)
464
+ )
465
+
466
+ knob_radius = max(1, rect.height // 2 - self.style.padding)
467
+ knob_x = rect.right - rect.height // 2 if self.value else rect.left + rect.height // 2
468
+ pygame.draw.circle(surface, self.style.text_color, (knob_x, rect.centery), knob_radius)
308
469
 
309
470
  # =========================================================
310
471
  # UI MANAGER
@@ -9,13 +9,14 @@ pygame.init()
9
9
 
10
10
  class GameEngine(QWidget):
11
11
  """`GameEngine()` is a class to create the window for your VertexEngine game."""
12
- def __init__(self, width=800, height=600, color=(50, 50, 100), fps=60, position=(0, 0)):
12
+ def __init__(self, width=800, height=600, color=(50, 50, 100), fps=60, position=(0, 0), resizable=True):
13
13
  super().__init__()
14
14
  self.width = width
15
15
  self.height = height
16
16
  self.color = color
17
17
  self.fps = fps
18
18
  self.position = position
19
+ self.resizable = resizable
19
20
 
20
21
  self.keys_down = set()
21
22
 
@@ -33,6 +34,8 @@ class GameEngine(QWidget):
33
34
 
34
35
  self.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
35
36
  self.resize(self.width, self.height)
37
+ if not self.resizable:
38
+ self.setFixedSize(self.width, self.height)
36
39
  self.move(*self.position)
37
40
 
38
41
  def _sync_qimage(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: VertexEngine
3
- Version: 1.9.2
3
+ Version: 1.9.4
4
4
  Summary: A high-performance SDK for Python Development.
5
5
  Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
6
6
  License: MIT
@@ -21,6 +21,9 @@ Classifier: Programming Language :: Python :: 3
21
21
  Classifier: Programming Language :: Python :: 3.10
22
22
  Classifier: Programming Language :: Python :: 3.11
23
23
  Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Programming Language :: Python :: 3.15
24
27
  Classifier: Operating System :: OS Independent
25
28
  Requires-Python: >=3.10
26
29
  Description-Content-Type: text/markdown
@@ -56,11 +59,12 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
56
59
  - The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
57
60
  - Support Email: FinalFacility0828@gmail.com
58
61
 
59
- ## Community
60
- Discord is out NOW!
61
- [Discord Server](https://discord.gg/VertexEngine)
62
-
63
- ## Change Logs (1.7.0 - 1.9.2)
62
+ ## Change Logs (1.7.0 - 1.9.4)
63
+ ### 1.9.4
64
+ - NEW ENGINE FLAG: resizable (bool)
65
+ ### 1.9.3
66
+ - 3 NEW WIDGETS
67
+ - Card, Progess Bar, Toggle
64
68
  ### 1.9.2
65
69
  - NEW DEMO
66
70
  - How to run: python3.x -m VertexEngine.examples.MajorSystemTest.main
File without changes
File without changes