Combine launch buttons in Instance window, persist profiler
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
		| @@ -1,7 +1,8 @@ | ||||
| // SPDX-License-Identifier: GPL-3.0-only | ||||
| /* | ||||
|  *  PolyMC - Minecraft Launcher | ||||
|  *  Prism Launcher - Minecraft Launcher | ||||
|  *  Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net> | ||||
|  *  Copyright (C) 2023 TheKodeToad <TheKodeToad@proton.me> | ||||
|  * | ||||
|  *  This program is free software: you can redistribute it and/or modify | ||||
|  *  it under the terms of the GNU General Public License as published by | ||||
| @@ -37,6 +38,7 @@ | ||||
|  | ||||
| #include <QMainWindow> | ||||
| #include <QSystemTrayIcon> | ||||
| #include <QToolButton> | ||||
|  | ||||
| #include "LaunchController.h" | ||||
| #include "launch/LaunchTask.h" | ||||
| @@ -53,7 +55,7 @@ class InstanceWindow : public QMainWindow, public BasePageContainer | ||||
|  | ||||
| public: | ||||
|     explicit InstanceWindow(InstancePtr proc, QWidget *parent = 0); | ||||
|     virtual ~InstanceWindow(); | ||||
|     virtual ~InstanceWindow() = default; | ||||
|  | ||||
|     bool selectPage(QString pageId) override; | ||||
|     void refreshContainer() override; | ||||
| @@ -71,11 +73,6 @@ signals: | ||||
|  | ||||
| private | ||||
| slots: | ||||
|     void on_closeButton_clicked(); | ||||
|     void on_btnKillMinecraft_clicked(); | ||||
|     void on_btnLaunchMinecraftOffline_clicked(); | ||||
|     void on_btnLaunchMinecraftDemo_clicked(); | ||||
|  | ||||
|     void instanceLaunchTaskChanged(shared_qobject_ptr<LaunchTask> proc); | ||||
|     void runningStateChanged(bool running); | ||||
|     void on_instanceStatusChanged(BaseInstance::Status, BaseInstance::Status newStatus); | ||||
| @@ -84,7 +81,7 @@ protected: | ||||
|     void closeEvent(QCloseEvent *) override; | ||||
|  | ||||
| private: | ||||
|     void updateLaunchButtons(); | ||||
|     void updateButtons(); | ||||
|  | ||||
| private: | ||||
|     shared_qobject_ptr<LaunchTask> m_proc; | ||||
| @@ -92,7 +89,6 @@ private: | ||||
|     bool m_doNotSave = false; | ||||
|     PageContainer *m_container = nullptr; | ||||
|     QPushButton *m_closeButton = nullptr; | ||||
|     QToolButton *m_launchButton = nullptr; | ||||
|     QPushButton *m_killButton = nullptr; | ||||
|     QPushButton *m_launchOfflineButton = nullptr; | ||||
|     QPushButton *m_launchDemoButton = nullptr; | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 TheKodeToad
					TheKodeToad