Snap angle and grid size saved as settings

This commit is contained in:
dexy 2020-01-28 00:20:04 +11:00
parent 583cbc28d5
commit 210ae56069
4 changed files with 60 additions and 0 deletions

View File

@ -205,6 +205,15 @@
<setting name="Deferred" serializeAs="String">
<value>True</value>
</setting>
<setting name="SnapRotationDegrees" serializeAs="String">
<value>5</value>
</setting>
<setting name="SnapGridSize" serializeAs="String">
<value>10</value>
</setting>
<setting name="JumpListInitialised" serializeAs="String">
<value>False</value>
</setting>
</CodeWalker.Properties.Settings>
</userSettings>
<runtime>

View File

@ -746,5 +746,41 @@ namespace CodeWalker.Properties {
this["Deferred"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("5")]
public float SnapRotationDegrees {
get {
return ((float)(this["SnapRotationDegrees"]));
}
set {
this["SnapRotationDegrees"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("10")]
public float SnapGridSize {
get {
return ((float)(this["SnapGridSize"]));
}
set {
this["SnapGridSize"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool JumpListInitialised {
get {
return ((bool)(this["JumpListInitialised"]));
}
set {
this["JumpListInitialised"] = value;
}
}
}
}

View File

@ -195,5 +195,14 @@
<Setting Name="Deferred" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="SnapRotationDegrees" Type="System.Single" Scope="User">
<Value Profile="(Default)">5</Value>
</Setting>
<Setting Name="SnapGridSize" Type="System.Single" Scope="User">
<Value Profile="(Default)">10</Value>
</Setting>
<Setting Name="JumpListInitialised" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -4495,6 +4495,9 @@ namespace CodeWalker
BoundsRangeTrackBar.Value = s.BoundsRange;
ErrorConsoleCheckBox.Checked = s.ShowErrorConsole;
StatusBarCheckBox.Checked = s.ShowStatusBar;
SnapGridSizeUpDown.Value = (decimal)s.SnapGridSize;
SetRotationSnapping(s.SnapRotationDegrees);
EnableModsCheckBox.Checked = s.EnableMods;
DlcLevelComboBox.Text = s.DLC;
@ -4530,6 +4533,9 @@ namespace CodeWalker
s.BoundsRange = BoundsRangeTrackBar.Value;
s.ShowErrorConsole = ErrorConsoleCheckBox.Checked;
s.ShowStatusBar = StatusBarCheckBox.Checked;
s.SnapRotationDegrees = (float)SnapAngleUpDown.Value;
s.SnapGridSize = (float)SnapGridSizeUpDown.Value;
//additional settings from gamefilecache...
s.EnableMods = gameFileCache.EnableMods;