-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.py
66 lines (49 loc) · 2.06 KB
/
Main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#importing questions
from tkinter.font import BOLD
import pandas as pd
t_data=pd.read_csv("Truth.csv")
t_q=list(t_data.iloc[:,1].values)
d_data=pd.read_csv("Dare.csv")
d_q=list(d_data.iloc[:,1].values)
import tkinter , Questions
win1=tkinter.Tk() #Handle
win1.geometry("1193x671") #Size of the window
class Truth():
def __init__(self):
self.win2 = tkinter.Tk()
self.win2.geometry('1800x540')
label = tkinter.Label(self.win2, text=(Questions.truth_question(t_q)), pady=250, padx=100, bg='#faeadd',fg='brown', font=("Helvetica", "30", "bold"))
label.pack(expand=True,fill=tkinter.X)
back = tkinter.Button(self.win2, text='Back',padx=100, pady=10, bg='white', command=self.quit)
back.place(x=620,y=490)
self.win2.mainloop()
def quit(self):
self.win2.destroy()
class Dare():
def __init__(self):
self.win2 = tkinter.Tk()
self.win2.geometry('1800x540')
label = tkinter.Label(self.win2, text=(Questions.dare_question(d_q)), pady=250, padx=100, bg='#faeadd', fg='brown', font=("Helvetica", "30", "bold"))
label.pack(expand=True,fill=tkinter.X)
back = tkinter.Button(self.win2, text='Click and Quit',padx=100,pady=10,bg='white',command=self.quit)
back.place(x=620,y=490)
self.win2.mainloop()
def quit(self):
self.win2.destroy()
#Main Screen Backgrounds
bg = tkinter.PhotoImage(file = "Back.png")
# Show image using label
background = tkinter.Label( win1, image = bg)
background.place(x =0, y = 0)
#Middle line
label1 = tkinter.Label(win1,pady=1000,bg="black")
label1.place(x=600)
label2 = tkinter.Label(win1, text="What Do You Pick?",bg="#faeadd", font=("Helvetica", "55", "bold"))
label2.place(x=210,y=160)
#Buttons
Truth = tkinter.Button(win1, text="Truth", command=Truth,pady=10,padx=70,bg="brown",font=("Helvetica", "20","bold"))
Truth.config(fg="white")
Truth.place(x=250,y=400)
Dare = tkinter.Button(win1, text="Dare" , command=Dare,pady=10,padx=70,bg="pink",font=("Helvetica", "20","bold"))
Dare.place(x=700,y=400)
win1.mainloop()