import tkinter as tk
a = 0
r = 0
ana_ekran_1 = tk.Tk()
ana_ekran_1.withdraw()
ana_ekran_0 = tk.Tk()
ana_ekran_0.deiconify()
ana_ekran_0.title("Name?")
ana_ekran_0.configure(bg="black")
ana_ekran_0.geometry("220x18")
def on_entry_change(event):
isim = giriş.get()
g_i.set("Welcome\n" + isim)
ana_ekran_0.withdraw()
ana_ekran_1.deiconify()
giriş = tk.Entry(ana_ekran_0,width=36)
giriş.pack()
g_i = tk.StringVar()
label = tk.Label(ana_ekran_0, textvariable=g_i)
label.pack()
giriş.bind("<Return>", on_entry_change)
ana_ekran_0.mainloop()
def easter_egg_opened():
print("hello world")
def enter_counter(event):
global r
if r < 3:
r += 1
def key_counter(event):
global a
if r == 3 and a < 2:
a += 1
onay_c = tk.Tk()
onay_c.title("...-- / . -. - . .-. / ..--- / .-")
onay_c.withdraw()
while r<3:
ana_ekran_1.bind("<Return>", enter_counter)
while a<2:
ana_ekran_1.bind("<Key-a>", key_counter)
v = 0
while v == 0:
if a==3 and r==2:
easter_egg_opened.
ana_ekran_1.configure(bg="black")
ana_ekran_1.title("Game")
yazı = tk.Label(ana_ekran_1, textvariable=g_i, font=("Bahnschrift SemiLight SemiConde", 55), fg="white", bg="black",
anchor="center")
yazı.place(x=680, y=50)
def exit():
ana_ekran_1.quit()
onay_c.quit()
def op_c():
onay_c.geometry("500x500")
onay_c.configure(bg="black")
onay_c.mainloop()
def s1():
s = 1
def s0():
s = 0
çıkış = tk.Button(ana_ekran_1, text="Exit", command=op_c, height=1, width=4, bg="black", relief="flat")
çıkış["font"] = ("Bahnschrift SemiLight SemiConde", 18)
çıkış["fg"] = ("white")
çıkış.place(x=5, y=0)
b = tk.Button(ana_ekran_1, text="...", command=s1, height=3, width=65, bg="black", relief="flat")
b["font"] = ("Bahnschrift SemiLight SemiConde", 40)
b["fg"] = ("white")
b.place(x=0, y=425)
y = tk.Button(ana_ekran_1, text="Who are you?", command=s0, height=3, width=65, bg="black", relief="flat")
y["font"] = ("Bahnschrift SemiLight SemiConde", 40)
y["fg"] = ("white")
y.place(x=0, y=650)
ana_ekran_1.attributes("-fullscreen", 1)
ana_ekran_1.mainloop()