preview_txt = Text(app, text="Preview On/Off", color="blue", width=20, grid=[4,6], align="left") preview_ontxt = PushButton(app, command=preview_on, width=5, text="On", grid=[4,7], align="right") preview_ontxt = PushButton(app, command=preview_on, width=5, text="On", grid=[4,7], align="right") preview_ontxt.text_color="blue" preview_offtxt = PushButton(app, command=preview_off, width=5, text="Off", grid=[4,7], align="left") preview_offtxt.text_color="blue" preview_offtxt.bg="pink" pad_txt = Text(app, text=" ", grid=[0,10], align="left") preview_txt = Text(app, text="Preview", width=10, color="blue", grid=[1,11], align="left") res_record= Combo(app, command=record_res, options=["V1-photo", "V2-photo", "HQ-photo", "1080p", "720p", "576p", "480p"], width=6, grid=[1,12], align="left") # sets video resolution res_record.text_color="blue" current_res = Text(app, text="2592x1944", width=10, color="green", grid=[1,13], align="left") zoom_txt = Text(app, text="Zoom", width=10, color="blue", grid=[2,11], align="left") set_zoom = Combo(app, command=zoom_set, options=["Zoom-0", "Zoom-1", "Zoom-2"], width=6, grid=[2,12], align="left") # sets zoom level set_zoom.text_color="blue" current_zoom = Text(app, text="Zoom-0", color="green", width=10, grid=[2,13], align="left") rotate_txt = Text(app, text="Rotation ", color="blue", width=10, grid=[3,11], align="left") rotation_set = Combo(app, command=camera_rotation, options=["180", "90", "0"], width=6, grid=[3,12], align="left") rotation_set.text_color="blue" current_rotation = Text(app, text=str(camera.rotation), width=10, color="green",grid=[3,13], align="left") effects_txt = Text(app, text="Effects", width=12, color="blue", grid=[4,11], align="left") effect_set = Combo(app, command=set_effects, options=["none", "negative", "solarize", "sketch", "denoise", "emboss", "oilpaint", "hatch", "gpen", "pastel", "watercolor", "film", "blur", "saturation", "colorswap", "washedout", "posterise", "colorpoint", "cartoon", "deinterlace1", "deinterlace2"], width=10, grid=[4,12], align="left") effect_set.text_color="blue"
right = PushButton(self.window4,command=self.right_curve,args=[],text="Right",grid=[2,6]) exit = PushButton(self.window4, command=self.close_test, args=[self.window4], image="include/images/stopbut.png",grid=[1,7]) exit.bg = "#e9002a" ##_____Code that gets run:__________## # help(STEREOMAINFILE_Server) app = App(title="S.T.A.R.S. User Interface", layout="grid", height=280, width=480, bg="#424242",visible=True) # MainBox = Box(app,grid=[0,0]) welcome_message = Text(app, "Welcome to S.T.A.R.S.", size=20, font="Calibri Bold", color="red", grid=[1,0,2,1]) player_sel = Combo(app,options=["Player1","Player2","Player3","Player4","Player5"],command=gui_app().player_selection,grid=[1,1,2,1]) player_sel.bg = "#424242" player_sel.text_color = "white" player_sel.text_size=14 Box(app,width=10,height=5,grid=[0,0]) # second_message = Text(app, "Please select a drill: ", size=14, font="Calibri Bold", color="green",grid=[1,1,2,1]) # logo = Picture(app, image="include/images/logo.png", align="left", grid=[0,0]) # logo.resize(75, 75) # logoright = Picture(app, image="include/images/logo.png", align="left", grid=[3,0]) # logoright.resize(75, 75) button_width = 17 print('looping') drill_1 = PushButton(app, command=gui_app().staticDrill, args=[app] ,text="Basic Tracking", grid=[1,2],width=17) drill_1.width = button_width drill_1.font="Calibri Bold" drill_1.bg="#006868" drill_1.text_color="white" drill_1.text_size = 14
check = CheckBox(a, "check me") combo = Combo(a, ["red", "blue"]) button = PushButton(a) slider = Slider(a) b = Box(a) textbox = TextBox(b, text="or colours") bgroup = ButtonGroup(b, ["cheese", "ham", "salad"], 1) #a.bg = (255,255,0) text.text_color = "red" text.text_size = 30 text.font = "verdana" #text.bg = "green" check.bg = "#d41789" combo.bg = "blue" combo.text_color = None combo.text_size = 24 #button.bg = "black" button.text_color = (255, 0, 255) button.font = "arial" button.text_size = 18 slider.bg = (123, 234, 12) #textbox.bg = "cyan" textbox.font = "courier" textbox.text_color = "#FF0000" b.bg = "cyan" b.font = "wingdings" #bgroup.bg = "yellow" bgroup.text_color = "#e62112" bgroup.text_color = None bgroup.font = "book antiqua"
from guizero import App, ButtonGroup, CheckBox, Combo, PushButton, Slider, Text, TextBox a = App(title="colors") text = Text(a, text="colors") check = CheckBox(a, "check me") combo = Combo(a, ["red", "blue"]) button = PushButton(a) slider = Slider(a) textbox = TextBox(a, text="or colours") a.bg = "pink" text.text_size = 30 text.font = "verdana" check.bg = "red" combo.bg = "blue" combo.text_color = "green" combo.text_size = 24 button.bg = "black" button.text_color = "white" button.font = "arial" button.text_size = 18 slider.bg = "yellow" textbox.bg = "cyan" textbox.font = "courier" textbox.text_color = "purple" a.display()
box_progress = Box(app, grid=[0, 4], width=500, height=160, layout='grid') #box_progress.set_border(2,'black') instructions = Text(box_progress, text="Choose an image for your SD card", enabled=False, grid=[0, 0, 2, 1], color="white", size=20) image_selecter = Combo( box_progress, options=["Stretch Empty", "Stretch Full", "Stretch Lite"], enabled=False, command=selection, grid=[0, 1], selected="Stretch Empty") image_selecter.text_color = "white" image_selecter.text_size = 18 help_button = PushButton(box_progress, grid=[1, 1], command=help_show, text="Need help choosing?") help_button.text_color = "white" help_button.size = 16 help_window = Window(app, height=350, width=700, title="Help", bg="#c51a4a") help_window.hide() help_text1 = Text(help_window, text=stretch_full_info) help_text1.size = 12 help_text1.text_color = "white" help_text2 = Text(help_window, text=stretch_empty_info) help_text2.size = 12
longexpslide = Slider(app, start=0, end=10, width=400) longexpteller = Text(app, text="long exposure slider") record = PushButton(app, command=record, text="record") StopRecording = PushButton(app, command=stoprecording, text="stop recording") sizes = Combo(app, options=["normal 1080p", "instagram size", "vga"], command=sizes) effects = Combo(app, options=["none", "filter1", "filter2"], command=effects) effects.text_color = "Blue" effects.font = "Helvetica" effects.text_size = "20" effects.bg = "Yellow" isochanger = Slider(app, command=isochange, start=0, end=800, width=1500) isoteller = Text( app, text="Iso speed (Note:Leave on 0 for automatic!)", ) shutterspeed = Slider(app,