diff --git a/UI.ui b/UI.ui
index 8deef43..0b3c0a7 100644
--- a/UI.ui
+++ b/UI.ui
@@ -851,6 +851,36 @@ QPushButton:pressed, QPushButton:checked {
角色养成材料一览
+
+
+
+ 0
+ 126
+ 175
+ 42
+
+
+
+ QPushButton {
+ background-color: #ffffff;
+ border: 1px solid #dcdfe6;
+ border-radius: 1px;
+}
+
+QPushButton:hover {
+ background-color: #ecf5ff;
+ color: #409eff;
+}
+
+QPushButton:pressed, QPushButton:checked {
+ border: 1px solid #3a8ee6;
+ color: #409eff;
+}
+
+
+ 自选箱芯片一览
+
+
diff --git a/Ui_UI.py b/Ui_UI.py
index af2dcd9..cc3afa5 100644
--- a/Ui_UI.py
+++ b/Ui_UI.py
@@ -414,6 +414,24 @@ def setupUi(self, Form):
" color: #409eff;\n"
"}")
self.growthItems_Button.setObjectName("growthItems_Button")
+ self.choice_Chips_Button = QtWidgets.QPushButton(parent=self.scrollAreaWidgetContents_2)
+ self.choice_Chips_Button.setGeometry(QtCore.QRect(0, 126, 175, 42))
+ self.choice_Chips_Button.setStyleSheet("QPushButton {\n"
+" background-color: #ffffff;\n"
+" border: 1px solid #dcdfe6;\n"
+" border-radius: 1px;\n"
+"}\n"
+"\n"
+"QPushButton:hover {\n"
+" background-color: #ecf5ff;\n"
+" color: #409eff;\n"
+"}\n"
+"\n"
+"QPushButton:pressed, QPushButton:checked {\n"
+" border: 1px solid #3a8ee6;\n"
+" color: #409eff;\n"
+"}")
+ self.choice_Chips_Button.setObjectName("choice_Chips_Button")
self.scrollArea.setWidget(self.scrollAreaWidgetContents_2)
self.functionALL_tabWidget.addTab(self.Charts_tab, "")
self.orderList_scrollArea = QtWidgets.QScrollArea(parent=Form)
@@ -672,6 +690,7 @@ def retranslateUi(self, Form):
self.Chips_Button.setText(_translate("Form", "芯片获得途径一览"))
self.ItemsEX_Button.setText(_translate("Form", "养成材料掉率一览"))
self.growthItems_Button.setText(_translate("Form", "角色养成材料一览"))
+ self.choice_Chips_Button.setText(_translate("Form", "自选箱芯片一览"))
self.functionALL_tabWidget.setTabText(self.functionALL_tabWidget.indexOf(self.Charts_tab), _translate("Form", "图表"))
self.order_exp1012w_checkBox.setText(_translate("Form", "10换12w经验"))
self.order_coin1012w_checkBox.setText(_translate("Form", "10换12w星币"))
diff --git a/jczx.py b/jczx.py
index 5d605b5..05b710d 100644
--- a/jczx.py
+++ b/jczx.py
@@ -95,6 +95,7 @@ class _Chart:
GrowthItems = joinPath("resources","toolChart","养成材料一览.png")
ItemsEX = joinPath("resources","toolChart","材料掉率一图流.jpg")
Chips = joinPath("resources","toolChart","芯片获得途径.jpg")
+ ChoiceChips = joinPath("resources","toolChart","自选芯片.jpg")
Chart = _Chart()
@@ -160,6 +161,7 @@ def __init_buttom(self):
self.growthItems_Button.clicked.connect(lambda: startfile(self.Chart.GrowthItems))
self.ItemsEX_Button.clicked.connect(lambda: startfile(self.Chart.ItemsEX))
self.Chips_Button.clicked.connect(lambda: startfile(self.Chart.Chips))
+ self.choice_Chips_Button.clicked.connect(lambda: startfile(self.Chart.ChoiceChips))
self.test_button.clicked.connect(self.__debug)
@@ -395,7 +397,7 @@ class _Buttons:
activities_button = joinPath("resources","buttons","activities.png")
apply_button = joinPath("resources","buttons","apply.png")
accept_button = joinPath("resources","buttons","accept.png")
- cannotSubmit_button = joinPath("resources","buttons","cannotSubmit.png")
+ submit_button = joinPath("resources","buttons","submit.png")
getItem_button = joinPath("resources","buttons","getItem.png")
closeNotice_button = joinPath("resources","buttons","closeNotice.png")
noReminders_button = joinPath("resources","buttons","noReminders.png")
@@ -482,6 +484,7 @@ def getUserOrderPaths(self) -> list[tuple[str, _Orders.Description, _Orders.Craf
class _ScreenLocs:
friend = joinPath("resources","locations","friend.png")
levels = joinPath("resources","locations","levels.png")
+ notEnough = joinPath("resources","locations","notEnough.png")
whateverTradingPost = joinPath("resources","locations","whateverTradingPost.png")
illusionAward = joinPath("resources","locations","illusionAward.png")
emptyPlace2x2 = joinPath("resources","locations","emptyPlace2x2.png")
@@ -489,7 +492,7 @@ class _ScreenLocs:
sureEnter = joinPath("resources","buttons","sureEnter.png")
illusions = joinPath("resources","locations","illusions.png")
activities = joinPath("resources","locations","activities.png")
- notEnough = joinPath("resources","locations","notEnough.png")
+ notEnoughAsk = joinPath("resources","locations","notEnoughAsk.png")
tabBar = joinPath("resources","locations","tabBar.png")
getItem= joinPath("resources","buttons","getItem.png")
home = joinPath("resources","buttons","friends.png")
@@ -777,8 +780,9 @@ def __checkOrders(self, cutPoints = None):
x, y = locality
x0, y0 = x-w//2, y+h//2
x1, y1 = x+w//2, y+h//2+h
- if self.findImageCenterLocation(self.Buttons.cannotSubmit_button, ((x0, y0), (x1, y1)), per = 0.95):
+ if self.findImageCenterLocation(self.ScreenLocs.notEnough, ((x0, y0), (x1, y1)), 0.8):
if not craft:
+ self.log.info("当前订单材料不足")
# self._clickAndMsg(self.Buttons.cancel_button, wait = 0.3, cutPoints = self.ScreenCut.cut4x2(1, 1))
continue
self.click(*locality, 0.3)
@@ -1024,6 +1028,8 @@ def findImageCenterLocations(self, button_path:str, cutPoints:tuple[tuple[int, i
else:
x0, y0 = 0, 0
screenshot_gray = self.grayScreenshot(cutPoints)
+ # cv2.imshow("1", screenshot_gray)
+ # cv2.waitKey()
template_gray = cv2.imread(button_path, cv2.IMREAD_GRAYSCALE)
matcher = cv2.matchTemplate(screenshot_gray, template_gray, cv2.TM_CCOEFF_NORMED)
locations = np.where(matcher > per)
diff --git a/resources/buttons/cannotSubmit.png b/resources/buttons/cannotSubmit.png
deleted file mode 100644
index 0bedf79..0000000
Binary files a/resources/buttons/cannotSubmit.png and /dev/null differ
diff --git a/resources/buttons/submit.png b/resources/buttons/submit.png
new file mode 100644
index 0000000..a749fd4
Binary files /dev/null and b/resources/buttons/submit.png differ
diff --git a/resources/locations/notEnough.png b/resources/locations/notEnough.png
index d9b3d5b..c4c2be3 100644
Binary files a/resources/locations/notEnough.png and b/resources/locations/notEnough.png differ
diff --git a/resources/locations/notEnoughAsk.png b/resources/locations/notEnoughAsk.png
new file mode 100644
index 0000000..d9b3d5b
Binary files /dev/null and b/resources/locations/notEnoughAsk.png differ
diff --git "a/resources/toolChart/\350\207\252\351\200\211\350\212\257\347\211\207.jpg" "b/resources/toolChart/\350\207\252\351\200\211\350\212\257\347\211\207.jpg"
new file mode 100644
index 0000000..4979512
Binary files /dev/null and "b/resources/toolChart/\350\207\252\351\200\211\350\212\257\347\211\207.jpg" differ