-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpygameTesting.py
More file actions
60 lines (46 loc) · 2 KB
/
pygameTesting.py
File metadata and controls
60 lines (46 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from os import environ
import pygame
import UI
import Color
environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1'
pygame.init()
# screen = pygame.display.set_mode((1280, 720))
screen = pygame.display.set_mode((1280, 720), flags=0)
pygame.display.set_caption('PyGame Tester')
UI.screenColor = Color.BLACK
clock = pygame.time.Clock()
pygame.key.set_repeat(750, 50)
def test_screen():
run = True
screen_center = screen.get_rect().center
textList = ['Testing String', 'I', 'HOPE', 'this', 'WoRkS']
label = UI.Label([screen_center[0], screen_center[1]-75], 'Testing String', Color.WHITE, 16,
bold=True, italic=True, textBackgroundColor=Color.BLUE, textBackgroundRounded=5, margin=[25,10]),
input = UI.InputField([screen_center[0], screen_center[1]-225], 'Coach Name', Color.WHITE, 24, Color.WHITE, 16,
bold=True, italic=True, placeHolderText='Name Here', inputBackgroundColor=Color.DIMGRAY,
inputBackgroundRounded=5, inputMargin=[25,10], inputWidth=[250,30], inputBackgroundWidth=2, labelAlign='left'),
# label2 = UI.Label(screen_center, '-10000', Color.WHITE, 16)
group = pygame.sprite.Group(
# input,
# UI.Table([screen_center[0], screen_center[1]+75], textList, Color.WHITE, 32, 'Arial', bold=True),
UI.Slider(screen_center, [300, 5], 7.5, [-100, 100]),
UI.Slider([screen_center[0]-175, screen_center[1]+75], [300, 5], 7.5, ['ooga booga', 'tiny tim']),
UI.Slider([screen_center[0]+175, screen_center[1]+75], [300, 5], 7.5, ['10', 20]),
# label2,
# UI.Switch(screen_center, 100, 50)
)
while run:
clock.tick(60)
event_list = pygame.event.get()
for event in event_list:
if event.type == pygame.QUIT:
run = False
pygame.quit()
exit(0)
group.update(event_list)
screen.fill(UI.screenColor)
group.draw(screen)
pygame.display.flip()
return
test_screen()
pygame.quit()