11from PyQt5 import QtCore
2- from PyQt5 .QtCore import QTimer , QCoreApplication , Qt , QRect
3- from PyQt5 .QtGui import QPixmap
2+ from PyQt5 .QtCore import QTimer , QCoreApplication , Qt , QRect , QUrl
3+ from PyQt5 .QtGui import QPixmap , QDesktopServices
44# from PyQt5.QtWidgets import QLineEdit, QInputDialog, QShortcut
55# from PyQt5.QtWidgets import QApplication, QFileDialog, QWidget
66import gameDefinedParameter
@@ -55,7 +55,6 @@ def __init__(self, MainWindow: MainWindow, args):
5555 self .actionzhogn_ji .triggered .connect (lambda : self .predefined_Board (2 ))
5656 self .actiongao_ji .triggered .connect (lambda : self .predefined_Board (3 ))
5757 self .actionzi_ding_yi .triggered .connect (self .action_CEvent )
58- self .actiongao_ji .triggered .connect (lambda : self .predefined_Board (3 ))
5958
6059 def save_evf_file_integrated ():
6160 if self .game_state != "ready" and self .game_state != "playing" and \
@@ -81,6 +80,13 @@ def save_evf_file_integrated():
8180 lambda : self .trans_language ("pl_PL" ))
8281 self .german_action .triggered .connect (
8382 lambda : self .trans_language ("de_DE" ))
83+
84+ # 查看菜单
85+ self .action_open_replay .triggered .connect (
86+ lambda : QDesktopServices .openUrl (
87+ QUrl .fromLocalFile (str (self .setting_path / 'replay' ))))
88+ self .action_open_ini .triggered .connect (
89+ lambda : QDesktopServices .openUrl (QUrl .fromLocalFile (str (self .setting_path ))))
8490
8591 # config = configparser.ConfigParser()
8692 # config.read(self.game_setting_path, encoding='utf-8')
@@ -286,6 +292,7 @@ def minenum(self, minenum):
286292 self ._minenum = minenum
287293
288294 def layMine (self , i , j ):
295+
289296 xx = self .row
290297 yy = self .column
291298 num = self .minenum
@@ -475,7 +482,7 @@ def mineNumWheel(self, i):
475482 # self.timer_mine_num.start(3000)
476483
477484 def gameStart (self ):
478- # 画界面,但是不埋雷
485+ # 画界面,但是不埋雷。等价于点脸、f2、设置确定后的效果
479486 self .mineUnFlagedNum = self .minenum # 没有标出的雷,显示在左上角
480487 self .showMineNum (self .mineUnFlagedNum ) # 在左上角画雷数
481488 # pixmap = QPixmap(self.pixmapNum[14])
@@ -513,13 +520,10 @@ def gameRestart(self, e=None): # 画界面,但是不埋雷,改数据而不
513520 return
514521 # 此时self.label.ms_board是utils.abstract_game_board的实例
515522 if self .game_state == 'display' or self .game_state == 'showdisplay' :
516- # self.timer_video.stop()
517- # self.ui_video_control.QWidget.close()
518523 self .label .ms_board = ms .BaseVideo (
519524 [[0 ] * self .column for _ in range (self .row )], self .pixSize )
520525 self .label .ms_board .mode = self .gameMode
521526 elif self .game_state == 'study' :
522- # self.num_bar_ui.QWidget.close()
523527 self .score_board_manager .visible ()
524528 self .label .ms_board = ms .BaseVideo (
525529 [[0 ] * self .column for _ in range (self .row )], self .pixSize )
0 commit comments