Skip to content

Commit 7620f69

Browse files
committed
1.00
1 parent 2aac864 commit 7620f69

File tree

7 files changed

+33
-18
lines changed

7 files changed

+33
-18
lines changed

mctoast.code-workspace

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44
"path": "."
55
}
66
],
7-
"settings": {}
7+
"settings": {
8+
"marscode.codeCompletionPro": {
9+
"enableCodeCompletionPro": true
10+
},
11+
"marscode.enableInlineCommand": true
12+
}
813
}

mctoast.py renamed to mctoast/__init__.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,10 @@ def __init__(self, master=None, data_pool=None):
6262
self.root.attributes("-topmost", "true")
6363
self.root.attributes("-transparentcolor", "#EEEEEE")
6464
self.set_no_focus()
65-
self.set_no_focus()
6665
self.root.resizable(False, False)
6766
self.canvas = tk.Canvas(self.root, width=320, height=320, bg="#EEEEEE", highlightthickness=0)
6867
self.canvas.place(x=0,y=0)
6968

70-
def set_no_focus(self):
71-
"""设置窗口为无焦点窗口并穿透鼠标点击"""
72-
import ctypes
73-
if os.name == 'nt': # Windows
74-
GWL_EXSTYLE = -20
75-
WS_EX_NOACTIVATE = 0x08000000
76-
WS_EX_TRANSPARENT = 0x00000020
77-
WS_EX_LAYERED = 0x00080000
78-
hwnd = ctypes.windll.user32.GetParent(self.root.winfo_id())
79-
style = ctypes.windll.user32.GetWindowLongW(hwnd, GWL_EXSTYLE)
80-
style = style | WS_EX_NOACTIVATE | WS_EX_TRANSPARENT | WS_EX_LAYERED
81-
ctypes.windll.user32.SetWindowLongW(hwnd, GWL_EXSTYLE, style)
82-
ctypes.windll.user32.SetLayeredWindowAttributes(hwnd, 0, 255, 0x00000002)
83-
elif os.name == 'posix': # Linux
84-
self.root.wm_attributes('-type', 'splash')
85-
8669
def main(self):
8770
tk.mainloop()
8871

pyproject.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "mctoast"
7+
version = "1.00"
8+
authors = [
9+
{ name="SystemFileB"},
10+
]
11+
description = "把Minecraft的Toast带到现实!"
12+
readme = "README.md"
13+
requires-python = ">=3.6"
14+
classifiers = [
15+
"Programming Language :: Python :: 3",
16+
"License :: LGPLv3",
17+
]
18+
19+
[project.urls]
20+
Homepage = "https://github.com/SystemFileB/mctoast"
21+
Documentation = "https://github.com/SystemFileB/mctoast"
22+
Bug Tracker = "https://github.com/SystemFileB/mctoast/issues"
23+
24+
[project.optional-dependencies]
25+
dev = [
26+
"pillow"
27+
]

0 commit comments

Comments
 (0)