Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,25 @@ def plot_graph(self):
canvas.get_tk_widget().grid(row=1, column=2)

def main_menu(self):
self.clear()
self.window.after(100, self.display_results)

def display_results(self):
self.clear() # Clear the window

# Create and display the results label
results_label = Label(self.window, text=self.wpm + " " + self.accuracy, font=("roboto", 50, "bold"), background="gray25", fg="#ebc934")
results_label.grid(row=1, column=0)

# Create and display the restart button
restart_button = Button(self.window, text="Restart", font=("roboto", 30), background="gray25", command=self.restart, highlightbackground="gray25", fg="#ebc934")
restart_button.grid(row=2, column=0)

# Create and display the mode button
mode_button = Button(self.window, text="Mode", font=("roboto", 30), highlightbackground="gray25", fg="#ebc934", background="gray25", bg="gray25", command=self.modes)
mode_button.grid(row=2, column=2)

self.plot_graph()
# Plot the graph
self.plot_graph()

def key_press(self, event):
if not self.write_able:
Expand Down