From 0ab5d99011f0d498eb855fc87636d4d2de0aab31 Mon Sep 17 00:00:00 2001 From: dengrb1 <125752069+dengrb1@users.noreply.github.com> Date: Mon, 19 Feb 2024 22:30:12 +0800 Subject: [PATCH] Update flie on 2024/2/19 --- README.md | 15 +- jc.py | 47 +++-- kg.ui | 134 +++++++++++++ pmcl.py | 499 ++++++++++++++++++++++++++++++++++++++++++----- pmcl_main.ui | 239 ++++++++++++++++++----- requirements.txt | 1 + settings.ui | 119 +++++++++++ 7 files changed, 939 insertions(+), 115 deletions(-) create mode 100644 kg.ui create mode 100644 requirements.txt create mode 100644 settings.ui diff --git a/README.md b/README.md index e6dc379..c9d5997 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,25 @@ # Pmcl:Python minecraft launcher ------------------------- -#### 介绍 +## 介绍 用python制作的我的世界1.8.9启动器 可以把我的世界1.8.9forge版启动! 支持vape一键注入!! ### Gitee库 -此项目在Github上面也已开源,主要更新在Gitee,所以GitHub更新会慢一些 -项目地址:[https://github.com/dengrb1/pmcl](https://) - - +此项目在Gitee上面也已开源,主要更新在Gitee,所以GitHub更新会慢一些 +项目地址:[https://gitee.com/dengrb1/pmcl](https://) #### 安装教程 1. 从[https://gitee.com/dengrb1/pmcl/releases](http://)里下载最新版本 _**(注:文件开头是“Pmcl”全都要下载!!)**_ 2. 打开**pmcl_setup.7z.001** 文件并解压 -3. 打开安装包安装完成即可使用 +3. 打开安装包安装完成即可使用 +**因为gitee的总附件只有1GB的存储空间,所以现在无法发送安装包(问题以后可能会修复)** #### 更新日志 +更新日志可能不是最新,请到[https://gitee.com/dengrb1/pmcl/releases](http://)里查看最新版本的更新日志!! 1.0.0 没什么好说的,自己看 -1.0.1 加入游戏启动检测,并增加程序自由性 +1.0.1 加入游戏启动检测,并增加程序自由性 +1.0.2 加入检测vape是否启动;加入保存配置功能(测试);修复无法启动vape lite的BUG diff --git a/jc.py b/jc.py index bf400bc..0df8074 100644 --- a/jc.py +++ b/jc.py @@ -4,16 +4,41 @@ from time import sleep import shelve -print('版本:V1.0.1') +def run(): + try: + os.startfile('pmcl_main.exe') + except: + error() + print('初始化已完成!') + sleep(1.2) + sys.exit() +def error(): + print('==================================') + print('启动失败!') + print('请检查文件是否完整再重启!') + sleep(1) + sys.exit() + +print('版本:V1.1') print('正在初始化...') +print('可能会被360等杀毒软件杀掉,使用前请关闭杀毒软件或把此启动器的所有文件加入白名单!') +ty = input('是否同意使用本软件(y/n):') -with shelve.open('main') as db: - db['startgame'] = False - # db['vape_run'] = False - db.close() - - -print('初始化已完成!') -sleep(1.5) -os.startfile('pmcl_main.exe') -sys.exit() +if ty == 'y' or ty == 'Y': + print('欢迎使用Python Minecraft Launcher!') + print('项目地址:https://gitee.com/dengrb1/pmcl') + print('作者:dengrb1') + print('本项目完全没有病毒,您可以放心使用!!') + with shelve.open('main') as db: + db['startgame'] = False + db['vaper'] = False + db.close() + run() +elif ty == 'n' or ty == 'N': + print('已拒绝!') + sleep(1) + sys.exit() +else: + print('输入错误!') + sleep(1) + sys.exit() diff --git a/kg.ui b/kg.ui new file mode 100644 index 0000000..c1f0a5f --- /dev/null +++ b/kg.ui @@ -0,0 +1,134 @@ + + + Form + + + + 0 + 0 + 306 + 250 + + + + 选择外挂 + + + + + 90 + 190 + 121 + 23 + + + + QPushButton { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black); + color: white; + font-size: 20px; + font-weight: bold; + border-radius: 25px; + } + + QPushButton:hover { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black); + } + + QPushButton:pressed { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black); + } + """) + + + 确定 + + + + + + 70 + 20 + 171 + 31 + + + + <html><head/><body><p><span style=" font-size:18pt; font-weight:600; color:#ff0000;">请选择外挂</span></p></body></html> + + + + + + 70 + 100 + 51 + 21 + + + + <html><head/><body><p><span style=" font-size:11pt;">版本:</span></p></body></html> + + + + + + 120 + 100 + 111 + 22 + + + + QComboBox { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:1, stop:0 #f5f5f7, stop:1 #dedee0); + border: 1px solid whitesmoke; + border-radius: 3px; + padding-left: 15px; + color: gray; + } + + QComboBox::drop-down { + width: 22px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + } + + QComboBox::down-arrow { + width: 16px; + height: 16px; + image: url(PATH_TO_IMG); + } + + QComboBox QAbstractItemView { + color: gray; + border: none; + outline: none; + background-color: #dedee0; + } + + QComboBox QScrollBar:vertical { + width: 2px; + background-color: white; + } + + QComboBox QScrollBar::handle:vertical { + background-color: #b2bdaf; + } + """) + + + + Vape lite + + + + + Vape V4 + + + + + + + diff --git a/pmcl.py b/pmcl.py index c6ec30f..78e694c 100644 --- a/pmcl.py +++ b/pmcl.py @@ -14,6 +14,11 @@ import sys from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import QMessageBox +from PyQt5.QtGui import QPalette, QColor +from PyQt5.QtWidgets import QWidget, QGraphicsBlurEffect +from PyQt5.QtCore import Qt + +from time import sleep class Ui_MainWindow(QtWidgets.QMainWindow): @@ -23,51 +28,185 @@ class Ui_MainWindow(QtWidgets.QMainWindow): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") - MainWindow.resize(475, 226) + MainWindow.resize(534, 226) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") - self.horizontalLayout_3 = QtWidgets.QHBoxLayout() - self.horizontalLayout_3.setObjectName("horizontalLayout_3") - self.label_4 = QtWidgets.QLabel(self.centralwidget) - self.label_4.setObjectName("label_4") - self.horizontalLayout_3.addWidget(self.label_4) - self.maxmb_t = QtWidgets.QLineEdit(self.centralwidget) - self.maxmb_t.setObjectName("maxmb_t") - self.horizontalLayout_3.addWidget(self.maxmb_t) - self.gridLayout.addLayout(self.horizontalLayout_3, 2, 1, 1, 1) - self.pushButton = QtWidgets.QPushButton(self.centralwidget) - self.pushButton.setObjectName("pushButton") - self.gridLayout.addWidget(self.pushButton, 4, 4, 1, 1) - self.label = QtWidgets.QLabel(self.centralwidget) - self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 0, 1, 1, 4) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setObjectName("label_3") self.horizontalLayout_2.addWidget(self.label_3) self.username = QtWidgets.QLineEdit(self.centralwidget) + self.username.setStyleSheet("QLineEdit {\n" +" border-top: none;\n" +" border-left: none;\n" +" border-right: none;\n" +" border-bottom: 1px solid black;\n" +" background-color: transparent;\n" +" }\n" +" \n" +" QLineEdit:focus {\n" +" border-bottom: 1px solid #2a70f4;\n" +" }\n" +" \"\"\")") self.username.setObjectName("username") self.horizontalLayout_2.addWidget(self.username) - self.gridLayout.addLayout(self.horizontalLayout_2, 2, 2, 1, 3) - spacerItem = QtWidgets.QSpacerItem(454, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem, 1, 1, 1, 4) + self.gridLayout.addLayout(self.horizontalLayout_2, 1, 2, 1, 3) + self.label = QtWidgets.QLabel(self.centralwidget) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 0, 1, 1, 4) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setObjectName("label_2") self.horizontalLayout.addWidget(self.label_2) self.game_c = QtWidgets.QComboBox(self.centralwidget) + self.game_c.setStyleSheet("QComboBox {\n" +" background-color: white;\n" +" color: black;\n" +" border: 1px solid lightgray;\n" +" border-radius: 15px;\n" +" padding-left: 15px;\n" +" }\n" +" \n" +" QComboBox:on {\n" +" border: 1px solid #63acfb;\n" +" }\n" +"\n" +" QComboBox::drop-down {\n" +" width: 22px;\n" +" border-left: 1px solid lightgray;\n" +" border-top-right-radius: 15px;\n" +" border-bottom-right-radius: 15px;\n" +" }\n" +" \n" +" QComboBox::drop-down:on {\n" +" border-left: 1px solid #63acfb;\n" +" }\n" +"\n" +" QComboBox::down-arrow {\n" +" width: 16px;\n" +" height: 16px;\n" +" image: url(PATH_TO_IMG);\n" +" }\n" +"\n" +" QComboBox::down-arrow:on {\n" +" image: url(PATH_TO_IMG);\n" +" }\n" +"\n" +" QComboBox QAbstractItemView {\n" +" color: black;\n" +" border: none;\n" +" outline: none;\n" +" background-color: whitesmoke;\n" +" }\n" +"\n" +" QComboBox QScrollBar:vertical {\n" +" width: 2px;\n" +" background-color: white;\n" +" }\n" +"\n" +" QComboBox QScrollBar::handle:vertical {\n" +" background-color: #b2bdaf;\n" +" }\n" +" \"\"\")") self.game_c.setObjectName("game_c") self.game_c.addItem("") self.game_c.addItem("") self.horizontalLayout.addWidget(self.game_c) - self.gridLayout.addLayout(self.horizontalLayout, 3, 1, 1, 2) + self.gridLayout.addLayout(self.horizontalLayout, 2, 1, 1, 2) + self.pushButton = QtWidgets.QPushButton(self.centralwidget) + self.pushButton.setStyleSheet("QPushButton {\n" +" background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #47a7ed, stop: 1 #a967b2);\n" +" color: white;\n" +" font-size: 20px;\n" +" font-weight: bold;\n" +" border-radius: 25px;\n" +" }\n" +" \n" +" QPushButton:hover {\n" +" background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #459ee0, stop: 1 #995da1);\n" +" }\n" +" \n" +" QPushButton:pressed {\n" +" background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #4093d1, stop: 1 #87538e);\n" +" }\n" +" \"\"\")") + self.pushButton.setObjectName("pushButton") + self.gridLayout.addWidget(self.pushButton, 4, 3, 1, 1) + self.settings = QtWidgets.QPushButton(self.centralwidget) + self.settings.setStyleSheet("QPushButton {\n" +" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);\n" +" color: white;\n" +" font-size: 20px;\n" +" font-weight: bold;\n" +" border-radius: 25px;\n" +" }\n" +"\n" +" QPushButton:hover {\n" +" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);\n" +" }\n" +"\n" +" QPushButton:pressed {\n" +" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);\n" +" }\n" +" \"\"\")") + self.settings.setObjectName("settings") + self.gridLayout.addWidget(self.settings, 4, 4, 1, 1) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.label_4 = QtWidgets.QLabel(self.centralwidget) + self.label_4.setObjectName("label_4") + self.horizontalLayout_3.addWidget(self.label_4) + self.maxmb_t = QtWidgets.QLineEdit(self.centralwidget) + self.maxmb_t.setStyleSheet("QLineEdit {\n" +" border-top: none;\n" +" border-left: none;\n" +" border-right: none;\n" +" border-bottom: 1px solid black;\n" +" background-color: transparent;\n" +" }\n" +" \n" +" QLineEdit:focus {\n" +" border-bottom: 1px solid #2a70f4;\n" +" }\n" +" \"\"\")") + self.maxmb_t.setObjectName("maxmb_t") + self.horizontalLayout_3.addWidget(self.maxmb_t) + self.gridLayout.addLayout(self.horizontalLayout_3, 1, 1, 1, 1) self.run_game = QtWidgets.QPushButton(self.centralwidget) + self.run_game.setStyleSheet("QPushButton {\n" +" background-color: #57bd6a;\n" +" color: #f9ffff;\n" +" font-size: 20px;\n" +" font-weight: bold;\n" +" border-radius: 5px;\n" +" }\n" +"\n" +" QPushButton:pressed {\n" +" background-color: #4eaa5f;\n" +" }\n" +" \"\"\")") self.run_game.setObjectName("run_game") - self.gridLayout.addWidget(self.run_game, 4, 3, 1, 1) + self.gridLayout.addWidget(self.run_game, 4, 1, 1, 1) + self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget) + self.pushButton_2.setStyleSheet("QPushButton {\n" +" background-color: #292929;\n" +" border-radius: 5px;\n" +" font-size: 20px;\n" +" font-weight: bold;\n" +" color: white;\n" +" border: 1px solid white;\n" +" }\n" +"\n" +" QPushButton:pressed {\n" +" background-color: black;\n" +" }\n" +" \"\"\")") + self.pushButton_2.setObjectName("pushButton_2") + self.gridLayout.addWidget(self.pushButton_2, 2, 3, 1, 2) MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") @@ -84,6 +223,22 @@ class Ui_MainWindow(QtWidgets.QMainWindow): maxmb = self.maxmb_t.text() username_text = self.username.text() version = self.game_c.currentText() + if version == '1.12.2 Forge': + QMessageBox.critical(self, 'Error', '启动失败!版本不支持!') + return 'error' + else: + pass + # 检测maxmb变量是否为数 + if username_text == None or maxmb == None or version == None: + QMessageBox.critical(self, 'ERROR', '请填完信息', QMessageBox.Ok) + if maxmb.isnumeric(): + pass + else: + QMessageBox.critical(self, 'Error', '最大内存必须是数字!', QMessageBox.Ok) + return 'maxmb' + # 检测maxmb变量是否小于900 + if int(maxmb) < 900: + QMessageBox.critical(self, 'ERROR', '内存设置必须要900mb以上!', QMessageBox.Ok) with open("username.txt", "w") as file: file.write(username_text) pass @@ -92,47 +247,291 @@ class Ui_MainWindow(QtWidgets.QMainWindow): with open('version.txt', 'w') as version_f: version_f.write(version) print(maxmb, username_text, version) - if version == '1.8.9 Forge': - version = 'vapeV4.04' - with open('version.txt', 'w') as version_f: - version_f.write(version) - try: - with shelve.open('main') as db: - db['startgame'] = True - db.close() - os.startfile('start_game.bat') - except: - QMessageBox.critical(self, 'ERROR', '无法启动游戏,请尝试重新安装。') + try: + self.save_pro() + os.startfile('start_game.bat') + except: + QMessageBox.critical(self, 'Error' ,'启动失败!未知错误?' ,QMessageBox.Ok) + return 'error' - else: - QMessageBox.critical(self, 'ERROR', '暂未做完......', QMessageBox.Close) + def save_pro(self): + with shelve.open('main') as db: + db['username'] = self.username.text() + db['maxmb'] = self.maxmb_t.text() + db.close() + + def dq_pro(self): + # 读取配置 + with shelve.open('main') as db: + username = db.get('username') + maxmb = db.get('maxmb') + version = db.get('version') + self.username.setText(username) + self.maxmb_t.setText(maxmb) + self.game_c.setCurrentText(version) + db.close() def kg(self): - # run - QMessageBox.information(self, 'warning', '启动后请不要关闭server.exe这个程序!!!!', QMessageBox.Ok) - QMessageBox.warning(self, '注意!', '可能有病毒,请小心使用!!') - try: - os.startfile('kg.exe') - except: - QMessageBox.critical(self, 'ERROR', '无法启动,请尝试重新安装!', QMessageBox.Ok) + # 打开Kg_Ui窗口 + self.kg_ui = Kg_Ui() + self.kg_ui.show() + + def open_setting_window(self): + # 打开设置窗口 + self.s_ui = setting_UI() + self.s_ui.show() def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate - MainWindow.setWindowTitle(_translate("MainWindow", "Pmcl 1.0.1")) - self.label_4.setText(_translate("MainWindow", "最大内存:")) - self.maxmb_t.setText(_translate("MainWindow", "1145")) - self.pushButton.setText(_translate("MainWindow", "开vape")) - self.label.setText(_translate("MainWindow", - "

Python minecraft launcher V1.0.1

")) + MainWindow.setWindowTitle(_translate("MainWindow", "Python minecraft launcher V1.1")) self.label_3.setText(_translate("MainWindow", "游戏姓名:")) self.username.setText(_translate("MainWindow", "sb001")) - self.label_2.setText(_translate("MainWindow", - "

游戏版本:

")) + self.label.setText(_translate("MainWindow", "

Python minecraft launcher V1.1

")) + self.label_2.setText(_translate("MainWindow", "

游戏版本:

")) self.game_c.setItemText(0, _translate("MainWindow", "1.8.9 Forge")) self.game_c.setItemText(1, _translate("MainWindow", "1.12.2 Forge")) + self.pushButton.setText(_translate("MainWindow", "开vape")) + self.settings.setText(_translate("MainWindow", "设置")) + self.label_4.setText(_translate("MainWindow", "最大内存:")) + self.maxmb_t.setText(_translate("MainWindow", "1145")) self.run_game.setText(_translate("MainWindow", "开始游戏")) + self.pushButton_2.setText(_translate("MainWindow", "读取配置")) + self.pushButton_2.clicked.connect(self.dq_pro) self.pushButton.clicked.connect(self.kg) self.run_game.clicked.connect(self.run) + self.settings.clicked.connect(self.open_setting_window) + + +class setting_UI(QtWidgets.QDialog): + def __init__(self): + super(setting_UI, self).__init__() + self.setupUi(self) + self.setFixedSize(self.width(), self.height()) + + def setupUi(self, Form): + Form.setObjectName("Form") + Form.resize(358, 300) + self.layoutWidget = QtWidgets.QWidget(Form) + self.layoutWidget.setGeometry(QtCore.QRect(90, 50, 172, 201)) + self.layoutWidget.setObjectName("layoutWidget") + self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget) + self.verticalLayout.setContentsMargins(0, 0, 0, 0) + self.verticalLayout.setObjectName("verticalLayout") + self.pushButton = QtWidgets.QPushButton(self.layoutWidget) + self.pushButton.setStyleSheet("QPushButton {\n" +" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);\n" +" color: white;\n" +" font-size: 20px;\n" +" font-weight: bold;\n" +" border-radius: 25px;\n" +" }\n" +"\n" +" QPushButton:hover {\n" +" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);\n" +" }\n" +"\n" +" QPushButton:pressed {\n" +" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);\n" +" }\n" +" \"\"\")") + self.pushButton.setObjectName("pushButton") + self.verticalLayout.addWidget(self.pushButton) + self.pushButton_2 = QtWidgets.QPushButton(self.layoutWidget) + self.pushButton_2.setStyleSheet("QPushButton {\n" +" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);\n" +" color: white;\n" +" font-size: 20px;\n" +" font-weight: bold;\n" +" border-radius: 25px;\n" +" }\n" +"\n" +" QPushButton:hover {\n" +" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);\n" +" }\n" +"\n" +" QPushButton:pressed {\n" +" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);\n" +" }\n" +" \"\"\")") + self.pushButton_2.setObjectName("pushButton_2") + self.verticalLayout.addWidget(self.pushButton_2) + self.pushButton_5 = QtWidgets.QPushButton(self.layoutWidget) + self.pushButton_5.setStyleSheet("QPushButton {\n" +" background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #47a7ed, stop: 1 #a967b2);\n" +" color: white;\n" +" font-size: 20px;\n" +" font-weight: bold;\n" +" border-radius: 25px;\n" +" }\n" +" \n" +" QPushButton:hover {\n" +" background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #459ee0, stop: 1 #995da1);\n" +" }\n" +" \n" +" QPushButton:pressed {\n" +" background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #4093d1, stop: 1 #87538e);\n" +" }\n" +" \"\"\")") + self.pushButton_5.setObjectName("pushButton_5") + self.verticalLayout.addWidget(self.pushButton_5) + self.label = QtWidgets.QLabel(Form) + self.label.setGeometry(QtCore.QRect(160, 10, 72, 31)) + self.label.setObjectName("label") + + self.retranslateUi(Form) + QtCore.QMetaObject.connectSlotsByName(Form) + + def vape(self): + # 重置vape启动状态 + QMessageBox.information(self, '提示', '处理成功!', QMessageBox.Ok) + with shelve.open('main') as db: + db['vaper'] = False + db.close() + self.close() + + def game(self): + # 重置游戏启动状态 + with shelve.open('main') as db: + db['startgame'] = False + db.close() + QMessageBox.information(self, '提示', '处理成功!', QMessageBox.Ok) + self.close() + + def del_pro(self): + # 删除配置 + with shelve.open('main') as db: + db['username'] = '' + db['maxmb'] = '' + db['version'] = '' + db.close() + QMessageBox.information(self, '提示', '处理成功!') + self.close() + + def retranslateUi(self, Form): + _translate = QtCore.QCoreApplication.translate + Form.setWindowTitle(_translate("Form", "设置")) + self.pushButton.setText(_translate("Form", "重置vape启动状态")) + self.pushButton_2.setText(_translate("Form", "重置游戏启动状态")) + self.pushButton_5.setText(_translate("Form", "删除配置")) + self.label.setText(_translate("Form", "

设置

")) + self.pushButton.clicked.connect(self.vape) + self.pushButton_2.clicked.connect(self.game) + self.pushButton_5.clicked.connect(self.del_pro) + + +class Kg_Ui(QtWidgets.QDialog): + def __init__(self): + super(Kg_Ui, self).__init__() + self.setupUi(self) + self.setFixedSize(self.width(), self.height()) + + def setupUi(self, Form): + Form.setObjectName("Form") + Form.resize(306, 250) + self.pushButton = QtWidgets.QPushButton(Form) + self.pushButton.setGeometry(QtCore.QRect(90, 190, 121, 23)) + self.pushButton.setStyleSheet("QPushButton {\n" + " background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);\n" + " color: white;\n" + " font-size: 20px;\n" + " font-weight: bold;\n" + " border-radius: 25px;\n" + " }\n" + "\n" + " QPushButton:hover {\n" + " background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);\n" + " }\n" + "\n" + " QPushButton:pressed {\n" + " background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);\n" + " }\n" + " \"\"\")") + self.pushButton.setObjectName("pushButton") + self.label = QtWidgets.QLabel(Form) + self.label.setGeometry(QtCore.QRect(70, 20, 171, 31)) + self.label.setObjectName("label") + self.label_2 = QtWidgets.QLabel(Form) + self.label_2.setGeometry(QtCore.QRect(70, 100, 51, 21)) + self.label_2.setObjectName("label_2") + self.comboBox = QtWidgets.QComboBox(Form) + self.comboBox.setGeometry(QtCore.QRect(120, 100, 111, 22)) + self.comboBox.setStyleSheet("QComboBox {\n" + " background-color: qlineargradient(x1:1, y1:0, x2:1, y2:1, stop:0 #f5f5f7, stop:1 #dedee0);\n" + " border: 1px solid whitesmoke;\n" + " border-radius: 3px;\n" + " padding-left: 15px;\n" + " color: gray;\n" + " }\n" + "\n" + " QComboBox::drop-down {\n" + " width: 22px;\n" + " border-top-right-radius: 3px;\n" + " border-bottom-right-radius: 3px;\n" + " }\n" + "\n" + " QComboBox::down-arrow {\n" + " width: 16px;\n" + " height: 16px;\n" + " image: url(PATH_TO_IMG);\n" + " }\n" + "\n" + " QComboBox QAbstractItemView {\n" + " color: gray;\n" + " border: none;\n" + " outline: none;\n" + " background-color: #dedee0;\n" + " }\n" + "\n" + " QComboBox QScrollBar:vertical {\n" + " width: 2px;\n" + " background-color: white;\n" + " }\n" + "\n" + " QComboBox QScrollBar::handle:vertical {\n" + " background-color: #b2bdaf;\n" + " }\n" + " \"\"\")") + self.comboBox.setObjectName("comboBox") + self.comboBox.addItem("") + self.comboBox.addItem("") + + self.retranslateUi(Form) + QtCore.QMetaObject.connectSlotsByName(Form) + + def kg_run(self): + version_kg = self.comboBox.currentText() + if version_kg == 'Vape lite': + '''with shelve.open('main') as db: + db['vape_v'] == 'lite' + db.close()''' + QMessageBox.information( + self, '提示', '外挂获取渠道非官方渠道,请小心使用!', QMessageBox.Ok) + try: + os.startfile('fix.bat') + flie = os.getcwd() + os.system(f"'Kangaroo Patcher.exe' Vape_Lite.exe") + except: + QMessageBox.critical( + self, 'ERROR', '启动失败!请检查文件!', QMessageBox.Ok) + elif version_kg == 'Vape V4': + '''with shelve.open('main') as db: + db['vape_v'] == 'v4' + db.close()''' + QMessageBox.critical(self, 'ERROR', '无法使用!', QMessageBox.Ok) + # 关闭窗口 + self.close() + + def retranslateUi(self, Form): + _translate = QtCore.QCoreApplication.translate + Form.setWindowTitle(_translate("Form", "选择外挂")) + self.pushButton.setText(_translate("Form", "确定")) + self.label.setText(_translate( + "Form", "

请选择外挂

")) + self.label_2.setText(_translate( + "Form", "

版本:

")) + self.comboBox.setItemText(0, _translate("Form", "Vape lite")) + self.comboBox.setItemText(1, _translate("Form", "Vape V4")) + self.pushButton.clicked.connect(self.kg_run) if __name__ == '__main__': @@ -141,4 +540,4 @@ if __name__ == '__main__': ui = Ui_MainWindow() ui.setupUi(mainloop) mainloop.show() - sys.exit(app.exec_()) + sys.exit(app.exec_()) \ No newline at end of file diff --git a/pmcl_main.ui b/pmcl_main.ui index 4d6d1a3..44bdc75 100644 --- a/pmcl_main.ui +++ b/pmcl_main.ui @@ -6,48 +6,16 @@ 0 0 - 475 + 534 226 - MainWindow + Python minecraft launcher V1.1 - - - - - - 最大内存: - - - - - - - 1145 - - - - - - - - - 开vape - - - - - - - <html><head/><body><p><span style=" font-size:18pt; font-weight:600; color:#1c33fe;">python minecraft launcher</span></p></body></html> - - - - + @@ -61,6 +29,20 @@ + + QLineEdit { + border-top: none; + border-left: none; + border-right: none; + border-bottom: 1px solid black; + background-color: transparent; + } + + QLineEdit:focus { + border-bottom: 1px solid #2a70f4; + } + """) + sb001 @@ -68,20 +50,14 @@ - - - - Qt::Horizontal + + + + <html><head/><body><p><span style=" font-size:18pt; font-weight:600; color:#1c33fe;">Python minecraft launcher V1.1</span></p></body></html> - - - 454 - 20 - - - + - + @@ -95,6 +71,57 @@ + + QComboBox { + background-color: white; + color: black; + border: 1px solid lightgray; + border-radius: 15px; + padding-left: 15px; + } + + QComboBox:on { + border: 1px solid #63acfb; + } + + QComboBox::drop-down { + width: 22px; + border-left: 1px solid lightgray; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + } + + QComboBox::drop-down:on { + border-left: 1px solid #63acfb; + } + + QComboBox::down-arrow { + width: 16px; + height: 16px; + image: url(PATH_TO_IMG); + } + + QComboBox::down-arrow:on { + image: url(PATH_TO_IMG); + } + + QComboBox QAbstractItemView { + color: black; + border: none; + outline: none; + background-color: whitesmoke; + } + + QComboBox QScrollBar:vertical { + width: 2px; + background-color: white; + } + + QComboBox QScrollBar::handle:vertical { + background-color: #b2bdaf; + } + """) + 1.8.9 Forge @@ -110,12 +137,130 @@ + + + QPushButton { + background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #47a7ed, stop: 1 #a967b2); + color: white; + font-size: 20px; + font-weight: bold; + border-radius: 25px; + } + + QPushButton:hover { + background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #459ee0, stop: 1 #995da1); + } + + QPushButton:pressed { + background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #4093d1, stop: 1 #87538e); + } + """) + + + 开vape + + + + + + + QPushButton { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black); + color: white; + font-size: 20px; + font-weight: bold; + border-radius: 25px; + } + + QPushButton:hover { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black); + } + + QPushButton:pressed { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black); + } + """) + + + 设置 + + + + + + + + + 最大内存: + + + + + + + QLineEdit { + border-top: none; + border-left: none; + border-right: none; + border-bottom: 1px solid black; + background-color: transparent; + } + + QLineEdit:focus { + border-bottom: 1px solid #2a70f4; + } + """) + + + 1145 + + + + + + + + QPushButton { + background-color: #57bd6a; + color: #f9ffff; + font-size: 20px; + font-weight: bold; + border-radius: 5px; + } + + QPushButton:pressed { + background-color: #4eaa5f; + } + """) + 开始游戏 + + + + QPushButton { + background-color: #292929; + border-radius: 5px; + font-size: 20px; + font-weight: bold; + color: white; + border: 1px solid white; + } + + QPushButton:pressed { + background-color: black; + } + """) + + + 读取配置 + + + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f9ec16f --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +PyQt5~=5.15.9 \ No newline at end of file diff --git a/settings.ui b/settings.ui new file mode 100644 index 0000000..fb122de --- /dev/null +++ b/settings.ui @@ -0,0 +1,119 @@ + + + Form + + + + 0 + 0 + 358 + 300 + + + + 设置 + + + + + 90 + 50 + 172 + 201 + + + + + + + QPushButton { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black); + color: white; + font-size: 20px; + font-weight: bold; + border-radius: 25px; + } + + QPushButton:hover { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black); + } + + QPushButton:pressed { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black); + } + """) + + + 重置vape启动状态 + + + + + + + QPushButton { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black); + color: white; + font-size: 20px; + font-weight: bold; + border-radius: 25px; + } + + QPushButton:hover { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black); + } + + QPushButton:pressed { + background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black); + } + """) + + + 重置游戏启动状态 + + + + + + + QPushButton { + background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #47a7ed, stop: 1 #a967b2); + color: white; + font-size: 20px; + font-weight: bold; + border-radius: 25px; + } + + QPushButton:hover { + background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #459ee0, stop: 1 #995da1); + } + + QPushButton:pressed { + background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #4093d1, stop: 1 #87538e); + } + """) + + + 删除配置 + + + + + + + + + 160 + 10 + 72 + 31 + + + + <html><head/><body><p><span style=" font-size:14pt; font-weight:600;">设置</span></p></body></html> + + + + + +