1010import ms_toollib as ms
1111import configparser
1212# from pathlib import Path
13- import time
13+ # import time
1414import os
1515import ctypes
1616import hashlib , uuid
1717# from PyQt5.QtWidgets import QApplication
18- from country_name import country_name
18+ # from country_name import country_name
1919import metaminesweeper_checksum
20- import mmap
2120
2221
2322class MineSweeperGUI (superGUI .Ui_MainWindow ):
@@ -1279,10 +1278,10 @@ def play_video(self, video):
12791278 event_len = video .events_len
12801279 comments = []
12811280 for event_id in range (event_len ):
1282- time = video .events_time (event_id )
1281+ t = video .events_time (event_id )
12831282 comment = video .events_comments (event_id )
12841283 if comment :
1285- comments .append ((time , [i .split (': ' ) for i in comment .split (';' )[:- 1 ]]))
1284+ comments .append ((t , [i .split (': ' ) for i in comment .split (';' )[:- 1 ]]))
12861285 # 调整窗口
12871286 if (video .row , video .column ) != (self .row , self .column ):
12881287 self .setBoard (video .row , video .column , video .mine_num )
@@ -1403,6 +1402,8 @@ def set_face(self, face_type):
14031402
14041403 def hidden_score_board (self ):
14051404 # 按/隐藏计数器,再按显示
1405+ if self .game_state == 'study' :
1406+ return
14061407 if self .score_board_manager .ui .QWidget .isVisible ():
14071408 self .score_board_manager .invisible ()
14081409 else :
@@ -1415,13 +1416,13 @@ def limit_cursor(self):
14151416 widget_size = self .label .size ()
14161417 # 计算限制区域
14171418 rect = QRect (widget_pos , widget_size )
1418- self .clip_mouse (rect )
1419+ self ._clip_mouse (rect )
14191420
14201421 # 取消将鼠标区域限制在游戏界面中
14211422 def unlimit_cursor (self ):
14221423 ctypes .windll .user32 .ClipCursor (None )
14231424
1424- def clip_mouse (self , rect ):
1425+ def _clip_mouse (self , rect ):
14251426 # 定义RECT结构体
14261427 class RECT (ctypes .Structure ):
14271428 _fields_ = [("left" , ctypes .c_long ),
0 commit comments