-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.py
71 lines (56 loc) · 1.73 KB
/
configure.py
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
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python3
import os, sys, time
import pygame
import pygame_textinput
class Prompt:
COLORS = {
"white": pygame.Color(255, 255, 255),
"black": pygame.Color(0, 0, 0),
"gray": pygame.Color(127, 127, 127)
}
def __init__(self):
fontdir = os.path.join(self.base_path, "data", "fonts")
pygame.init()
pygame_screen_res = (1280, 720)
self.fontsize = 24
self.font = pygame.font.Font(os.path.join(fontdir, 'Gotham-Medium.otf'), self.fontsize)
self.screen = pygame.display.set_mode(pygame_screen_res, 0)
self.screen.fill(Prompt.COLORS['black'])
pygame.display.flip()
self.textinput = pygame_textinput.TextInput()
@staticmethod
def get_wifi_networks():
return [
'ATT4QLN2h4'
'Adara Pool 2.4'
'Adara Pool 5'
'Apple Store'
'bells'
'cirrus'
'La Quinta Moore, OK'
'LCTV - FREEWIFI'
'pennygetyourownwifi'
'pennyisafreeloader - 5G'
'SouthwestWiFi'
'Verizon - MiFi6620L - 3A6D'
'Verizon - MiFi6620L - 950C'
'Verizon - MiFi7730L - 3992'
'viperdriver60'
'piper'
]
def main():
prompt = Prompt()
screen = prompt.screen
clock = pygame.time.Clock()
while True:
screen.fill(Prompt.Colors['black'])
events = pygame.event.get()
for event in events:
if event.type == pygame.QUIT:
exit()
prompt.textinput.update(events)
screen.blit(prompt.textinput.get_surface(), (10,10))
pygame.display.update()
clock.tick(30)
if __name__ == "__main__":
main()