@ -37,40 +37,26 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "ui/pages/BasePage.h"
|
||||
#include <Application.h>
|
||||
#include "tasks/Task.h"
|
||||
#include "ui/pages/BasePage.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
namespace Ui {
|
||||
class CustomPage;
|
||||
}
|
||||
|
||||
class NewInstanceDialog;
|
||||
|
||||
class CustomPage : public QWidget, public BasePage
|
||||
{
|
||||
class CustomPage : public QWidget, public BasePage {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CustomPage(NewInstanceDialog *dialog, QWidget *parent = 0);
|
||||
public:
|
||||
explicit CustomPage(NewInstanceDialog* dialog, QWidget* parent = 0);
|
||||
virtual ~CustomPage();
|
||||
virtual QString displayName() const override
|
||||
{
|
||||
return tr("Custom");
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return APPLICATION->getThemedIcon("minecraft");
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
return "vanilla";
|
||||
}
|
||||
virtual QString helpPage() const override
|
||||
{
|
||||
return "Vanilla-platform";
|
||||
}
|
||||
virtual QString displayName() const override { return tr("Custom"); }
|
||||
virtual QIcon icon() const override { return APPLICATION->getThemedIcon("minecraft"); }
|
||||
virtual QString id() const override { return "vanilla"; }
|
||||
virtual QString helpPage() const override { return "Vanilla-platform"; }
|
||||
virtual bool shouldDisplay() const override;
|
||||
void retranslate() override;
|
||||
|
||||
@ -80,23 +66,23 @@ public:
|
||||
BaseVersion::Ptr selectedLoaderVersion() const;
|
||||
QString selectedLoader() const;
|
||||
|
||||
public slots:
|
||||
public slots:
|
||||
void setSelectedVersion(BaseVersion::Ptr version);
|
||||
void setSelectedLoaderVersion(BaseVersion::Ptr version);
|
||||
|
||||
private slots:
|
||||
private slots:
|
||||
void filterChanged();
|
||||
void loaderFilterChanged();
|
||||
|
||||
private:
|
||||
private:
|
||||
void refresh();
|
||||
void loaderRefresh();
|
||||
void suggestCurrent();
|
||||
|
||||
private:
|
||||
private:
|
||||
bool initialized = false;
|
||||
NewInstanceDialog *dialog = nullptr;
|
||||
Ui::CustomPage *ui = nullptr;
|
||||
NewInstanceDialog* dialog = nullptr;
|
||||
Ui::CustomPage* ui = nullptr;
|
||||
bool m_versionSetByUser = false;
|
||||
BaseVersion::Ptr m_selectedVersion;
|
||||
BaseVersion::Ptr m_selectedLoaderVersion;
|
||||
|
Reference in New Issue
Block a user