Back map.py (temp)

main
none 1 year ago
parent 00c58c925d
commit 1b5a86b0a2

@ -10,15 +10,14 @@ root = tk.Tk()
canvas = tk.Canvas(root)
canvas.pack()
root.geometry("1024x800")
root.tk.call('wm', 'iconphoto', root._w, tk.PhotoImage(file='map.png'))
root.geometry("1280x720")
ttext = tk.Canvas(root, width=90, height=20, bg="black")
ttext.place(x=940, y=0)
ttext.place(x=1180, y=0)
text = ttext.create_text(40, 10, text="X: 1, Y: 1", fill="white")
while True:
x = root.winfo_pointerx() - root.winfo_rootx()
y = 800 - (root.winfo_pointery() - root.winfo_rooty())
y = 720 - (root.winfo_pointery() - root.winfo_rooty())
ttext.itemconfig(text, text=f"X: {x}, Y: {y}")
# Открываем URL как файл

Loading…
Cancel
Save