[AI] window

This commit is contained in:
Mikan
2026-03-09 22:33:31 +03:00
parent daf1c2a37b
commit 320f20b974
2 changed files with 9 additions and 33 deletions

View File

@@ -24,6 +24,9 @@ class OverlayWindow:
# Bind drag functionality
self.setup_drag()
# Bind right-click to show context menu for closing
self.root.bind("<Button-3>", self.show_context_menu)
# Update display periodically
self.update_display_periodically()
@@ -90,6 +93,12 @@ class OverlayWindow:
widget.bind("<Button-1>", start_move)
widget.bind("<B1-Motion>", do_move)
def show_context_menu(self, event):
"""Show context menu with close option"""
context_menu = tk.Menu(self.root, tearoff=0)
context_menu.add_command(label="Закрыть", command=self.root.quit)
context_menu.post(event.x_root, event.y_root)
def toggle_tracking(self):
"""Toggle tracking state"""
self.tracker.toggle_tracking()