#
# Basic Sample
#
from guizero import App, Text, Picture
from guizero import system_config

app = App(title="Hello World")
app.bg = (251, 251, 208)
message = Text(app, text="Deal with\nconfinement")
message.text_size = 50
message.font = "Courier"

print(system_config.supported_image_types)

maze = Picture(app, image='./confinement.jpg')
(width, height) = (maze.width // 6, maze.height // 6)
maze = maze.resize(width=width, height=height)

app.display()
예제 #2
0
파일: gui.py 프로젝트: parentda/STARS
        third_message3 = Text(window3, "Please select a ball speed:", size=15, font="Times New Roman", color="black")
        speed = Slider(window3, command=STARS_aPP.ball_speed_slider, start=1, end=5)
        speed.width = 300
                
        start_3 = PushButton(window3, command=STARS_aPP.start_command, args = [STARS_aPP.ballSpeed , STARS_aPP.difficulty, STARS_aPP.drillType], text="Begin")
        stop_3 = PushButton(window3, command=STARS_aPP.stop_command, text="stop")
        start_3.width = 30
        start_3.bg = "gray"
        stop_3.width = 30
        stop_3.bg = "gray"
    
##_____Code that gets run:__________##
#help(STEREOMAINFILE_Server)
app = App(title="S.T.A.R.S. User Interface")

welcome_message = Text(app, "Welcome to S.T.A.R.S.", size=20, font="Times New Roman", color="red")
second_message = Text(app, "Let's play some soccer!", size=13, font="Times New Roman", color="darkgreen")
logo = Picture(app, image="logo.gif", align = "left")
logo.resize(200,200)

drill_1 = PushButton(app, command=STARS_aPP.staticDrill, text="Static Passing")
drill_1.width = 30
drill_2 = PushButton(app, command=STARS_aPP.predictiveDrill, text="Predictive Passing")
drill_2.width = 30
drill_3 = PushButton(app, command=STARS_aPP.manualDrill, text="Manual Mode")
drill_3.width = 30

app.display()


예제 #3
0
from guizero import App, Text, TextBox, PushButton, Slider, Picture


def say_my_name():
    welcome_message.value = my_name.value


def change_text_size(slider_value):
    welcome_message.size = slider_value


app = App(title="Hello world", width=480, height=320)

#welcome_message = Text(app, text="Welcome to my app", size=40, font="Times New Roman", color="lightblue")
my_name = TextBox(app)
update_text = PushButton(app, command=say_my_name, text="Display my name")
text_size = Slider(app, command=change_text_size, start=10, end=80)
my_cat = Picture(app, image="image.jpg")
my_cat.resize(my_cat.width // 5, my_cat.height // 5)

app.display()
예제 #4
0
    else:
        GPIO.output(40, GPIO.HIGH)
        start_1["text"] = "Pause"


app = App(title="S.T.A.R.S. User Interface")

welcome_message = Text(app,
                       "Welcome to S.T.A.R.S.",
                       size=20,
                       font="Times New Roman",
                       color="red")
second_message = Text(app,
                      "Let's play some soccer!",
                      size=13,
                      font="Times New Roman",
                      color="darkgreen")
logo = Picture(app, image="logo.gif", align="left")
logo.resize(50, 45)

drill_1 = PushButton(app, command=drill_1_selection, text="Target Drill")
drill_1.width = 30
drill_2 = PushButton(app, command=drill_2_selection, text="Static Passing")
drill_2.width = 30
drill_3 = PushButton(app, command=drill_3_selection, text="Keeper Practice")
drill_3.width = 30
drill_4 = PushButton(app, command=drill_4_selection, text="Predictive Passing")
drill_4.width = 30

app.display()