crystalwindow 1.8__tar.gz → 2.5.8__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.
@@ -1,14 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crystalwindow
3
- Version: 1.8
3
+ Version: 2.5.8
4
4
  Summary: Easier Pygame!, Made by Crystal!!
5
5
  Author: CrystalBallyHereXD
6
+ Author-email: mavilla.519@gmail.com
6
7
  Classifier: Programming Language :: Python :: 3
7
8
  Classifier: Operating System :: OS Independent
8
9
  Requires-Python: >=3.1
9
10
  Description-Content-Type: text/markdown
10
11
  Requires-Dist: pygame>=2.3.0
11
12
  Dynamic: author
13
+ Dynamic: author-email
12
14
  Dynamic: classifier
13
15
  Dynamic: description
14
16
  Dynamic: description-content-type
@@ -18,7 +20,7 @@ Dynamic: summary
18
20
 
19
21
  # CRYSTALWINDOW!!!
20
22
 
21
- A tiny but mighty Pygame framework that gives u a full window system, GUI magic, physics, and file power — all packed into one clean lil module.
23
+ A tiny but mighty Pygame framework that gives u a full window system, GUI magic, physics, and file power — all packed into one clean lil module. made by crystal
22
24
 
23
25
  No setup pain. No folder chaos.
24
26
  Just import it. Boom. Instant game window. 🎮
@@ -39,6 +41,66 @@ then make a new .py file:
39
41
  Run it. and boom, instant working window.
40
42
  Yes, THAT easy.
41
43
 
44
+ # Easy crystalwindow window + Gui + Text file:
45
+ from crystalwindow import *
46
+
47
+ win = Window(800, 600, "CrystalWindowLib Mega Sandbox")
48
+
49
+ gui = GUIManager()
50
+ toggle1 = Toggle((50, 50, 100, 40), value=False)
51
+ slider1 = Slider((50, 120, 200, 30), min_val=0, max_val=100, value=50)
52
+
53
+ btn1 = Button(rect=(50, 200, 150, 50), text="Click Me!", color=random_color(),
54
+ hover_color=random_color(), callback=lambda: print("Button clicked!"))
55
+ lbl1 = Label((250, 50), "Hello GUI!", color=random_color(), size=24)
56
+
57
+ gui.add(toggle1)
58
+ gui.add(slider1)
59
+ gui.add(btn1)
60
+ gui.add(lbl1)
61
+
62
+ # --- Debug Overlay ---
63
+ debug = DebugOverlay()
64
+
65
+ # --- Camera Shake ---
66
+ shake = CameraShake(intensity=20)
67
+
68
+ # --- Main loop ---
69
+ def update(win):
70
+ gui.update(win)
71
+ gui.draw(win)
72
+
73
+ # --- draw text examples ---
74
+ win.draw_text_later("Normal Text", pos=(400, 50), size=18, color=random_color())
75
+ win.draw_text_later("Bold Text", pos=(400, 80), size=20, color=random_color(), bold=True)
76
+ win.draw_text_later("Italic Text", pos=(400, 110), size=20, color=random_color(), italic=True)
77
+ win.draw_text_later("Bold + Italic", pos=(400, 140), size=22, color=random_color(), bold=True, italic=True)
78
+
79
+ # --- draw toggle/slider values ---
80
+ win.draw_text_later(f"Toggle: {toggle1.value}", pos=(50, 90), size=18)
81
+ win.draw_text_later(f"Slider: {int(slider1.value)}", pos=(50, 160), size=18)
82
+
83
+ # --- draw gradient ---
84
+ gradient_rect(win, (50, 300, 200, 100), (255,0,0), (0,0,255))
85
+
86
+ # --- screen shake example (move a rectangle with shake) ---
87
+ shake.update()
88
+ x_off, y_off = shake.offset
89
+ win.draw_rect((0,255,0), (500+x_off, 300+y_off, 100, 50))
90
+
91
+ # --- draw random name + color ---
92
+ win.draw_text_later(f"Random Name: {random_name()}", pos=(50, 420), size=20, color=random_color())
93
+
94
+ # --- debug overlay ---
95
+ debug.draw(win, fps=int(win.clock.get_fps()))
96
+
97
+ win.run(update)
98
+ win.quit()
99
+
100
+ And now thats how you use it!
101
+
102
+ # Current Variables.
103
+
42
104
  # Whats Inside
43
105
 
44
106
  Built-in window manager
@@ -1,6 +1,6 @@
1
1
  # CRYSTALWINDOW!!!
2
2
 
3
- A tiny but mighty Pygame framework that gives u a full window system, GUI magic, physics, and file power — all packed into one clean lil module.
3
+ A tiny but mighty Pygame framework that gives u a full window system, GUI magic, physics, and file power — all packed into one clean lil module. made by crystal
4
4
 
5
5
  No setup pain. No folder chaos.
6
6
  Just import it. Boom. Instant game window. 🎮
@@ -21,6 +21,66 @@ then make a new .py file:
21
21
  Run it. and boom, instant working window.
22
22
  Yes, THAT easy.
23
23
 
24
+ # Easy crystalwindow window + Gui + Text file:
25
+ from crystalwindow import *
26
+
27
+ win = Window(800, 600, "CrystalWindowLib Mega Sandbox")
28
+
29
+ gui = GUIManager()
30
+ toggle1 = Toggle((50, 50, 100, 40), value=False)
31
+ slider1 = Slider((50, 120, 200, 30), min_val=0, max_val=100, value=50)
32
+
33
+ btn1 = Button(rect=(50, 200, 150, 50), text="Click Me!", color=random_color(),
34
+ hover_color=random_color(), callback=lambda: print("Button clicked!"))
35
+ lbl1 = Label((250, 50), "Hello GUI!", color=random_color(), size=24)
36
+
37
+ gui.add(toggle1)
38
+ gui.add(slider1)
39
+ gui.add(btn1)
40
+ gui.add(lbl1)
41
+
42
+ # --- Debug Overlay ---
43
+ debug = DebugOverlay()
44
+
45
+ # --- Camera Shake ---
46
+ shake = CameraShake(intensity=20)
47
+
48
+ # --- Main loop ---
49
+ def update(win):
50
+ gui.update(win)
51
+ gui.draw(win)
52
+
53
+ # --- draw text examples ---
54
+ win.draw_text_later("Normal Text", pos=(400, 50), size=18, color=random_color())
55
+ win.draw_text_later("Bold Text", pos=(400, 80), size=20, color=random_color(), bold=True)
56
+ win.draw_text_later("Italic Text", pos=(400, 110), size=20, color=random_color(), italic=True)
57
+ win.draw_text_later("Bold + Italic", pos=(400, 140), size=22, color=random_color(), bold=True, italic=True)
58
+
59
+ # --- draw toggle/slider values ---
60
+ win.draw_text_later(f"Toggle: {toggle1.value}", pos=(50, 90), size=18)
61
+ win.draw_text_later(f"Slider: {int(slider1.value)}", pos=(50, 160), size=18)
62
+
63
+ # --- draw gradient ---
64
+ gradient_rect(win, (50, 300, 200, 100), (255,0,0), (0,0,255))
65
+
66
+ # --- screen shake example (move a rectangle with shake) ---
67
+ shake.update()
68
+ x_off, y_off = shake.offset
69
+ win.draw_rect((0,255,0), (500+x_off, 300+y_off, 100, 50))
70
+
71
+ # --- draw random name + color ---
72
+ win.draw_text_later(f"Random Name: {random_name()}", pos=(50, 420), size=20, color=random_color())
73
+
74
+ # --- debug overlay ---
75
+ debug.draw(win, fps=int(win.clock.get_fps()))
76
+
77
+ win.run(update)
78
+ win.quit()
79
+
80
+ And now thats how you use it!
81
+
82
+ # Current Variables.
83
+
24
84
  # Whats Inside
25
85
 
26
86
  Built-in window manager
@@ -1,14 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crystalwindow
3
- Version: 1.8
3
+ Version: 2.5.8
4
4
  Summary: Easier Pygame!, Made by Crystal!!
5
5
  Author: CrystalBallyHereXD
6
+ Author-email: mavilla.519@gmail.com
6
7
  Classifier: Programming Language :: Python :: 3
7
8
  Classifier: Operating System :: OS Independent
8
9
  Requires-Python: >=3.1
9
10
  Description-Content-Type: text/markdown
10
11
  Requires-Dist: pygame>=2.3.0
11
12
  Dynamic: author
13
+ Dynamic: author-email
12
14
  Dynamic: classifier
13
15
  Dynamic: description
14
16
  Dynamic: description-content-type
@@ -18,7 +20,7 @@ Dynamic: summary
18
20
 
19
21
  # CRYSTALWINDOW!!!
20
22
 
21
- A tiny but mighty Pygame framework that gives u a full window system, GUI magic, physics, and file power — all packed into one clean lil module.
23
+ A tiny but mighty Pygame framework that gives u a full window system, GUI magic, physics, and file power — all packed into one clean lil module. made by crystal
22
24
 
23
25
  No setup pain. No folder chaos.
24
26
  Just import it. Boom. Instant game window. 🎮
@@ -39,6 +41,66 @@ then make a new .py file:
39
41
  Run it. and boom, instant working window.
40
42
  Yes, THAT easy.
41
43
 
44
+ # Easy crystalwindow window + Gui + Text file:
45
+ from crystalwindow import *
46
+
47
+ win = Window(800, 600, "CrystalWindowLib Mega Sandbox")
48
+
49
+ gui = GUIManager()
50
+ toggle1 = Toggle((50, 50, 100, 40), value=False)
51
+ slider1 = Slider((50, 120, 200, 30), min_val=0, max_val=100, value=50)
52
+
53
+ btn1 = Button(rect=(50, 200, 150, 50), text="Click Me!", color=random_color(),
54
+ hover_color=random_color(), callback=lambda: print("Button clicked!"))
55
+ lbl1 = Label((250, 50), "Hello GUI!", color=random_color(), size=24)
56
+
57
+ gui.add(toggle1)
58
+ gui.add(slider1)
59
+ gui.add(btn1)
60
+ gui.add(lbl1)
61
+
62
+ # --- Debug Overlay ---
63
+ debug = DebugOverlay()
64
+
65
+ # --- Camera Shake ---
66
+ shake = CameraShake(intensity=20)
67
+
68
+ # --- Main loop ---
69
+ def update(win):
70
+ gui.update(win)
71
+ gui.draw(win)
72
+
73
+ # --- draw text examples ---
74
+ win.draw_text_later("Normal Text", pos=(400, 50), size=18, color=random_color())
75
+ win.draw_text_later("Bold Text", pos=(400, 80), size=20, color=random_color(), bold=True)
76
+ win.draw_text_later("Italic Text", pos=(400, 110), size=20, color=random_color(), italic=True)
77
+ win.draw_text_later("Bold + Italic", pos=(400, 140), size=22, color=random_color(), bold=True, italic=True)
78
+
79
+ # --- draw toggle/slider values ---
80
+ win.draw_text_later(f"Toggle: {toggle1.value}", pos=(50, 90), size=18)
81
+ win.draw_text_later(f"Slider: {int(slider1.value)}", pos=(50, 160), size=18)
82
+
83
+ # --- draw gradient ---
84
+ gradient_rect(win, (50, 300, 200, 100), (255,0,0), (0,0,255))
85
+
86
+ # --- screen shake example (move a rectangle with shake) ---
87
+ shake.update()
88
+ x_off, y_off = shake.offset
89
+ win.draw_rect((0,255,0), (500+x_off, 300+y_off, 100, 50))
90
+
91
+ # --- draw random name + color ---
92
+ win.draw_text_later(f"Random Name: {random_name()}", pos=(50, 420), size=20, color=random_color())
93
+
94
+ # --- debug overlay ---
95
+ debug.draw(win, fps=int(win.clock.get_fps()))
96
+
97
+ win.run(update)
98
+ win.quit()
99
+
100
+ And now thats how you use it!
101
+
102
+ # Current Variables.
103
+
42
104
  # Whats Inside
43
105
 
44
106
  Built-in window manager
@@ -2,11 +2,12 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="crystalwindow", # this is the name ppl will pip install
5
- version="1.8", # update when u change stuff
5
+ version="2.5.8", # update when u change stuff
6
6
  packages=find_packages(include=["CrystalWindow", "CrystalWindow.*"]),
7
7
  include_package_data=True,
8
- install_requires=["pygame>=2.3.0"], # cuz ur lib uses pygame
8
+ install_requires=["pygame>=2.3.0"],
9
9
  author="CrystalBallyHereXD",
10
+ author_email="mavilla.519@gmail.com",
10
11
  description="Easier Pygame!, Made by Crystal!!",
11
12
  long_description=open("README.md").read(),
12
13
  long_description_content_type="text/markdown",
File without changes
File without changes