mirror of https://github.com/AxioDL/metaforce.git
Add Deep Color option to LaunchMenu
This commit is contained in:
parent
b4972dbad9
commit
ac46503212
|
@ -37,13 +37,15 @@ LaunchMenu::LaunchMenu(hecl::CVarCommons& commons, QWidget* parent)
|
||||||
initAnisoAction(QStringLiteral("8"));
|
initAnisoAction(QStringLiteral("8"));
|
||||||
initAnisoAction(QStringLiteral("16"));
|
initAnisoAction(QStringLiteral("16"));
|
||||||
|
|
||||||
initDeveloperMode();
|
|
||||||
m_apiMenu.addActions(m_apiGroup.actions());
|
m_apiMenu.addActions(m_apiGroup.actions());
|
||||||
m_msaaMenu.addActions(m_msaaGroup.actions());
|
m_msaaMenu.addActions(m_msaaGroup.actions());
|
||||||
m_anisoMenu.addActions(m_anisoGroup.actions());
|
m_anisoMenu.addActions(m_anisoGroup.actions());
|
||||||
addMenu(&m_apiMenu);
|
addMenu(&m_apiMenu);
|
||||||
addMenu(&m_msaaMenu);
|
addMenu(&m_msaaMenu);
|
||||||
addMenu(&m_anisoMenu);
|
addMenu(&m_anisoMenu);
|
||||||
|
|
||||||
|
initDeepColor();
|
||||||
|
initDeveloperMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LaunchMenu::initApiAction(const QString& action)
|
void LaunchMenu::initApiAction(const QString& action)
|
||||||
|
@ -73,6 +75,14 @@ void LaunchMenu::initAnisoAction(const QString& action)
|
||||||
act->setChecked(true);
|
act->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LaunchMenu::initDeepColor()
|
||||||
|
{
|
||||||
|
QAction* act = addAction("Deep Color");
|
||||||
|
act->setCheckable(true);
|
||||||
|
act->setChecked(m_commons.getDeepColor());
|
||||||
|
connect(act, SIGNAL(triggered()), this, SLOT(deepColorTriggered()));
|
||||||
|
}
|
||||||
|
|
||||||
void LaunchMenu::initDeveloperMode()
|
void LaunchMenu::initDeveloperMode()
|
||||||
{
|
{
|
||||||
QAction* act = addAction("&Developer Mode");
|
QAction* act = addAction("&Developer Mode");
|
||||||
|
@ -101,6 +111,12 @@ void LaunchMenu::anisoTriggered()
|
||||||
m_commons.serialize();
|
m_commons.serialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LaunchMenu::deepColorTriggered()
|
||||||
|
{
|
||||||
|
m_commons.setDeepColor(qobject_cast<QAction*>(sender())->isChecked());
|
||||||
|
m_commons.serialize();
|
||||||
|
}
|
||||||
|
|
||||||
void LaunchMenu::developerModeTriggered()
|
void LaunchMenu::developerModeTriggered()
|
||||||
{
|
{
|
||||||
hecl::CVarManager::instance()->setDeveloperMode(qobject_cast<QAction*>(sender())->isChecked(), true);
|
hecl::CVarManager::instance()->setDeveloperMode(qobject_cast<QAction*>(sender())->isChecked(), true);
|
||||||
|
|
|
@ -20,6 +20,7 @@ class LaunchMenu : public QMenu
|
||||||
void initApiAction(const QString& action);
|
void initApiAction(const QString& action);
|
||||||
void initMsaaAction(const QString& action);
|
void initMsaaAction(const QString& action);
|
||||||
void initAnisoAction(const QString& action);
|
void initAnisoAction(const QString& action);
|
||||||
|
void initDeepColor();
|
||||||
void initDeveloperMode();
|
void initDeveloperMode();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -29,6 +30,7 @@ public slots:
|
||||||
void apiTriggered();
|
void apiTriggered();
|
||||||
void msaaTriggered();
|
void msaaTriggered();
|
||||||
void anisoTriggered();
|
void anisoTriggered();
|
||||||
|
void deepColorTriggered();
|
||||||
void developerModeTriggered();
|
void developerModeTriggered();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue