Implemented the rest of the global game settings dialog fields and added support for optional in serialization
This commit is contained in:
1 parent
ffe4a99baa
commit
03dc0f3d05
8 files changed
+899
-41
No files matched your search
@@ -4,15 +4,91 @@
|
||||
|
||||
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings &globalGameSettings)
|
||||
{
|
||||
Q_UNUSED(globalGameSettings);
|
||||
//ds << globalGameSettings.;
|
||||
ds << globalGameSettings.startInFullscreenMode
|
||||
<< globalGameSettings.scaling
|
||||
<< globalGameSettings.interpolateBetweenColors
|
||||
<< globalGameSettings.colorOutsideRoomRegion
|
||||
<< globalGameSettings.resizable
|
||||
<< globalGameSettings.topMost
|
||||
<< globalGameSettings.noBorder
|
||||
<< globalGameSettings.noButtons
|
||||
<< globalGameSettings.displayCursor
|
||||
<< globalGameSettings.freezeWhenFocusLost
|
||||
<< globalGameSettings.disableScreensaver
|
||||
<< globalGameSettings.resolution
|
||||
<< globalGameSettings.vsync;
|
||||
return ds;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings &globalGameSettings)
|
||||
{
|
||||
Q_UNUSED(globalGameSettings);
|
||||
//ds >> globalGameSettings.;
|
||||
ds >> globalGameSettings.startInFullscreenMode
|
||||
>> globalGameSettings.scaling
|
||||
>> globalGameSettings.interpolateBetweenColors
|
||||
>> globalGameSettings.colorOutsideRoomRegion
|
||||
>> globalGameSettings.resizable
|
||||
>> globalGameSettings.topMost
|
||||
>> globalGameSettings.noBorder
|
||||
>> globalGameSettings.noButtons
|
||||
>> globalGameSettings.displayCursor
|
||||
>> globalGameSettings.freezeWhenFocusLost
|
||||
>> globalGameSettings.disableScreensaver
|
||||
>> globalGameSettings.resolution
|
||||
>> globalGameSettings.vsync;
|
||||
return ds;
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::FixedScale &fixedScale)
|
||||
{
|
||||
ds << fixedScale.percent;
|
||||
return ds;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::FixedScale &fixedScale)
|
||||
{
|
||||
ds >> fixedScale.percent;
|
||||
return ds;
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::KeepAspectRatio &keepAspectRatio)
|
||||
{
|
||||
Q_UNUSED(keepAspectRatio);
|
||||
//ds << keepAspectRatio.;
|
||||
return ds;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::KeepAspectRatio &keepAspectRatio)
|
||||
{
|
||||
Q_UNUSED(keepAspectRatio);
|
||||
//ds >> keepAspectRatio.;
|
||||
return ds;
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::FullScale &fullScale)
|
||||
{
|
||||
Q_UNUSED(fullScale);
|
||||
//ds << fullScale.;
|
||||
return ds;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::FullScale &fullScale)
|
||||
{
|
||||
Q_UNUSED(fullScale);
|
||||
//ds >> fullScale.;
|
||||
return ds;
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &ds, const GlobalGameSettings::Resolution &resolution)
|
||||
{
|
||||
Q_UNUSED(resolution);
|
||||
//ds << resolution.;
|
||||
return ds;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &ds, GlobalGameSettings::Resolution &resolution)
|
||||
{
|
||||
Q_UNUSED(resolution);
|
||||
//ds >> resolution.;
|
||||
return ds;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user