added color changes to gui
parent
4d75aad55b
commit
8ba15743a3
13
client.py
13
client.py
|
@ -62,9 +62,22 @@ def retrieve_input():
|
||||||
|
|
||||||
|
|
||||||
def update_gui(numDrinks, timeLeft):
|
def update_gui(numDrinks, timeLeft):
|
||||||
|
if numDrinks <= 0:
|
||||||
|
change_red()
|
||||||
|
elif numDrinks == 1:
|
||||||
|
change_yellow()
|
||||||
|
else:
|
||||||
|
change_green()
|
||||||
v.set(numDrinks)
|
v.set(numDrinks)
|
||||||
v1.set(timeLeft)
|
v1.set(timeLeft)
|
||||||
|
|
||||||
|
def change_red():
|
||||||
|
root.configure(background="red")
|
||||||
|
def change_yellow():
|
||||||
|
root.configure(background="yellow")
|
||||||
|
def change_green():
|
||||||
|
root.configure(background="green")
|
||||||
|
|
||||||
def checkpoint(message):
|
def checkpoint(message):
|
||||||
"""Prints [Checkpoint] <message>
|
"""Prints [Checkpoint] <message>
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue