So I'm writing this game in python with Tkinter. The game works by calling a function that changes the values of the text variables, and button variables. When the button is pushed that calls the function however, the screen does not redraw and call up the new variables and just displays the old text.
startGame()
win=Tkinter.Tk()
win.title("TREASURE QUEST!!")
Textlabel=Tkinter.Label\
(win,text = text1,font=('Times New Roman',12),wraplength=600,)
Textlabel.pack()
Row2=Tkinter.Frame(win)
Btn1=Tkinter.Button\
(Row2, text=button1Name, command= button1(),font=('Times New Roman',12))
Btn2=Tkinter.Button\
(Row2, text=button2Name, command= button2(), font=('Times New Roman',12))
Btn1.pack(side='left')
Btn2.pack(side='left')
Row2.pack()
win.mainloop()
def startGame():
global text1,button1,button1Name,button2,button2Name
##adds name
##button that calls StoryCard
text1="Welcome to Treasure Quest!! The Game that allows you to pick your own destiny! Treasure quest is a very simple game. The story will display on the screen until it reaches an event. At each event you will be shown two choices. Each decision may cause you to leave with more treasure or to die a horrible death... Still like any true or false question on a final exam, you only have a 50/50 chance of ruining your entire life if you do not know! Now that you know how to play, please click the button below to start the game!"
button1=introCard
button1Name="Play"
button2=kill
button2Name="Quit"