forked from uf-intro-to-computing/L1-Software-Modularity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.py
More file actions
25 lines (19 loc) · 615 Bytes
/
gui.py
File metadata and controls
25 lines (19 loc) · 615 Bytes
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
from unigui import UniGui
from unigui.widget import TextWidget
from unigui.pygamedisplay import PygameDisplay
from unigui.colorscheme import Solarized, VSCode
import time
WIDTH = 320
HEIGHT = 240
CS = VSCode.dark
# TODO: Here is where we need to create the object that represents our "display"
# This is the screen where we want our graphical user interface (GUI) to appear.
display =
gui = UniGui(WIDTH, HEIGHT, colorscheme=CS)
tw = TextWidget("tw", 0, 0, WIDTH, HEIGHT, colorscheme=CS)
tw.set_value("hello world!")
gui.add_widget(tw)
display.show(gui)
while True:
display.refresh()
time.sleep(0.2)