From d349f0114dc90b32e480a4c82ecfaa143b3c48b7 Mon Sep 17 00:00:00 2001 From: YangHu Date: Fri, 27 Sep 2019 16:53:54 +0800 Subject: [PATCH] new UI system --- CHANGELOG.md | 8 ++ Ui_onmyoji.py | 127 ++++++++++--------- explore/explore.py | 18 ++- img/JIA-CHENG.png | Bin 0 -> 2818 bytes img/MESSAGE.png | Bin 0 -> 1876 bytes mitama/fighter_passenger.py | 2 +- onmyoji.ui | 234 ++++++++++++++++++++++-------------- tools/game_pos.py | 2 +- ui.py | 32 +++-- 9 files changed, 263 insertions(+), 160 deletions(-) create mode 100644 img/JIA-CHENG.png create mode 100644 img/MESSAGE.png diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d30b2..522ea6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## v1.0.0.0927 +#### New features: +* 更新了UI系统,现在预留了更多的设置空间。 +* 增加了狗粮更换滑块,现在可以自由设置狗粮更换的式神进度。 +#### Fixes (bugs & defects): +* 修复了某些情况下,打完boss脚本会死掉的情况。 +* 根据[#14](https://github.com/AcademicDog/onmyoji_bot/issues/14),修复了乘客在庭院上车,可能会出现进入其他界面问题。 + ## v1.0.0.0926 #### Fixes (bugs & defects): * 修复了部分模型过大(如茨林、拍屁股),导致无法有效更换满级狗粮的问题。 diff --git a/Ui_onmyoji.py b/Ui_onmyoji.py index 64d4253..3d07f4b 100644 --- a/Ui_onmyoji.py +++ b/Ui_onmyoji.py @@ -11,41 +11,59 @@ class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") - MainWindow.resize(288, 590) - MainWindow.setMinimumSize(QtCore.QSize(288, 590)) + MainWindow.resize(545, 590) + MainWindow.setMinimumSize(QtCore.QSize(545, 590)) MainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout_6 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_6.setObjectName("gridLayout_6") self.frame = QtWidgets.QFrame(self.centralwidget) + self.frame.setMinimumSize(QtCore.QSize(0, 0)) self.frame.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.frame.setFrameShape(QtWidgets.QFrame.Box) self.frame.setFrameShadow(QtWidgets.QFrame.Sunken) self.frame.setObjectName("frame") self.gridLayout_3 = QtWidgets.QGridLayout(self.frame) self.gridLayout_3.setObjectName("gridLayout_3") + self.verticalLayout_2 = QtWidgets.QVBoxLayout() + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.label_4 = QtWidgets.QLabel(self.frame) + self.label_4.setObjectName("label_4") + self.verticalLayout_2.addWidget(self.label_4) + self.textEdit = QtWidgets.QTextEdit(self.frame) + self.textEdit.setEnabled(True) + self.textEdit.setMinimumSize(QtCore.QSize(216, 124)) + self.textEdit.setStatusTip("") + self.textEdit.setReadOnly(True) + self.textEdit.setObjectName("textEdit") + self.verticalLayout_2.addWidget(self.textEdit) self.line_3 = QtWidgets.QFrame(self.frame) self.line_3.setFrameShape(QtWidgets.QFrame.HLine) self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_3.setObjectName("line_3") - self.gridLayout_3.addWidget(self.line_3, 1, 0, 1, 1) - self.verticalLayout = QtWidgets.QVBoxLayout() - self.verticalLayout.setObjectName("verticalLayout") + self.verticalLayout_2.addWidget(self.line_3) + self.start_btn = QtWidgets.QPushButton(self.frame) + self.start_btn.setMinimumSize(QtCore.QSize(246, 23)) + self.start_btn.setLayoutDirection(QtCore.Qt.RightToLeft) + self.start_btn.setObjectName("start_btn") + self.verticalLayout_2.addWidget(self.start_btn) + self.pushButton = QtWidgets.QPushButton(self.frame) + self.pushButton.setMinimumSize(QtCore.QSize(246, 0)) + self.pushButton.setObjectName("pushButton") + self.verticalLayout_2.addWidget(self.pushButton) + self.gridLayout_3.addLayout(self.verticalLayout_2, 1, 2, 1, 1) self.label = QtWidgets.QLabel(self.frame) font = QtGui.QFont() font.setFamily("Times New Roman") font.setPointSize(24) self.label.setFont(font) self.label.setObjectName("label") - self.verticalLayout.addWidget(self.label) - self.line_2 = QtWidgets.QFrame(self.frame) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.verticalLayout.addWidget(self.line_2) + self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1) + self.verticalLayout = QtWidgets.QVBoxLayout() + self.verticalLayout.setObjectName("verticalLayout") self.tabWidget = QtWidgets.QTabWidget(self.frame) - self.tabWidget.setMinimumSize(QtCore.QSize(246, 115)) + self.tabWidget.setMinimumSize(QtCore.QSize(0, 0)) self.tabWidget.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.tabWidget.setObjectName("tabWidget") self.tab = QtWidgets.QWidget() @@ -73,14 +91,23 @@ def setupUi(self, MainWindow): self.tab_2.setObjectName("tab_2") self.gridLayout_5 = QtWidgets.QGridLayout(self.tab_2) self.gridLayout_5.setObjectName("gridLayout_5") + self.checkBox_3 = QtWidgets.QCheckBox(self.tab_2) + self.checkBox_3.setChecked(True) + self.checkBox_3.setObjectName("checkBox_3") + self.gridLayout_5.addWidget(self.checkBox_3, 1, 0, 1, 1) + self.checkBox_2 = QtWidgets.QCheckBox(self.tab_2) + self.checkBox_2.setObjectName("checkBox_2") + self.gridLayout_5.addWidget(self.checkBox_2, 4, 0, 1, 1) self.plainTextEdit_2 = QtWidgets.QPlainTextEdit(self.tab_2) self.plainTextEdit_2.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.plainTextEdit_2.setReadOnly(True) self.plainTextEdit_2.setObjectName("plainTextEdit_2") self.gridLayout_5.addWidget(self.plainTextEdit_2, 0, 0, 1, 1) - self.checkBox_2 = QtWidgets.QCheckBox(self.tab_2) - self.checkBox_2.setObjectName("checkBox_2") - self.gridLayout_5.addWidget(self.checkBox_2, 1, 0, 1, 1) + self.horizontalSlider = QtWidgets.QSlider(self.tab_2) + self.horizontalSlider.setSliderPosition(10) + self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal) + self.horizontalSlider.setObjectName("horizontalSlider") + self.gridLayout_5.addWidget(self.horizontalSlider, 2, 0, 1, 1) self.tabWidget.addTab(self.tab_2, "") self.tab_3 = QtWidgets.QWidget() self.tab_3.setObjectName("tab_3") @@ -93,18 +120,18 @@ def setupUi(self, MainWindow): self.gridLayout_4.addWidget(self.plainTextEdit, 0, 0, 1, 1) self.tabWidget.addTab(self.tab_3, "") self.verticalLayout.addWidget(self.tabWidget) - self.line_5 = QtWidgets.QFrame(self.frame) - self.line_5.setFrameShape(QtWidgets.QFrame.HLine) - self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_5.setObjectName("line_5") - self.verticalLayout.addWidget(self.line_5) + self.line = QtWidgets.QFrame(self.frame) + self.line.setFrameShape(QtWidgets.QFrame.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line.setObjectName("line") + self.verticalLayout.addWidget(self.line) self.groupBox_2 = QtWidgets.QGroupBox(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth()) self.groupBox_2.setSizePolicy(sizePolicy) - self.groupBox_2.setMinimumSize(QtCore.QSize(246, 100)) + self.groupBox_2.setMinimumSize(QtCore.QSize(0, 0)) self.groupBox_2.setLayoutDirection(QtCore.Qt.LeftToRight) self.groupBox_2.setObjectName("groupBox_2") self.gridLayout_7 = QtWidgets.QGridLayout(self.groupBox_2) @@ -116,51 +143,35 @@ def setupUi(self, MainWindow): self.label_2 = QtWidgets.QLabel(self.groupBox_2) self.label_2.setObjectName("label_2") self.gridLayout_7.addWidget(self.label_2, 2, 0, 1, 1) + self.label_3 = QtWidgets.QLabel(self.groupBox_2) + self.label_3.setObjectName("label_3") + self.gridLayout_7.addWidget(self.label_3, 3, 0, 1, 1) self.lineEdit = QtWidgets.QLineEdit(self.groupBox_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit.sizePolicy().hasHeightForWidth()) self.lineEdit.setSizePolicy(sizePolicy) + self.lineEdit.setMaximumSize(QtCore.QSize(16777215, 20)) self.lineEdit.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.lineEdit.setObjectName("lineEdit") self.gridLayout_7.addWidget(self.lineEdit, 2, 1, 1, 1) - self.label_3 = QtWidgets.QLabel(self.groupBox_2) - self.label_3.setObjectName("label_3") - self.gridLayout_7.addWidget(self.label_3, 3, 0, 1, 1) self.lineEdit_2 = QtWidgets.QLineEdit(self.groupBox_2) + self.lineEdit_2.setMaximumSize(QtCore.QSize(16777215, 20)) self.lineEdit_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.lineEdit_2.setObjectName("lineEdit_2") self.gridLayout_7.addWidget(self.lineEdit_2, 3, 1, 1, 1) self.verticalLayout.addWidget(self.groupBox_2) - self.line_4 = QtWidgets.QFrame(self.frame) - self.line_4.setFrameShape(QtWidgets.QFrame.HLine) - self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_4.setObjectName("line_4") - self.verticalLayout.addWidget(self.line_4) - self.textEdit = QtWidgets.QTextEdit(self.frame) - self.textEdit.setMinimumSize(QtCore.QSize(246, 124)) - self.textEdit.setObjectName("textEdit") - self.verticalLayout.addWidget(self.textEdit) - self.line = QtWidgets.QFrame(self.frame) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.verticalLayout.addWidget(self.line) - self.start_btn = QtWidgets.QPushButton(self.frame) - self.start_btn.setMinimumSize(QtCore.QSize(246, 23)) - self.start_btn.setLayoutDirection(QtCore.Qt.RightToLeft) - self.start_btn.setObjectName("start_btn") - self.verticalLayout.addWidget(self.start_btn) - self.pushButton = QtWidgets.QPushButton(self.frame) - self.pushButton.setMinimumSize(QtCore.QSize(246, 0)) - self.pushButton.setObjectName("pushButton") - self.verticalLayout.addWidget(self.pushButton) - self.gridLayout_3.addLayout(self.verticalLayout, 0, 0, 1, 1) - self.gridLayout_6.addWidget(self.frame, 0, 0, 1, 1) + self.gridLayout_3.addLayout(self.verticalLayout, 1, 0, 1, 1) + self.line_2 = QtWidgets.QFrame(self.frame) + self.line_2.setFrameShape(QtWidgets.QFrame.VLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_2.setObjectName("line_2") + self.gridLayout_3.addWidget(self.line_2, 1, 1, 1, 1) + self.gridLayout_6.addWidget(self.frame, 1, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 288, 23)) + self.menubar.setGeometry(QtCore.QRect(0, 0, 545, 23)) self.menubar.setObjectName("menubar") self.menu = QtWidgets.QMenu(self.menubar) self.menu.setObjectName("menu") @@ -173,6 +184,7 @@ def setupUi(self, MainWindow): self.actionAbout_2 = QtWidgets.QAction(MainWindow) self.actionAbout_2.setObjectName("actionAbout_2") self.actionAbout = QtWidgets.QAction(MainWindow) + self.actionAbout.setStatusTip("") self.actionAbout.setObjectName("actionAbout") self.menu.addAction(self.actionAbout) self.menubar.addAction(self.menu.menuAction()) @@ -189,15 +201,22 @@ def setupUi(self, MainWindow): def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "onmyoji_bot")) + self.label_4.setText(_translate("MainWindow", "日志")) + self.start_btn.setText(_translate("MainWindow", "开始")) + self.pushButton.setText(_translate("MainWindow", "结束")) self.label.setText(_translate("MainWindow", "辅助助手")) self.groupBox.setTitle(_translate("MainWindow", "模式")) self.radioButton_2.setText(_translate("MainWindow", "单人司机")) self.radioButton.setText(_translate("MainWindow", "单刷")) self.radioButton_3.setText(_translate("MainWindow", "单人乘客")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "御魂/御灵")) - self.plainTextEdit_2.setPlainText(_translate("MainWindow", "把狗粮队长放在最左边,点开需要打的章节,然后开始。\n" -"支持自动换狗粮,只打经验怪。")) + self.checkBox_3.setText(_translate("MainWindow", "换狗粮拖放式神进度条,进度:")) self.checkBox_2.setText(_translate("MainWindow", "结束后打BOSS")) + self.plainTextEdit_2.setPlainText(_translate("MainWindow", "把狗粮队长放在最左边,点开需要打的章节,然后开始。\n" +"\n" +"支持自动换狗粮,只打经验怪。\n" +"\n" +"最好把“合并相同式神”选项关闭。")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "探索")) self.plainTextEdit.setPlainText(_translate("MainWindow", "网址:https://github.com/AcademicDog/onmyoji_bot\n" "\n" @@ -206,11 +225,9 @@ def retranslateUi(self, MainWindow): self.groupBox_2.setTitle(_translate("MainWindow", "高级选项")) self.checkBox.setText(_translate("MainWindow", "超时自动关闭阴阳师")) self.label_2.setText(_translate("MainWindow", " 画面超时时间(秒):")) - self.lineEdit.setText(_translate("MainWindow", "100")) self.label_3.setText(_translate("MainWindow", " 操作超时时间(秒):")) + self.lineEdit.setText(_translate("MainWindow", "100")) self.lineEdit_2.setText(_translate("MainWindow", "20")) - self.start_btn.setText(_translate("MainWindow", "开始")) - self.pushButton.setText(_translate("MainWindow", "结束")) self.menu.setTitle(_translate("MainWindow", "帮助")) self.actionFile.setText(_translate("MainWindow", "File")) self.actionAbout_2.setText(_translate("MainWindow", "About")) diff --git a/explore/explore.py b/explore/explore.py index 5109995..a1a038a 100644 --- a/explore/explore.py +++ b/explore/explore.py @@ -16,6 +16,8 @@ def __init__(self): conf = configparser.ConfigParser() conf.read('conf.ini') self.fight_boss_enable = conf.getboolean('explore', 'fight_boss_enable') + self.slide_shikigami = conf.getboolean('explore', 'slide_shikigami') + self.slide_shikigami_progress = conf.getint('explore', 'slide_shikigami_progress') def next_scene(self): ''' @@ -61,7 +63,18 @@ def check_exp_full(self): time.sleep(1) # 拖放进度条 - self.yys.mouse_drag_bg(*TansuoPos.n_slide) + if self.slide_shikigami: + # 读取坐标范围 + star_x = TansuoPos.n_slide[0][0] + end_x = TansuoPos.n_slide[1][0] + length = end_x - star_x + + # 计算拖放范围 + pos_end_x = int(star_x + length/100*self.slide_shikigami_progress) + pos_end_y = TansuoPos.n_slide[0][1] + + self.yys.mouse_drag_bg( + TansuoPos.n_slide[0], (pos_end_x, pos_end_y)) # 更换狗粮 if gouliang1: @@ -150,7 +163,7 @@ def fight_moster(self, mood1, mood2): # 在战斗结算页面 self.yys.mouse_click_bg(ut.firstposition()) - self.click_until('结算', 'img\\YING-BING.png', + self.click_until('结算', 'img\\MESSAGE.png', *CommonPos.second_position, mood2.get1mood()/1000) def start(self): @@ -187,3 +200,4 @@ def start(self): break self.yys.mouse_click_bg(*TansuoPos.confirm_btn) self.log.writeinfo('结束本轮探索') + time.sleep(0.5) diff --git a/img/JIA-CHENG.png b/img/JIA-CHENG.png new file mode 100644 index 0000000000000000000000000000000000000000..3c876de0eaeb16b57c28d56821533fdfebca4fe7 GIT binary patch literal 2818 zcmV+d3;pzoP)2DnM8GdGV_VC*4+p*(2c216vKnhJLsHC8@RFtDarIdcC`U&+@i~1iRRaKD?>bF)! zRjD{cq*5vY4Fv&7fE*2w5OUhF9XpQWwX;6f#~$*SCA(!hy9c7q5|G=LigJRX-e$GQ2jY=t6__j$hy#5{Y>nDSn_pT}e4S$Lr_`7Fvs z-V|~1e{HhZS_jr%uhb+hyJy@uzquM1 zN^4blcC!eA#ZBO#ET(HXT*9n*uI!-4GV!j+jh>nE!n)8J2jpA&`ZB&cH-qKXqIw=K zQT11453#7n)l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~ZXImFJm>8J zlJw;(^Cbed;8>IT;J7R|)QBs_C7p;irh~bEDTW&Io1LOZ#|?zPmMv zUq8JA%N+DA^>HP68==1jTqWa-L_j0_I89<5=KSpBFz8xekINHTm5T2kx`c^qi^>qG z`WW`@>BnOa3}O?TUnWdTiiT>vaC~|?*(wcI)~w>(2y5`-8z(srYp}Vu5&J(JQi{qe z=^7o(5AE*5Z=TtSxaV5<`=SDUOMku})X8*<)35 zzA5j;Kovk<16|Z7qKtMK`#%`MVMZYagj}a72~V9*Bf}oNKy@xz=q7?opp&&cRcB6M zC~x%T(&`&y+tEr~_yu3(LVywOu0*A} zv}pT9jYyQGi1~evZ%kvxr+Lho2aU^H2$t&9EwX80zeu# zL$i40gJI;UtopJ(c?U9v{r?AWC=^ zNWuoWd}iFsT{$hjg*TIZ)n4= zmK09%Em)lMoLXtXK%PoJ3j611f0YnU*k7lFL5v#=@Q77;CitmC=X$}n{ucZ&D<+_| z7(crcadh`4l$AU;nYZjDA-P6ngD*8L1jOt*3VX*7P*n_!m9(?4i5oPwvDYp7%0Eby z)QbG`{KN{^G#Y`42~Z*`+5MG>{TU^KKqLo0^eAao=+HI4$!MF&dTW%YCE6nX2N7;j Ux=Dv5wg3PC07*qoM6N<$g4E%0umAu6 literal 0 HcmV?d00001 diff --git a/img/MESSAGE.png b/img/MESSAGE.png new file mode 100644 index 0000000000000000000000000000000000000000..8414093293bdd7adf89d1d8fab089949098ee321 GIT binary patch literal 1876 zcmV-a2dnsrP)Ip<7wmsKhtAV}d-CJuo~T=pGHau0zu`Xqtxa`LS)= zIVLtH(3C<3k#t8y9lt0LG-#!EgWh z1uJVS$mFsJhJJV`!QTSTmCw*L@uA*C>!JmZVIUC-;==2PUU>NeUTUvWuAqEe!rjMP zOsNZ9)9`(j_jzzO=aM;#?~ABc>WD-a@bbsk*n4pRf4~o8r?7{}!UBpXr?_fe;+_<* zZmc4`xCmdsrw00~*tCWte7ydMi&_K2!2r3fb!=>JB9Tf#ziz|tCqSVom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NmW&Y;ZQ%AqT=9FMV(J%^c4%JSn!hV1B-?y--*TIkgliXg5 zLo+KGPR^C_T~wOC2=)=xS3u76He>M*Y-*J@X&#BBfIpzZUtBKQylQt<=o>G7dW~cv zipgkz5hFxCx;xp|wxuct9`eA(Jf@jpzI9_Ogb2tnS(7dliN|2QE5m$Wp$0G8s#IaW z&W(Wg34qzJhrpPdO}CwhQH;(9?Yx7ZxcNDh&Ry5-HqI|^`QlzzI{hCUE##PIGZL2o O0000 0 0 - 288 + 545 590 - 288 + 545 590 @@ -27,8 +27,14 @@ - + + + + 0 + 0 + + 16777215 @@ -42,41 +48,93 @@ QFrame::Sunken - - - - Qt::Horizontal - - - - - + + - - - - Times New Roman - 24 - - + - 辅助助手 + 日志 + + + + + + + true + + + + 216 + 124 + + + + + + + true - + Qt::Horizontal - + + + + 246 + 23 + + + + Qt::RightToLeft + + + 开始 + + + + + 246 - 115 + 0 + + + + 结束 + + + + + + + + + + Times New Roman + 24 + + + + 辅助助手 + + + + + + + + + + 0 + 0 @@ -136,6 +194,23 @@ 探索 + + + + 换狗粮拖放式神进度条,进度: + + + true + + + + + + + 结束后打BOSS + + + @@ -149,14 +224,20 @@ 把狗粮队长放在最左边,点开需要打的章节,然后开始。 -支持自动换狗粮,只打经验怪。 + +支持自动换狗粮,只打经验怪。 + +最好把“合并相同式神”选项关闭。 - - - - 结束后打BOSS + + + + 10 + + + Qt::Horizontal @@ -190,7 +271,7 @@ - + Qt::Horizontal @@ -206,8 +287,8 @@ - 246 - 100 + 0 + 0 @@ -234,6 +315,13 @@ + + + + 操作超时时间(秒): + + + @@ -242,6 +330,12 @@ 0 + + + 16777215 + 20 + + 100 @@ -250,15 +344,14 @@ - - - - 操作超时时间(秒): - - - + + + 16777215 + 20 + + 20 @@ -270,61 +363,15 @@ - - - - Qt::Horizontal - - - - - - - - 246 - 124 - - - - - - - - Qt::Horizontal - - - - - - - - 246 - 23 - - - - Qt::RightToLeft - - - 开始 - - - - - - - - 246 - 0 - - - - 结束 - - - + + + + Qt::Vertical + + + @@ -335,7 +382,7 @@ 0 0 - 288 + 545 23 @@ -362,6 +409,9 @@ About + + + diff --git a/tools/game_pos.py b/tools/game_pos.py index a5ef139..c15cefa 100644 --- a/tools/game_pos.py +++ b/tools/game_pos.py @@ -16,7 +16,7 @@ class TansuoPos(): change_monster = (427, 419), (457, 452) # 切换狗粮点击区域 quanbu_btn = (37, 574), (80, 604) # “全部”按钮 n_tab_btn = (142, 288), (164, 312) # n卡标签 - n_slide = (168, 615), (370, 615) # n卡进度条 + n_slide = (168, 615), (784, 615) # n卡进度条,从头至尾 quit_change_monster=GamePos((19,17),(43,38)) #退出换狗粮界面 gouliang_middle = (397, 218), (500, 349) # 中间狗粮位置 gouliang_right = (628, 293), (730, 430) # 右边狗粮位置 diff --git a/ui.py b/ui.py index 0b59334..bb016fd 100644 --- a/ui.py +++ b/ui.py @@ -41,39 +41,53 @@ def __init__(self, parent = None): logger.setLevel(logging.INFO) logger.addHandler(h) - def set_conf(self, conf): + def set_conf(self, conf, section): ''' 设置参数至配置文件 ''' + # 一般参数 conf.set('watchdog', 'watchdog_enable', str(self.ui.checkBox.isChecked())) conf.set('watchdog', 'max_win_time', str(self.ui.lineEdit.text())) conf.set('watchdog', 'max_op_time', str(self.ui.lineEdit_2.text())) - conf.set('explore', 'fight_boss_enable', - str(self.ui.checkBox_2.isChecked())) + + # 御魂参数 + if section == 0: + pass + + # 探索参数 + if section == 1: + # 探索 + conf.set('explore', 'fight_boss_enable', + str(self.ui.checkBox_2.isChecked())) + conf.set('explore', 'slide_shikigami', + str(self.ui.checkBox_3.isChecked())) + conf.set('explore', 'slide_shikigami_progress', + str(self.ui.horizontalSlider.value())) - def get_conf(self): + def get_conf(self, section): conf = configparser.ConfigParser() # 读取配置文件 - conf.read('conf.ini') + conf.read('conf.ini', encoding="utf-8") # 修改配置 try: - self.set_conf(conf) + self.set_conf(conf, section) except: conf.add_section('watchdog') conf.add_section('explore') - self.set_conf(conf) + self.set_conf(conf, section) # 保存配置文件 with open('conf.ini', 'w') as configfile: conf.write(configfile) def start_onmyoji(self): + section = self.ui.tabWidget.currentIndex() + # 读取配置 - self.get_conf() + self.get_conf(section) - section = self.ui.tabWidget.currentIndex() if section == 0: # 御魂 if mode == 0: