mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-11-20 08:10:11 +00:00
bc6d1b5304
* The resulting instance window can be closed at any point. * Main window is kept open and running instances are marked with a badge. * Multiple instances can now run from the same MultiMC - it's even more **multi** now. * MultiMC can be entirely closed, keeping Minecraft(s) running.
27 lines
618 B
C++
27 lines
618 B
C++
#pragma once
|
|
#include "pages/BasePageProvider.h"
|
|
#include "MultiMC.h"
|
|
#include "pagedialog/PageDialog.h"
|
|
#include "InstancePageProvider.h"
|
|
#include <settings/SettingsObject.h>
|
|
#include <BaseInstance.h>
|
|
|
|
/*
|
|
* FIXME: this is a fragment. find a better place for it.
|
|
*/
|
|
namespace SettingsUI
|
|
{
|
|
template <typename T>
|
|
void ShowPageDialog(T raw_provider, QWidget * parent, QString open_page = QString())
|
|
{
|
|
auto provider = std::dynamic_pointer_cast<BasePageProvider>(raw_provider);
|
|
if(!provider)
|
|
return;
|
|
{
|
|
SettingsObject::Lock lock(MMC->settings());
|
|
PageDialog dlg(provider, open_page, parent);
|
|
dlg.exec();
|
|
}
|
|
}
|
|
}
|