-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHookStageWindow.py
147 lines (122 loc) · 36.3 KB
/
HookStageWindow.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import contextlib
from base64 import b64decode
from ctypes import windll
from io import BytesIO
from tkinter import Tk, Frame, Label, constants, PhotoImage
from _tkinter import TclError
from PIL import ImageTk, Image
from win32.lib.win32con import WS_EX_TOOLWINDOW, WS_EX_APPWINDOW, GWL_EXSTYLE
HOOK_ICO_BASE64 = 'iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAC2KSURBVHja7X15fFTV+ff3nHvv3JkkM2QhCUvCEooCAREoRFSKG4qKICDi1lRcXlsrtdJWrfxEhfp+RN9q1VarKLiAAipQQJGlbAqhaayyBhRBtiQESDKTZDIz997zvH/cczKBH4g1hIjk+/nM504yM3c55znP/jyHERFacPaCN/cNtKB50UIAZzlaCOAsRwsBnOVoIYCzHC0EcJajhQDOcujNfQM/dDDGvvXzCy+8sP47QggQERhjYIyBiOA4Tv17IQQ4P3rNFRYWNur+GuvHaSGARoKI6id9w4YNPyOirgCEfG0eMGDAfxhj0HUdlmWdlKBON1pEwClAQUFBUkFBwS+IqBOAMAB76NChbQD0KiwsvF0IUc8Jjn01N1oIoJEoKChIAjCaiHQAnDEmfvvb33aeP3/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yr/StPXkyZMb9unTp3nbtm3bIkRl4SmIH8F9EnESjlZI4rm6aWlplxo0aNBCoVCYSSQSC9SiIa2PqOxR0aPco0ePnpw5c2Zcdna2VlBHbB4YW+7Mk6k40Rnn/Jd4BxXvZGXBZdQkY7RYAvFJZ6IwBwySo546dWpdcAVNmzb1ZYZI4CKofnz48OGt/v37rz506NAcuUxeDZKq0WgQZFxYv379KWGSHcBjXAT7PqweynsIF2LKrAH0V96J/jxLobLgsmOyYexUx5oM6cWFUSsvVBUyYMiXX36JJ4e08fLy8kXjs0gkkhYVFeWtXLlyR0hISIBery+7cuXKjWnTpl0UHusKBo2ROkwVsVZS1uOA88YP07NoMnzmIwWeB5CXue/zgovvBsDYIE3gbSkJU+GkWLsjM4KQcC4sLMxl0KBBrTw9PVucOnUKYwAvJiYmomAaG+N4mephHeysFg37sGwzA/W1c7TPA35VwMXxMdASDwGCnmSDeZCoZN04iP9ZdoMNS0MZPpvsycamYh92YzDVA/9HcQeOwx5+jEwCI+HxGm4YJNW05Ol5rvm17VtVcHGCzIMAeFTXmgAFcOCXMpoR+7A6XlaXgPeYj8qmKEFKodeZ62YKIIKB187JvsideBFw8b0ADVWJzM8FwCw3hmNTXWximOCbIp/FLD3LRJiS6U/GDwgPy4REv5Xbi4LLLpqBDCBgkEC8A0BmmFjdF5Y8SwOxqh0AC2OEjAgSiuhjq2qj4Bt1E14WuM+6KKgGtDWBCEJz3R0BSNyAt1YiK3sHXzW4lT2Pd3K/v8F9hbf1fwGZ+W54TgHWPwAAAABJRU5ErkJggg=='
class HookStagesWindow:
def __init__(self):
self.start_abs_x, self.start_abs_y, self.start_width, self.start_height = None, None, None, None
self._root = Tk()
self._root.title('HookStagesWindow')
self._root.minsize(50, 300) # 设置窗口最小值
self._root.iconphoto(True, PhotoImage(data=b64decode(HOOK_ICO_BASE64)))
self._root.overrideredirect(True) # 设置隐藏窗口标题栏和任务栏图标
self._root.attributes('-topmost', True)
self._root.attributes('-transparentcolor', 'black')
self._root_x = int(self._root.winfo_screenwidth() * 0.01)
self._root_y = int(self._root.winfo_screenheight() * 0.4)
self._root_width = int(self._root.winfo_screenwidth() * 0.02)
self._root_height = int(self._root_width * 10)
# print(f'{self._root_x=}, {self._root_y=}, {self._root_width=}, {self._root_height=}')
self._root.geometry(f'{self._root_width}x{self._root_height}+{self._root_x}+{self._root_y}')
hook_img_width = self._root_width // 2
hook_img_height = hook_img_width * 4 // 3
self.hook_img = ImageTk.PhotoImage(
Image.open(BytesIO(b64decode(HOOK_IMG_BASE64))).resize((hook_img_width, hook_img_height)))
frame = Frame(self._root, bg='black')
frame.pack(side=constants.TOP, fill=constants.BOTH, expand=1)
self.hooks = [[Label(frame, background='black') for _ in range(2)] for _ in range(4)]
self.counter = [0, 0, 0, 0]
self.layout_hook()
self.post_label = Label(self._root, bg='#2980b9')
self.post_label.bind('<Button-1>', self._get_point)
self.post_label.bind("<B1-Motion>", self._motion_call)
self.size_label = [Label(self._root, bg='#27ae60'), Label(self._root, bg='#27ae60')]
self.size_label[0].bind("<B1-Motion>", self._zoom_call)
self.size_label[1].bind("<B1-Motion>", self._zoom_call)
self._root.bind('<FocusIn>', self._alt_press_call)
self._root.bind('<FocusOut>', self._alt_release_call)
self._root.bind('<ButtonPress-1>', self._start_drag)
def layout_hook(self):
for i in range(len(self.hooks)):
self.hooks[i][0].place(anchor=constants.W, relx=0, rely=(0.1 + 0.25 * i))
self.hooks[i][1].place(anchor=constants.W, relx=0.5, rely=(0.1 + 0.25 * i))
def _get_point(self, event):
"""获取当前窗口位置并保存"""
self._root_x, self._root_y = event.x, event.y
def _motion_call(self, event):
"""窗口移动事件"""
new_x = (event.x - self._root_x) + self._root.winfo_x()
new_y = (event.y - self._root_y) + self._root.winfo_y()
self._root.geometry(f'{self._root.winfo_width()}x{self._root.winfo_height()}+{new_x}+{new_y}')
def _start_drag(self, event):
self._root.update_idletasks()
self.start_abs_x = self._root.winfo_pointerx() - self._root.winfo_rootx()
self.start_abs_y = self._root.winfo_pointery() - self._root.winfo_rooty()
self.start_width = self._root.winfo_width()
self.start_height = self._root.winfo_height()
def _zoom_call(self, event):
self._root.update_idletasks()
end_abs_x = self._root.winfo_pointerx() - self._root.winfo_rootx()
end_abs_y = self._root.winfo_pointery() - self._root.winfo_rooty()
calc_w = self.start_width + (end_abs_x - self.start_abs_x)
calc_h = self.start_height + (end_abs_y - self.start_abs_y)
with contextlib.suppress(TclError):
self._root.geometry(f'{calc_w}x{calc_h}+{self._root.winfo_x()}+{self._root.winfo_y()}')
def _alt_press_call(self, event):
self._root.attributes('-transparentcolor', '')
self._root.attributes('-alpha', 0.5)
self.post_label.place(relwidth=1, height=10, relx=0, rely=0, anchor=constants.NW)
self.size_label[0].place(width=5, height=15, relx=1, rely=1, anchor=constants.SE)
self.size_label[1].place(width=15, height=5, relx=1, rely=1, anchor=constants.SE)
def _alt_release_call(self, event):
self._root.attributes('-transparentcolor', 'black')
self._root.attributes('-alpha', 1)
self.post_label.place_forget()
self.size_label[0].place_forget()
self.size_label[1].place_forget()
def reset_hook(self):
self.counter = [0, 0, 0, 0]
for l1, l2 in self.hooks:
l1.config(image=''), l2.config(image='')
def show_hook(self, n: int):
if self.counter[n] < 2:
# print(f"show player_{n} hook {self.counter[n]} to {self.counter[n] + 1}")
self.hooks[n][self.counter[n]].config(image=self.hook_img)
self.counter[n] += 1
def hide_hook(self, n: int):
if self.counter[n] > 0:
# print(f"hide player_{n} hook {self.counter[n]} to {self.counter[n] - 1}")
self.counter[n] -= 1
self.hooks[n][self.counter[n]].config(image='')
def _set_window(self):
"""
在任务栏上显示
"""
hwnd = windll.user32.GetParent(self._root.winfo_id())
style = windll.user32.GetWindowLongPtrW(hwnd, GWL_EXSTYLE)
style &= ~WS_EX_TOOLWINDOW
style |= WS_EX_APPWINDOW
res = windll.user32.SetWindowLongPtrW(hwnd, GWL_EXSTYLE, style)
# re-assert the new window style
self._root.withdraw()
self._root.after(10, self._root.deiconify)
def run(self):
self._root.after(10, self._set_window)
self._root.mainloop()
if __name__ == "__main__":
window = HookStagesWindow()
window.show_hook(0)
window.show_hook(0)
window.show_hook(1)
window.show_hook(1)
window.show_hook(2)
window.show_hook(2)
window.show_hook(3)
window.show_hook(3)
window.run()