mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 05:16:59 +03:00
Implemented automatically saved settings for exporting mods. Signed-off-by: Finlay <fireeaglefin@gmail.com>
This commit is contained in:
parent
bf8d1ca1f8
commit
34447863e2
5 changed files with 79 additions and 5 deletions
|
|
@ -81,6 +81,9 @@ BaseInstance::BaseInstance(SettingsObject* globalSettings, std::unique_ptr<Setti
|
|||
m_settings->registerSetting("iconKey", "default");
|
||||
m_settings->registerSetting("notes", "");
|
||||
|
||||
m_settings->registerSetting("exportTemplate", "");
|
||||
m_settings->registerSetting("exportSettings", 0);
|
||||
|
||||
m_settings->registerSetting("lastLaunchTime", 0);
|
||||
m_settings->registerSetting("totalTimePlayed", 0);
|
||||
if (m_settings->get("totalTimePlayed").toLongLong() < 0)
|
||||
|
|
@ -398,6 +401,30 @@ void BaseInstance::setName(QString val)
|
|||
emit propertiesChanged(this);
|
||||
}
|
||||
|
||||
void BaseInstance::setExportTemplate(QString val)
|
||||
{
|
||||
// FIXME: if no change, do not set. setting involves saving a file.
|
||||
m_settings->set("exportTemplate", val);
|
||||
emit propertiesChanged(this);
|
||||
}
|
||||
|
||||
QString BaseInstance::exportTemplate() const
|
||||
{
|
||||
return m_settings->get("exportTemplate").toString();
|
||||
}
|
||||
|
||||
void BaseInstance::setExportSettings(int val)
|
||||
{
|
||||
// FIXME: if no change, do not set. setting involves saving a file.
|
||||
m_settings->set("exportSettings", val);
|
||||
emit propertiesChanged(this);
|
||||
}
|
||||
|
||||
int BaseInstance::exportSettings() const
|
||||
{
|
||||
return m_settings->get("exportSettings").toInt();
|
||||
}
|
||||
|
||||
bool BaseInstance::syncInstanceDirName(const QString& newRoot) const
|
||||
{
|
||||
auto oldRoot = instanceRoot();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue