def __init__(self, master, controller): tk.Frame.__init__(self, master) header = widgets.createLabel(self, text="Sign in to LiChess", font="times", fontsize=14, fontweight="bold") header.pack(padx=10, pady=10) """ username/password entries usernameLabel = widgets.createLabel(self, text="Username", font="times", fontsize=11, fontweight="normal") usernameLabel.pack() usernameEntry = widgets.createEntry(self, bgcolor="beige") usernameEntry.pack() passwordLabel = widgets.createLabel(self, text="Password", font="times", fontsize=11, fontweight="normal") passwordLabel.pack() passwordEntry = widgets.createEntry(self, bgcolor="beige", show="*") passwordEntry.pack() """ """ buttons """ loginButton = widgets.createButton(self, function=lambda: self.submit(controller=controller, username=app_username), text="Login as "+app_username, bgcolor="seashell3") loginButton.pack(pady=4) returnButton = widgets.createButton(self, function=lambda: controller.show_frame(StartupPage), text="Return", bgcolor="seashell3") returnButton.pack(pady=7)
def __init__(self, master, controller): tk.Frame.__init__(self, master) header = widgets.createLabel(self, text="Search Opponent Name", font="times", fontsize=14, fontweight="bold") header.pack(padx=10, pady=10) # name input and search button usernameEntry = widgets.createEntry(self, bgcolor="beige") usernameEntry.pack(pady=10) challengeButton = widgets.createButton( self, function=lambda: self.challenge(controller, usernameEntry.get()), text="Challenge", bgcolor="sky blue") challengeButton.pack(pady=10) # return to main menu returnButton = widgets.createButton( self, function=lambda: controller.show_frame(MainMenuPage), text="Return to Main Menu", bgcolor="sky blue") returnButton.pack(pady=10)
def welcomeHeader(self, username): header = widgets.createLabel(self, text="Welcome to MagiChess, " + username, font="times", fontsize=14, fontweight="bold") header.pack(padx=10, pady=10)
def __init__(self, master, controller): tk.Frame.__init__(self, master) header = widgets.createLabel(self, text="Challenge has been declined or timed out (10s)", font="times", fontsize=14, fontweight="bold") header.pack(padx=10, pady=10) returnButton = widgets.createButton(self, function=lambda: controller.show_frame(ChallengePage), text="Return", bgcolor="sky blue") returnButton.pack(pady=10)
def __init__(self, master, controller): tk.Frame.__init__(self, master) header = widgets.createLabel(self, text="Seeking Opponent...", font="times", fontsize=14, fontweight="bold") header.pack(padx=10, pady=10) #return to main menu returnButton = widgets.createButton(self, function=lambda: controller.show_frame(MainMenuPage), text="Return to Main Menu", bgcolor="sky blue") returnButton.pack()
def __init__(self, master, controller): tk.Frame.__init__(self, master) header = widgets.createLabel(self, text="MagiChess", font="times", fontsize=25, fontweight="bold") header.pack(padx=10, pady=10) #startup buttons signinButton = widgets.createButton(self, function=lambda: controller.show_frame(SigninPage), text="Sign in to LiChess.org", bgcolor="sky blue") signinButton.pack(pady=10) exitButton = widgets.createButton(self, function=quit_program, text="Exit", bgcolor="seashell3") exitButton.pack()
def __init__(self, master, controller): tk.Frame.__init__(self, master) header = widgets.createLabel(self, text="Want to replay a game? Input the Game ID", font="times", fontsize=14, fontweight="bold") header.pack(padx=10, pady=10) # game id entry box idEntry = keyboard.KeyboardEntry(self) idEntry.pack(pady=10) widgets.createButton(self, function=lambda: self.replay(controller, idEntry.get()), text="Replay with Gameid", bgcolor="sky blue").pack(pady=10) widgets.createButton(self, function=lambda: controller.show_frame(PreviousGamesPage), text="View your previous games", bgcolor="sky blue").pack(pady=10) returnButton = widgets.createButton(self, function=lambda: controller.show_frame(MainMenuPage), text="Return", bgcolor="sky blue") returnButton.pack(pady=10)
def __init__(self, master, controller): tk.Frame.__init__(self, master) header = widgets.createLabel(self, text="Search Opponent Name", font="times", fontsize=14, fontweight="bold") header.pack(padx=10, pady=10) # name input usernameEntry = keyboard.KeyboardEntry(self) usernameEntry.pack(pady=10) # provide options for starting color userColor = tk.StringVar(value="1") widgets.createRadioButton(self, "Random", userColor, "random").pack() widgets.createRadioButton(self, "White", userColor, "white").pack() widgets.createRadioButton(self, "Black", userColor, "black").pack() # challenge button challengeButton = widgets.createButton(self, function=lambda: self.challenge(controller, userColor.get(), usernameEntry.get()), text="Challenge", bgcolor="sky blue") challengeButton.pack(pady=10) # return to main menu returnButton = widgets.createButton(self, function=lambda: controller.show_frame(MainMenuPage), text="Return to Main Menu", bgcolor="sky blue") returnButton.pack(pady=10)