crystalwindow 1.4.8__py3-none-any.whl → 2.7.8__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.

Potentially problematic release.


This version of crystalwindow might be problematic. Click here for more details.

@@ -0,0 +1,256 @@
1
+ Metadata-Version: 2.4
2
+ Name: crystalwindow
3
+ Version: 2.7.8
4
+ Summary: Easier Pygame!, Made by Crystal!!
5
+ Author: CrystalBallyHereXD
6
+ Author-email: mavilla.519@gmail.com
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.1
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: pygame>=2.3.0
13
+ Dynamic: author
14
+ Dynamic: author-email
15
+ Dynamic: classifier
16
+ Dynamic: description
17
+ Dynamic: description-content-type
18
+ Dynamic: license-file
19
+ Dynamic: requires-dist
20
+ Dynamic: requires-python
21
+ Dynamic: summary
22
+
23
+ # CRYSTALWINDOW!!!
24
+
25
+ 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
26
+
27
+ No setup pain. No folder chaos.
28
+ Just import it. Boom. Instant game window. 🎮
29
+
30
+ # Quick Start
31
+ pip install crystalwindow
32
+
33
+
34
+ then make a new .py file:
35
+
36
+ from crystalwindow import Window # imports everything from crystalwindow (in this case its Window)
37
+
38
+ win = Window(800, 600, "Crystal Demo") # setup: Window(width, height, name, icon=MyIcon.ico)
39
+ win.run() # runs the window loop
40
+ win.quit() # closes it (for RAM n CPU)
41
+
42
+
43
+ Run it. and boom, instant working window.
44
+ Yes, THAT easy.
45
+
46
+ # Easy crystalwindow window + Gui + Text file:
47
+ from crystalwindow import *
48
+
49
+ win = Window(800, 600, "CrystalWindowLib Mega Sandbox")
50
+
51
+ gui = GUIManager()
52
+ toggle1 = Toggle((50, 50, 100, 40), value=False)
53
+ slider1 = Slider((50, 120, 200, 30), min_val=0, max_val=100, value=50)
54
+
55
+ btn1 = Button(rect=(50, 200, 150, 50), text="Click Me!", color=random_color(),
56
+ hover_color=random_color(), callback=lambda: print("Button clicked!"))
57
+ lbl1 = Label((250, 50), "Hello GUI!", color=random_color(), size=24)
58
+
59
+ gui.add(toggle1)
60
+ gui.add(slider1)
61
+ gui.add(btn1)
62
+ gui.add(lbl1)
63
+
64
+ # --- Debug Overlay ---
65
+ debug = DebugOverlay()
66
+
67
+ # --- Camera Shake ---
68
+ shake = CameraShake(intensity=20)
69
+
70
+ # --- Main loop ---
71
+ def update(win):
72
+ gui.update(win)
73
+ gui.draw(win)
74
+
75
+ # --- draw text examples ---
76
+ win.draw_text_later("Normal Text", pos=(400, 50), size=18, color=random_color())
77
+ win.draw_text_later("Bold Text", pos=(400, 80), size=20, color=random_color(), bold=True)
78
+ win.draw_text_later("Italic Text", pos=(400, 110), size=20, color=random_color(), italic=True)
79
+ win.draw_text_later("Bold + Italic", pos=(400, 140), size=22, color=random_color(), bold=True, italic=True)
80
+
81
+ # --- draw toggle/slider values ---
82
+ win.draw_text_later(f"Toggle: {toggle1.value}", pos=(50, 90), size=18)
83
+ win.draw_text_later(f"Slider: {int(slider1.value)}", pos=(50, 160), size=18)
84
+
85
+ # --- draw gradient ---
86
+ gradient_rect(win, (50, 300, 200, 100), (255,0,0), (0,0,255))
87
+
88
+ # --- screen shake example (move a rectangle with shake) ---
89
+ shake.update()
90
+ x_off, y_off = shake.offset
91
+ win.draw_rect((0,255,0), (500+x_off, 300+y_off, 100, 50))
92
+
93
+ # --- draw random name + color ---
94
+ win.draw_text_later(f"Random Name: {random_name()}", pos=(50, 420), size=20, color=random_color())
95
+
96
+ # --- debug overlay ---
97
+ debug.draw(win, fps=int(win.clock.get_fps()))
98
+
99
+ win.run(update)
100
+ win.quit()
101
+
102
+ And now thats how you use it!
103
+
104
+ # Current Variables.
105
+
106
+ # Whats Inside
107
+
108
+ Built-in window manager
109
+
110
+ Built-in GUI (buttons, sliders, toggles, labels)
111
+
112
+ Built-in gravity + physics engine
113
+
114
+ Tilemap system (place & save blocks!)
115
+
116
+ Image loader (with default base64 logo)
117
+
118
+ Safe startup (works even inside PyInstaller)
119
+
120
+ No external dependencies (only pygame)
121
+
122
+ Works offline
123
+
124
+ Minimal syntax
125
+
126
+ Full debug overlay
127
+
128
+ # Window System
129
+ from crystalwindow import *
130
+
131
+ win = Window(800, 600, "My Game", icon="MyIcon.png")
132
+
133
+ def loop(win):
134
+ win.fill((10, 10, 30))
135
+ # draw or update stuff here
136
+
137
+ win.run(loop)
138
+ win.quit()
139
+
140
+ # Features
141
+ * handles events
142
+ * tracks keys + mouse
143
+ * supports fullscreen
144
+ * safe to close anytime
145
+
146
+ # Player Example
147
+ player = Player(100, 100)
148
+
149
+ def loop(win):
150
+ player.update(win.keys)
151
+ player.draw(win.screen)
152
+ move(dx, dy) -> moves player
153
+ take_damage(x) -> takes damage
154
+ heal(x) -> heals
155
+ draw(surface) -> renders sprite
156
+
157
+ # TileMap
158
+ tilemap = TileMap(32)
159
+ tilemap.add_tile(5, 5, "grass")
160
+ tilemap.save("level.json")
161
+ add_tile(x, y, type)
162
+ remove_tile(x, y)
163
+ draw(surface)
164
+ save(file) / load(file)
165
+
166
+ # GUI System
167
+ btn = Button(20, 20, 120, 40, "Click Me!", lambda: print("yo"))
168
+ gui = GUIManager()
169
+ gui.add(btn)
170
+
171
+
172
+ Use built-in stuff like:
173
+
174
+ Button(x, y, w, h, text, onclick)
175
+ Label(x, y, text)
176
+ Toggle(x, y, w, h, text, default=False)
177
+ Slider(x, y, w, min, max, default)
178
+
179
+ # Gravity
180
+ g = Gravity(0.5)
181
+ g.update(player)
182
+
183
+
184
+ makes objects fall realistically. ez.
185
+
186
+ # FileHelper
187
+ save_json("data.json", {"coins": 99})
188
+ data = load_json("data.json")
189
+
190
+
191
+ Also supports:
192
+
193
+ save_pickle / load_pickle
194
+
195
+ FileDialog("save") (tkinter dialog popup)
196
+
197
+ # DrawHelper
198
+ DrawHelper.text(win.screen, "Hello!", (10,10), (255,255,255), 24)
199
+ DrawHelper.rect(win.screen, (100,0,200), (50,50,100,60))
200
+
201
+
202
+ perfect for ui & quick visuals
203
+
204
+ # Debug Tools
205
+ debug = DebugOverlay()
206
+ debug.toggle() # show or hide FPS
207
+ debug.draw(win.screen, {"hp": 100, "fps": win.clock.get_fps()})
208
+
209
+ # Example Game
210
+ from crystalwindow import *
211
+
212
+ win = Window(800, 600, "My Cool Game")
213
+ player = Player(100, 100)
214
+ gravity = Gravity()
215
+
216
+ def update(win):
217
+ win.fill((25, 25, 40))
218
+ player.update(win.keys)
219
+ gravity.update(player)
220
+ player.draw(win.screen)
221
+
222
+ win.run(update)
223
+ win.quit()
224
+
225
+ # Default Logo
226
+
227
+ There is a lil encoded PNG inside the file called:
228
+
229
+ DEFAULT_LOGO_BASE64
230
+
231
+
232
+ Its used when no icon is given.
233
+ Set ur own like:
234
+
235
+ Window(800, 600, "My Window", icon="MyIcon.png")
236
+
237
+
238
+ or do whatever you want.. i guess.
239
+
240
+ # Example Integration
241
+ from crystalwindow import Window
242
+
243
+ win = Window(800, 600, "My Window", icon="MyIcon.png")
244
+
245
+ while win.running:
246
+ win.check_events()
247
+ win.fill((10, 10, 20))
248
+ win.run()
249
+ win.quit()
250
+
251
+ # Credits
252
+
253
+ Made by: CrystalBallyHereXD
254
+ Framework: CrystalWindow
255
+ Powered by: Pygame
256
+ License: Free to use, modify, and vibe with it!
@@ -0,0 +1,31 @@
1
+ crystalwindow/FileHelper.py,sha256=aUnnRG7UwvzJt-idjWjmpwy3RM6nqLlC3-7Bae6Yb94,5471
2
+ crystalwindow/__init__.py,sha256=RZ_T8GATeL07wOu0voYFnJYAbohe0M4BKwkWktrlBq8,1681
3
+ crystalwindow/animation.py,sha256=zHjrdBXQeyNaLAuaGPldJueX05OZ5j31YR8NizmR0uQ,427
4
+ crystalwindow/assets.py,sha256=7npzf72pQhdoJOC4b_cBgznX-x1NZXrmI_rXIsNUTr4,1072
5
+ crystalwindow/collision.py,sha256=hpkHTp_KparghVK-itp_rxuYdd2GbQMxICHlUBv0rSw,472
6
+ crystalwindow/draw_helpers.py,sha256=HqjI5fTbdnA55g4LKYEuMUdIjrWaBm2U8RmeUXjcQGw,821
7
+ crystalwindow/draw_rects.py,sha256=o7siET3y35N2LPeNBGe8QhsQbOH8J-xF6fOUz07rymU,1484
8
+ crystalwindow/draw_text_helper.py,sha256=qv5fFCuTCKWeGDk9Z_ZpOzrTFP8YYwlgQrrorwrq9Hg,1298
9
+ crystalwindow/draw_tool.py,sha256=1YYEqjmgt4HpV3S15sTjCSmcqgHup4fD8gskTkxU0t4,1638
10
+ crystalwindow/fun_helpers.py,sha256=fo5yTwGENltdtVIVwgITtUkvzpsImujOcqTxe8XPzR8,760
11
+ crystalwindow/gravity.py,sha256=tMctHYubpcUJRogz4kNg3XZGDPE3605zON-4YumiVGo,2752
12
+ crystalwindow/gui.py,sha256=w5CjHkYOJbM1FR2SfpcaPSgLOzryLadihvW53tayiGU,2231
13
+ crystalwindow/gui_ext.py,sha256=dJavRaffWr_pL8Qc9b7j8muI1zTLIIJ0hAGDOrFQB1s,2444
14
+ crystalwindow/math.py,sha256=slOY3KQZ99VDMUMxsSJabMyRtJcwVzEyxR2RoXspHho,963
15
+ crystalwindow/player.py,sha256=4wpIdUZLTlRXV8fDRQ11yVJRbx_cv8Ekpn2y7pQGgAQ,3442
16
+ crystalwindow/sprites.py,sha256=9_3chojuLKVBtd2UJR8fsUSRexMx22rQKognsAxfw70,1171
17
+ crystalwindow/tilemap.py,sha256=PHoKL1eWuNeHIf0w-Jh5MGdQGEgklVsxqqJOS-GNMKI,322
18
+ crystalwindow/ver_warner.py,sha256=thSnZKejMUtjXlNtMfX_GiuOjBo_-TCF3ETOZRQkcq0,2042
19
+ crystalwindow/window.py,sha256=JmWjR0aOm4Q8OoboqDHzGKqUmxlAJbj37KBBY0QPjrs,17779
20
+ crystalwindow/Icons/default_icon.png,sha256=Loq27Pxb8Wb3Sz-XwtNF1RmlLNxR4TcfOWfK-1lWcII,7724
21
+ crystalwindow/gametests/__init__.py,sha256=-CQ2bIDMe4v2dzTuYcu9GshVGZC8d5yQVPW53Q8D4-E,434
22
+ crystalwindow/gametests/__main__.py,sha256=R3Q6MiMOI4YenZCqY4AmWWYI8t26cKxhz-lVKuXACPM,637
23
+ crystalwindow/gametests/gravitytest.py,sha256=mMqOkjJTbpa_XgHHBSIcVt9zfE8yW6rd7KuKgANS7Gc,1264
24
+ crystalwindow/gametests/guitesting.py,sha256=SrOssY5peCQEV6TQ1AiOWtjb9phVGdRzW-QzIl_MX5Q,1920
25
+ crystalwindow/gametests/sandbox.py,sha256=Oo2tU2N0y3BPVa6T5vs_h9N6islhQrjSrr_78XLut5I,1007
26
+ crystalwindow/gametests/windowtesting.py,sha256=_9X6wnV1-_X_PtNS-0zu-k209NtFIwAc4vpxLPp7V2o,97
27
+ crystalwindow-2.7.8.dist-info/licenses/LICENSE,sha256=7pvUgvRXL3ED5VVAZPH5oGn1CaIXcyoDC9gqox6sB0g,1079
28
+ crystalwindow-2.7.8.dist-info/METADATA,sha256=jjPNqiVmSuSkbnR8yijc9ACa54R6ms4fPwk7F5wZqU0,6585
29
+ crystalwindow-2.7.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
30
+ crystalwindow-2.7.8.dist-info/top_level.txt,sha256=PeQSld4b19XWT-zvbYkvE2Xg8sakIMbDzSzSdOSRN8o,14
31
+ crystalwindow-2.7.8.dist-info/RECORD,,
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 C
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.
@@ -1,19 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: crystalwindow
3
- Version: 1.4.8
4
- Summary: pygame but remade, easy window/player/tile handling
5
- Author: CrystalBallyHereXD
6
- Classifier: Programming Language :: Python :: 3
7
- Classifier: Operating System :: OS Independent
8
- Requires-Python: >=3.8
9
- Description-Content-Type: text/markdown
10
- Requires-Dist: pygame>=2.3.0
11
- Dynamic: author
12
- Dynamic: classifier
13
- Dynamic: description
14
- Dynamic: description-content-type
15
- Dynamic: requires-dist
16
- Dynamic: requires-python
17
- Dynamic: summary
18
-
19
- pygame but easier!. Made by CrystalBallyHereXD!
@@ -1,20 +0,0 @@
1
- crystalwindow/FileHelper.py,sha256=WFnG9I3PhuAwSd-CtenX_kPW_cN1RU8fDY2oTDhimiY,3274
2
- crystalwindow/__init__.py,sha256=al0kboOcNRV-Jo4XVNb2_r9JzTe2Oj2dGB3W-Cpk8kA,1408
3
- crystalwindow/animation.py,sha256=zHjrdBXQeyNaLAuaGPldJueX05OZ5j31YR8NizmR0uQ,427
4
- crystalwindow/assets.py,sha256=LR2ocZ0BUxz8qZqEtx1s-WvxwY60b2OmxlzGj_Hyrao,1022
5
- crystalwindow/collision.py,sha256=hpkHTp_KparghVK-itp_rxuYdd2GbQMxICHlUBv0rSw,472
6
- crystalwindow/draw_helpers.py,sha256=HqjI5fTbdnA55g4LKYEuMUdIjrWaBm2U8RmeUXjcQGw,821
7
- crystalwindow/draw_rects.py,sha256=TT9CA9aSkLXq6VtApkuHEGtRHjazXj_ph2cXCwEYJQQ,1945
8
- crystalwindow/draw_text_helper.py,sha256=CGF2Kk39IxggzY5w-iDA4XzRwxiMDLH0LMBKIQQOO4s,1276
9
- crystalwindow/fun_helpers.py,sha256=fo5yTwGENltdtVIVwgITtUkvzpsImujOcqTxe8XPzR8,760
10
- crystalwindow/gravity.py,sha256=tMctHYubpcUJRogz4kNg3XZGDPE3605zON-4YumiVGo,2752
11
- crystalwindow/gui.py,sha256=ApsavaunPEKufJFIXO1vEDsJpLqUSkMoqSajYAH1swU,2101
12
- crystalwindow/gui_ext.py,sha256=_91W9amoum0fJ8iHTdOoD8L5bS7n-4XBs-9J5HUb5dA,2274
13
- crystalwindow/player.py,sha256=4wpIdUZLTlRXV8fDRQ11yVJRbx_cv8Ekpn2y7pQGgAQ,3442
14
- crystalwindow/sprites.py,sha256=wH2AzOpCdaFX63JrW2mplKt3B3jnJdLG5maqgcWlR5w,901
15
- crystalwindow/tilemap.py,sha256=PHoKL1eWuNeHIf0w-Jh5MGdQGEgklVsxqqJOS-GNMKI,322
16
- crystalwindow/window.py,sha256=mnkVlKj1E7rsWqNHJknUMrPBq8rs3mgEXyOkdH3lgX4,17827
17
- crystalwindow-1.4.8.dist-info/METADATA,sha256=xMYs4R5hGlQEkvG3Bm-g-g0MLjBAtJtCeyfjxGulCJQ,556
18
- crystalwindow-1.4.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- crystalwindow-1.4.8.dist-info/top_level.txt,sha256=PeQSld4b19XWT-zvbYkvE2Xg8sakIMbDzSzSdOSRN8o,14
20
- crystalwindow-1.4.8.dist-info/RECORD,,