-
Notifications
You must be signed in to change notification settings - Fork 0
/
Player_One_up.py
70 lines (53 loc) · 2.08 KB
/
Player_One_up.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
67
68
69
70
from tkinter import *
from tkinter.font import BOLD
import game_controll
#-----------------------------------------------
def Map_Button(jezik,p1color,p2color,p1_up,p1_down,p2_up,p2_down):
#-----------------------------------------------
def start_new_game(event):
if (event.keysym != p1_down and event.keysym != p2_up and event.keysym != p2_down):
p1_up = event.keysym
else: p1_up = pokret
menu_controll.destroy()
game_controll.Menu_controll(jezik,p1color,p2color,p1_up,p1_down,p2_up,p2_down)
def chosen_language(jezik):
if jezik == "serbian":
main_text = "Mico klikni dugme za gore!"
copyright_text = "Igricu napravio Velicki"
elif jezik == "english":
main_text = "Mica press button for up"
copyright_text = "copyright by Velicki"
return (main_text,copyright_text)
def windows_configuration():
menu_controll.geometry("600x600")
menu_controll.title(chosen_language(jezik)[0])
menu_controll.resizable(False, False)
icon = PhotoImage(file="Icon.png")
menu_controll.iconphoto(True, icon)
menu_controll.config(bg="black")
def naslov():
naslov = Label(menu_controll,
text=chosen_language(jezik)[0],
font=("Arial", 20, BOLD),
fg="red",
bg="black",
activeforeground="red",
activebackground="black",
relief=RAISED,
bd=10)
return naslov
def copyright():
copyright = Label(menu_controll,
text=chosen_language(jezik)[1],
font=("Arial", 10),
fg="red",
bg="black")
return copyright
#-----------------------------------------------
menu_controll = Tk ()
pokret = p1_up
windows_configuration()
menu_controll.bind("<Key>",start_new_game)
#-----------------------------------------------
naslov().pack(pady=150)
copyright().pack(side="bottom")