Skip to content

Commit 7e586a2

Browse files
positioning
first widgets
1 parent 2d1f62b commit 7e586a2

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

Jogos/src/tela_inicial.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ def __init__(self):
99
self.window = window
1010
self.firstWindow()
1111
self.frameFirstWindow()
12+
self.buttonFirstWindow()
13+
self.labelFirstWindow()
1214
window.mainloop()
1315

1416
def firstWindow(self):
@@ -21,13 +23,36 @@ def firstWindow(self):
2123

2224
def frameFirstWindow(self):
2325
self.frame1 = Frame(self.window)
24-
self.frame1.place(relx=0, rely=0, relwidth=1, relheight=0.05)
26+
self.frame1.place(relx=0, rely=0, relwidth=1, relheight=0.07)
2527

2628
self.frame2 = Frame(self.window)
2729
self.frame2.place(relx=0.01, rely=0.06, relwidth=0.98, relheight=0.88)
2830

2931
self.frame3 = Frame(self.window)
3032
self.frame3.place(relx=0, rely=0.95, relwidth=1, relheight=0.05)
3133

34+
def buttonFirstWindow(self):
35+
self.btSnake = Button(self.frame2, text='Snake')
36+
self.btSnake.place(relx=0.03, rely=0.03, relwidth=0.45, relheight=0.45)
37+
38+
self.btCampoMinado = Button(self.frame2, text='Campo Minado')
39+
self.btCampoMinado.place(relx=0.52, rely=0.03, relwidth=0.45, relheight=0.45)
40+
41+
self.btCorrida = Button(self.frame2, text='Corrida')
42+
self.btCorrida.place(relx=0.03, rely=0.52, relwidth=0.45, relheight=0.45)
43+
44+
self.btForca = Button(self.frame2, text='Forca')
45+
self.btForca.place(relx=0.52, rely=0.52, relwidth=0.45, relheight=0.45)
46+
47+
def labelFirstWindow(self):
48+
self.lbLogo = Label(self.frame1, text='ebony', font='abnes')
49+
self.lbLogo.place(relx=0.01, rely=0.2)
50+
self.lbLogo1 = Label(self.frame1, text='sys', font='Debum 24')
51+
self.lbLogo1.place(relx=0.16, rely=0.00)
52+
53+
self.lbRodape = Label(self.frame3, text='@ebony.programador', font='ubuntu 12')
54+
self.lbRodape.place(relx=0.76, rely=0.1)
55+
56+
3257

3358
Aplication()

0 commit comments

Comments
 (0)