Skip to content

Commit

Permalink
Add label title and developer to GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
JmePaz committed Oct 4, 2022
1 parent ed55716 commit 2dce212
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions App.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ def __init__(self,title, w, h):
self.__load_app()

def select_file(self, canvas):
valid_file_formats = [("Valid img formats", ("*.jpg", "*.png"))]
def get_dir_file():
self.dir_file_name = filedialog.askopenfilename()
self.dir_file_name = filedialog.askopenfilename(title="Select a image", filetypes=valid_file_formats)
#set image
img = Image.open(self.dir_file_name)
#resizing the image
Expand Down Expand Up @@ -72,6 +73,10 @@ def __load_app(self):
#frame
self.frame_app = tk.Frame(self.window)
self.frame_app.pack()
#labels and title
tk.Label(self.frame_app, text="Shape Categorization Game based on Images", font=("Arial", 25)).pack(pady=10)
tk.Label(self.frame_app, text="Developed by James Paz", font=("Arial", 10)).pack()

#Image
canvas = tk.Canvas(self.frame_app, width= 400, height= 350, bg="gray")
canvas.pack(pady=20)
Expand All @@ -82,7 +87,9 @@ def __load_app(self):

# run a game
start_btn = tk.Button(self.frame_app, text="Start Game", height=3, width=23, bg="green", foreground="white", command=self.start_game)
start_btn.pack(pady=47)
start_btn.pack(pady=30)



def reload_app(self):
self.img_input = None
Expand Down
Binary file modified Classes/__pycache__/EventHandler.cpython-38.pyc
Binary file not shown.
Binary file modified DataSets/__pycache__/DetectObjects.cpython-38.pyc
Binary file not shown.
Binary file modified DataSets/__pycache__/DetectShapes.cpython-38.pyc
Binary file not shown.

0 comments on commit 2dce212

Please sign in to comment.