File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def __home_screen(self):
50
50
def __on_new_game (self ):
51
51
self .frame .destroy ()
52
52
self .frame = tk .Frame (self .window )
53
- Screens .sel_difficulty_scr (self .frame , self .__start_game )
53
+ Screens .sel_difficulty_scr (self .frame , self .__start_game , self . __home_screen )
54
54
55
55
def __on_continue (self ):
56
56
self .__start_game (is_continue = True )
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def button(text, command):
26
26
master .pack (fill = tk .NONE , expand = True )
27
27
28
28
@staticmethod
29
- def sel_difficulty_scr (master , on_select ):
29
+ def sel_difficulty_scr (master , on_select , on_back ):
30
30
def button (text , command ):
31
31
return tk .Button (master , text = text , command = command , width = 20 )
32
32
@@ -39,4 +39,9 @@ def button(text, command):
39
39
btn_h = button (DifficultyLevel .HARD .value , lambda : on_select (DifficultyLevel .HARD ))
40
40
btn_h .pack ()
41
41
42
+ tk .Frame (master , height = 10 ).pack ()
43
+
44
+ btn_back = button ("Повернутися до меню" , on_back )
45
+ btn_back .pack ()
46
+
42
47
master .pack (fill = tk .NONE , expand = True )
You can’t perform that action at this time.
0 commit comments