Skip to content

Commit c353c88

Browse files
committed
fix:限值鼠标时窗口未置顶。feat:等级机制施工中。close #69
1 parent d22a7e4 commit c353c88

File tree

8 files changed

+169
-90
lines changed

8 files changed

+169
-90
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
元扫雷正处于持续演进阶段,通常 **3~12 个月发布一个版本**
6868
欢迎提交 **Issue / PR / Star / Fork** ——您的参与将决定一个开源扫雷生态的未来走向。
6969

70-
### 参考连接
70+
71+
## 参考连接
7172

7273
+ 使用教程:[https://openms.top/#/guide/[80.%E6%95%99%E7%A8%8B.%E8%BD%AF%E4%BB%B6]%E5%85%83%E6%89%AB%E9%9B%B7%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B](https://openms.top/#/guide/[80.%E6%95%99%E7%A8%8B.%E8%BD%AF%E4%BB%B6]%E5%85%83%E6%89%AB%E9%9B%B7%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B)
7374
+ 算法工具箱地址:[https://github.com/eee555/ms_toollib](https://github.com/eee555/ms_toollib)
@@ -123,10 +124,10 @@
123124

124125
## 贡献
125126

126-
[CONTRIBUTING.md](https://github.com/eee555/Solvable-Minesweeper/blob/master/CONTRIBUTING.md)
127+
参见[CONTRIBUTING.md](https://github.com/eee555/Solvable-Minesweeper/blob/master/CONTRIBUTING.md)
127128

128129
# 协议须知
129-
项目使用了附带额外条款的GPLv3协议,尤其禁止了项目未经授权的商用行为,也规定了项目的收益分配方式。细节参见`LICENSE`
130+
项目使用了附带额外条款的GPLv3协议,尤其禁止了项目未经授权的商用行为,也规定了项目的收益分配方式。细节参见[LICENSE](LICENSE)
130131

131132
## 荣誉
132133
收录于Awesome Rust Repositories:

src/distribution.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# 初级、中级、高级的各个指标的概率分布
2+
# 测试代码如下
3+
# import ms_toollib as ms
4+
# from tqdm import tqdm
5+
# import random
6+
# cell6 = [0] * 500
7+
# cell7 = [0] * 500
8+
# cell8 = [0] * 500
9+
# bbbv = [0] * 500
10+
# op = [0] * 500
11+
# isl = [0] * 500
12+
# for i in tqdm(range(100000000)):
13+
# x0 = random.randint(0, 15)
14+
# y0 = random.randint(0, 29)
15+
# # 在第一行第一列起手,做标准埋雷
16+
# board = ms.laymine(row=16, column=30, mine_num=99, x0=x0, y0=y0)
17+
# # 包一下,准备计算属性
18+
# wrap_board = ms.Board(board)
19+
# cell6[wrap_board.cell6] += 1
20+
# cell7[wrap_board.cell7] += 1
21+
# cell8[wrap_board.cell8] += 1
22+
# bbbv[wrap_board.bbbv] += 1
23+
# op[wrap_board.op] += 1
24+
# isl[wrap_board.isl] += 1
25+
26+
# 初级一亿
27+
beg_cell6 = [99773219, 226147, 634, 0, 0, 0, 0, 0, 0, 0]
28+
beg_cell7 = [99994981, 5019, 0, 0, 0]
29+
beg_cell8 = [99999976, 24, 0, 0, 0]
30+
beg_bbbv = [0, 527, 5013, 25002, 87366, 236427, 525717, 1002604, 1690642, 2572050, 3581787, 4632911, 5631922, 6460689, 7078831, 7399474, 7473426, 7265536, 6879835, 6295132, 5637243, 4932996, 4214394, 3515960, 2926264, 2335118, 1860184, 1460787, 1125518, 863723, 628092, 470567, 365162, 241143, 171466, 136763, 86847, 54905, 45555, 30136, 17903, 11450, 6494, 8022, 3166, 625, 2420, 1164, 14, 809, 0, 46, 0, 0, 173, 0, 0, 0, 0, 0]
31+
beg_op = [173, 10198619, 34150391, 37478004, 15188937, 2754895, 221710, 7161, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
32+
beg_isl = [5356, 9673068, 25522493, 30311375, 21305455, 9604161, 2889363, 596494, 84230, 7643, 359, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
33+
34+
# 中级一亿
35+
int_cell6 = [96444950, 3433494, 117611, 3809, 129, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
36+
int_cell7 = [99833223, 166393, 383, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
37+
int_cell8 = [99996872, 3128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
38+
int_bbbv = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 6, 22, 35, 101, 153, 242, 517, 881, 1466, 2686, 4211, 6719, 10395, 15934, 23445, 34136, 48589, 68143, 93032, 126577, 166999, 218951, 280165, 356387, 442802, 545551, 663317, 793798, 940972, 1101042, 1275726, 1457750, 1647582, 1840653, 2039087, 2234564, 2431624, 2613364, 2779910, 2941253, 3078758, 3201065, 3290570, 3358109, 3406480, 3431112, 3423005, 3392995, 3339634, 3266803, 3170418, 3054329, 2931435, 2791318, 2640093, 2485138, 2321001, 2158033, 1994841, 1835411, 1675743, 1523577, 1376899, 1240162, 1110440, 989655, 876888, 773324, 678312, 592657, 514453, 446159, 383743, 328775, 281547, 239648, 203197, 171603, 144009, 120304, 100445, 83200, 69505, 56735, 46707, 38156, 30869, 25040, 20363, 16243, 13212, 10534, 8330, 6539, 5271, 4187, 3192, 2530, 1965, 1532, 1149, 864, 760, 513, 430, 296, 244, 196, 155, 86, 74, 60, 46, 34, 24, 19, 15, 12, 9, 6, 2, 3, 5, 0, 1, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
39+
int_op = [0, 15519, 212985, 1328960, 4797095, 11268019, 18343455, 21591549, 18973512, 12756767, 6686046, 2779686, 928019, 250892, 55451, 10301, 1519, 201, 23, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
40+
int_isl = [0, 44299, 374567, 1557483, 4208523, 8292267, 12707510, 15782151, 16368171, 14436209, 10977786, 7271883, 4229310, 2167101, 981494, 396797, 142113, 45400, 12775, 3282, 712, 135, 26, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
41+
42+
# 高级一亿
43+
exp_cell6 = [68632869, 25105158, 5295993, 840130, 111339, 12990, 1365, 146, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
44+
exp_cell7 = [97333396, 2617188, 48674, 730, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
45+
exp_cell8 = [99918485, 81456, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
46+
exp_bbbv = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 3, 2, 4, 5, 3, 9, 11, 16, 21, 36, 53, 58, 81, 104, 132, 164, 290, 338, 431, 572, 717, 1004, 1272, 1605, 2084, 2679, 3307, 4155, 5259, 6455, 8039, 9763, 12070, 14556, 17675, 21494, 25479, 30643, 36428, 42901, 51345, 60210, 70547, 82124, 94956, 109765, 126564, 144615, 165716, 188704, 213289, 239836, 272434, 303815, 339385, 378223, 419606, 462588, 508711, 556965, 608503, 664479, 719514, 778801, 841484, 903742, 966474, 1034033, 1100917, 1167548, 1234599, 1299151, 1369439, 1432876, 1499471, 1561069, 1622816, 1679411, 1734501, 1784631, 1834831, 1879712, 1915638, 1952136, 1983509, 2008977, 2025522, 2037393, 2050593, 2051870, 2051707, 2045268, 2028512, 2013404, 1989184, 1963247, 1930865, 1892518, 1855501, 1810653, 1762872, 1714554, 1660250, 1605851, 1547499, 1493286, 1432890, 1370858, 1309564, 1248527, 1188396, 1128186, 1068200, 1007218, 951870, 893987, 839048, 786785, 735047, 685965, 637867, 590769, 549261, 506468, 467019, 429681, 395074, 360746, 331439, 302833, 275966, 250586, 226401, 205885, 185596, 167348, 151085, 135238, 121984, 108781, 97222, 86353, 76838, 68221, 60163, 53679, 47034, 41439, 36084, 32107, 28134, 24195, 21284, 18548, 16179, 13818, 12094, 10396, 9095, 7962, 6730, 5702, 4907, 4107, 3568, 3106, 2555, 2191, 1868, 1568, 1358, 1104, 947, 813, 649, 545, 494, 378, 334, 259, 231, 210, 146, 128, 102, 72, 60, 71, 59, 33, 33, 25, 22, 19, 11, 12, 5, 10, 9, 4, 3, 1, 0, 1, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
47+
exp_op = [0, 0, 7, 151, 1735, 14575, 84477, 359184, 1191615, 3085632, 6394006, 10732455, 14794241, 16859075, 16034223, 12819964, 8661561, 4977703, 2438467, 1026046, 369092, 115044, 31617, 7324, 1490, 265, 40, 9, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
48+
exp_isl = [0, 21990, 162353, 625022, 1656000, 3406529, 5770634, 8330835, 10547442, 11919525, 12184313, 11386477, 9804874, 7837850, 5840179, 4081518, 2684994, 1664219, 975516, 544605, 287310, 144596, 68968, 31347, 13652, 5590, 2338, 851, 302, 111, 48, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
49+
50+
51+
52+
53+
54+
55+
56+
57+
58+
59+

src/main.py

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# from fbs_runtime.application_context.PyQt5 import ApplicationContext
21
import time
32
from PyQt5 import QtWidgets
4-
from PyQt5 import QtCore
3+
# from PyQt5 import QtCore
54
from PyQt5.QtWidgets import QApplication
65
from PyQt5.QtNetwork import QLocalSocket, QLocalServer
76
import sys
@@ -75,34 +74,6 @@ def on_ready_read(socket: QLocalSocket):
7574
socket.disconnectFromServer() # 断开连接
7675

7776

78-
def find_window(class_name, window_name):
79-
"""
80-
查找指定窗口的句柄。
81-
82-
83-
Args:
84-
class_name (str): 要查找的窗口的类名。
85-
window_name (str): 要查找的窗口的标题。
86-
87-
88-
Returns:
89-
int: 查找到的窗口的句柄。如果未找到窗口,则抛出异常。
90-
91-
92-
Raises:
93-
ctypes.WinError: 如果未找到指定窗口,则抛出此异常。
94-
95-
96-
"""
97-
user32 = ctypes.WinDLL("user32", use_last_error=True)
98-
user32.FindWindowW.argtypes = [wintypes.LPCWSTR, wintypes.LPCWSTR]
99-
user32.FindWindowW.restype = wintypes.HWND
100-
101-
hwnd = user32.FindWindowW(class_name, window_name)
102-
if not hwnd:
103-
raise ctypes.WinError(ctypes.get_last_error())
104-
return hwnd
105-
10677

10778
def cli_check_file(file_path: str) -> int:
10879
if not os.path.exists(file_path):
@@ -173,7 +144,7 @@ def cli_check_file(file_path: str) -> int:
173144
evf_evfs_files[ide] = (e, 1)
174145
continue
175146
evf_evfs_files[ide] = (e, 0)
176-
print(evf_evfs_files)
147+
# print(evf_evfs_files)
177148
return 0
178149

179150

@@ -216,22 +187,14 @@ def cli_check_file(file_path: str) -> int:
216187
ui.mainWindow.show()
217188
# ui.mainWindow.game_setting = ui.game_setting
218189

219-
_translate = QtCore.QCoreApplication.translate
220-
hwnd = find_window(None, _translate("MainWindow", "元扫雷"))
190+
# _translate = QtCore.QCoreApplication.translate
191+
hwnd = int(ui.mainWindow.winId())
221192

222193
SetWindowDisplayAffinity = ctypes.windll.user32.SetWindowDisplayAffinity
223-
ui.disable_screenshot = lambda: (
224-
... if SetWindowDisplayAffinity(hwnd, 0x00000011) else 1 / 0
225-
)
226-
ui.enable_screenshot = lambda: (
227-
... if SetWindowDisplayAffinity(hwnd, 0x00000000) else 1 / 0
228-
)
229-
ui.disable_screenshot = lambda: (
230-
... if SetWindowDisplayAffinity(hwnd, 0x00000011) else 1 / 0
231-
)
232-
ui.enable_screenshot = lambda: (
233-
... if SetWindowDisplayAffinity(hwnd, 0x00000000) else 1 / 0
234-
)
194+
ui.disable_screenshot = lambda: ... if SetWindowDisplayAffinity(
195+
hwnd, 0x00000011) else 1/0
196+
ui.enable_screenshot = lambda: ... if SetWindowDisplayAffinity(
197+
hwnd, 0x00000000) else 1/0
235198

236199
sys.exit(app.exec_())
237200
PluginManager.instance().stop()

src/media/frame.png

-855 Bytes
Binary file not shown.

src/mineSweeperGUI.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
from PyQt5.QtCore import QTimer, QCoreApplication, Qt, QRect
33
from PyQt5.QtGui import QPixmap
44
# from PyQt5.QtWidgets import QLineEdit, QInputDialog, QShortcut
5-
from PyQt5.QtWidgets import QApplication, QFileDialog, QWidget
5+
# from PyQt5.QtWidgets import QApplication, QFileDialog, QWidget
66
import gameDefinedParameter
77
import superGUI
88
import gameAbout
99
import gameSettings
1010
import gameSettingShortcuts
11-
import captureScreen, mine_num_bar, videoControl, gameRecordPop
11+
import captureScreen, mine_num_bar, gameRecordPop
1212
from CheckUpdateGui import CheckUpdateGui
1313
from githubApi import GitHub, SourceManager
14+
import win32con
15+
import win32gui
1416
import utils
1517
import ms_toollib as ms
1618
# import configparser
@@ -1413,12 +1415,20 @@ def limit_cursor(self):
14131415
# 计算限制区域
14141416
rect = QRect(widget_pos, widget_size)
14151417
self._clip_mouse(rect)
1418+
# 设置窗口置顶
1419+
hwnd = self.mainWindow.winId()
1420+
win32gui.SetWindowPos(hwnd, win32con.HWND_TOPMOST, 0, 0, 0, 0,
1421+
win32con.SWP_NOMOVE | win32con.SWP_NOSIZE)
14161422

14171423
def unlimit_cursor(self):
14181424
'''
14191425
取消将鼠标区域限制在游戏界面中。
14201426
'''
14211427
ctypes.windll.user32.ClipCursor(None)
1428+
# 取消窗口置顶
1429+
hwnd = self.mainWindow.winId()
1430+
win32gui.SetWindowPos(hwnd, win32con.HWND_NOTOPMOST, 0, 0, 0, 0,
1431+
win32con.SWP_NOMOVE | win32con.SWP_NOSIZE)
14221432

14231433
def _clip_mouse(self, rect):
14241434
# 定义RECT结构体

src/ui/ui_main_board.py

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def setupUi(self, MainWindow):
229229
self.verticalLayout_2.addLayout(self.horizontalLayout_6)
230230
MainWindow.setCentralWidget(self.centralwidget)
231231
self.menubar = QtWidgets.QMenuBar(MainWindow)
232-
self.menubar.setGeometry(QtCore.QRect(0, 0, 968, 27))
232+
self.menubar.setGeometry(QtCore.QRect(0, 0, 968, 33))
233233
font = QtGui.QFont()
234234
font.setFamily("微软雅黑")
235235
font.setPointSize(12)
@@ -254,8 +254,16 @@ def setupUi(self, MainWindow):
254254
self.language_menu.setFont(font)
255255
self.language_menu.setObjectName("language_menu")
256256
self.menu_3 = QtWidgets.QMenu(self.menubar)
257+
font = QtGui.QFont()
258+
font.setFamily("微软雅黑")
259+
font.setPointSize(12)
260+
self.menu_3.setFont(font)
257261
self.menu_3.setObjectName("menu_3")
258262
self.menu_4 = QtWidgets.QMenu(self.menubar)
263+
font = QtGui.QFont()
264+
font.setFamily("微软雅黑")
265+
font.setPointSize(12)
266+
self.menu_4.setFont(font)
259267
self.menu_4.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
260268
self.menu_4.setTearOffEnabled(False)
261269
self.menu_4.setObjectName("menu_4")
@@ -400,21 +408,34 @@ def setupUi(self, MainWindow):
400408
self.actionauto_update.setFont(font)
401409
self.actionauto_update.setShortcut("")
402410
self.actionauto_update.setObjectName("actionauto_update")
403-
self.action_open_folder = QtWidgets.QAction(MainWindow)
404-
self.action_open_folder.setObjectName("action_open_folder")
405-
self.actionlu = QtWidgets.QAction(MainWindow)
411+
self.action_open_replay = QtWidgets.QAction(MainWindow)
412+
font = QtGui.QFont()
413+
font.setFamily("微软雅黑")
414+
font.setPointSize(12)
415+
self.action_open_replay.setFont(font)
416+
self.action_open_replay.setShortcut("W")
417+
self.action_open_replay.setMenuRole(QtWidgets.QAction.TextHeuristicRole)
418+
self.action_open_replay.setObjectName("action_open_replay")
419+
self.action_open_ini = QtWidgets.QAction(MainWindow)
420+
font = QtGui.QFont()
421+
font.setFamily("微软雅黑")
422+
font.setPointSize(12)
423+
self.action_open_ini.setFont(font)
424+
self.action_open_ini.setObjectName("action_open_ini")
425+
self.action_level = QtWidgets.QAction(MainWindow)
406426
font = QtGui.QFont()
407427
font.setFamily("微软雅黑")
408428
font.setPointSize(12)
409-
self.actionlu.setFont(font)
410-
self.actionlu.setMenuRole(QtWidgets.QAction.TextHeuristicRole)
411-
self.actionlu.setObjectName("actionlu")
412-
self.actionddd = QtWidgets.QAction(MainWindow)
429+
self.action_level.setFont(font)
430+
self.action_level.setShortcut("L")
431+
self.action_level.setObjectName("action_level")
432+
self.action_best = QtWidgets.QAction(MainWindow)
413433
font = QtGui.QFont()
414434
font.setFamily("微软雅黑")
415435
font.setPointSize(12)
416-
self.actionddd.setFont(font)
417-
self.actionddd.setObjectName("actionddd")
436+
self.action_best.setFont(font)
437+
self.action_best.setShortcut("P")
438+
self.action_best.setObjectName("action_best")
418439
self.menu.addAction(self.actionopen)
419440
self.menu.addSeparator()
420441
self.menu.addAction(self.actionnew_game)
@@ -438,8 +459,10 @@ def setupUi(self, MainWindow):
438459
self.menu_2.addAction(self.language_menu.menuAction())
439460
self.menu_3.addAction(self.actiongaun_yv)
440461
self.menu_3.addAction(self.actionauto_update)
441-
self.menu_4.addAction(self.actionlu)
442-
self.menu_4.addAction(self.actionddd)
462+
self.menu_4.addAction(self.action_level)
463+
self.menu_4.addAction(self.action_best)
464+
self.menu_4.addAction(self.action_open_replay)
465+
self.menu_4.addAction(self.action_open_ini)
443466
self.menubar.addAction(self.menu.menuAction())
444467
self.menubar.addAction(self.menu_2.menuAction())
445468
self.menubar.addAction(self.menu_4.menuAction())
@@ -470,10 +493,10 @@ def retranslateUi(self, MainWindow):
470493
self.action_save.setText(_translate("MainWindow", "保存"))
471494
self.action_replay.setText(_translate("MainWindow", "回放"))
472495
self.actionauto_update.setText(_translate("MainWindow", "检查更新"))
473-
self.action_open_folder.setText(_translate("MainWindow", "录像位置"))
474-
self.action_open_folder.setShortcut(_translate("MainWindow", "W"))
475-
self.actionlu.setText(_translate("MainWindow", "录像所在位置"))
476-
self.actionddd.setText(_translate("MainWindow", "设置所在位置"))
496+
self.action_open_replay.setText(_translate("MainWindow", "录像所在位置"))
497+
self.action_open_ini.setText(_translate("MainWindow", "设置所在位置"))
498+
self.action_level.setText(_translate("MainWindow", "成就"))
499+
self.action_best.setText(_translate("MainWindow", "个人纪录"))
477500
from ui.mineLabel import mineLabel
478501
from ui.mineNumLabel import mineNumLabel
479502
from ui.uiComponents import StatusLabel

0 commit comments

Comments
 (0)