Вот мой код:
root = tkinter.Tk()
canvas = tkinter.Canvas(root, width=960, height=720)
image = ImageTk.PhotoImage(Image.open('TitleScreen.png'))
canvas.create_image(0, 0, anchor=tkinter.NW, image=image)
canvas.create_text(485, 375, font=("Times", 25, 'bold'),
text='You live in Valencia, Venezuela. You have 2 kids, and a '
'\n'
'significant other. You barely have enough money to take care '
'\n'
'of your family, food is running out, and electricity outages '
'\n'
'are a daily occurrence. Do you want to leave in search '
'\n'
'of a better life? [y/n]', fill='white')
y = Button(root, text='Y', command=buttonFunctionY, bg='black', bd=5, font=('Times', 20), activebackground='blue',
activeforeground='black', fg='black')
y.place(x=435, y=465)
n = Button(root, text='N', command=buttonFunctionN, bg='black', bd=5, font=('Times', 20), activebackground='blue',
activeforeground='black', fg='black')
n.place(x=485, y=465)
if option == 'y':
canvas.create_image(0, 0, anchor=tkinter.NW, image=image)
canvas.create_text(485, 375, font=("Times", 25, 'bold'),
text='Great, good decision. First should you prepare for the trip by buying supplies? [y/n]',
fill='white')
canvas.pack()
root.mainloop()
Моя основная проблема близка к концу, где я попытался создать условное выражение, основанное на том, нажата ли кнопка, но я понятия не имею, как это сделать.