mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-25 16:32:55 +08:00
Merge pull request #79 from Big-Yoda/savesettings
Add more ability to save more options
This commit is contained in:
commit
76fd33d254
@ -43,6 +43,27 @@
|
||||
<setting name="Skydome" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="TimeOfDay" serializeAs="String">
|
||||
<value>720</value>
|
||||
</setting>
|
||||
<setting name="LODLights" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="Region" serializeAs="String">
|
||||
<value>Global</value>
|
||||
</setting>
|
||||
<setting name="Clouds" serializeAs="String">
|
||||
<value>contrails</value>
|
||||
</setting>
|
||||
<setting name="Weather" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="NatrualAmbientLight" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="ArtificialAmbientLight" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="ShowTimedEntities" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
|
84
CodeWalker/Properties/Settings.Designer.cs
generated
84
CodeWalker/Properties/Settings.Designer.cs
generated
@ -155,6 +155,42 @@ namespace CodeWalker.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool LODLights {
|
||||
get {
|
||||
return ((bool)(this["LODLights"]));
|
||||
}
|
||||
set {
|
||||
this["LODLights"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool NatrualAmbientLight {
|
||||
get {
|
||||
return ((bool)(this["NatrualAmbientLight"]));
|
||||
}
|
||||
set {
|
||||
this["NatrualAmbientLight"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool ArtificialAmbientLight {
|
||||
get {
|
||||
return ((bool)(this["ArtificialAmbientLight"]));
|
||||
}
|
||||
set {
|
||||
this["ArtificialAmbientLight"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
@ -491,6 +527,54 @@ namespace CodeWalker.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSetting()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCode()]
|
||||
[global::System.Configuration.DefaultSettingValue("EXTRASUNNY")]
|
||||
public string Weather {
|
||||
get {
|
||||
return ((string)(this["Weather"]));
|
||||
}
|
||||
set {
|
||||
this["Weather"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSetting()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCode()]
|
||||
[global::System.Configuration.DefaultSettingValue("GLOBAL")]
|
||||
public string Region {
|
||||
get {
|
||||
return ((string)(this["Region"]));
|
||||
}
|
||||
set {
|
||||
this["Region"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSetting()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCode()]
|
||||
[global::System.Configuration.DefaultSettingValue("contrails")]
|
||||
public string Clouds {
|
||||
get {
|
||||
return ((string)(this["Clouds"]));
|
||||
}
|
||||
set {
|
||||
this["Clouds"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSetting()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCode()]
|
||||
[global::System.Configuration.DefaultSettingValue("720")]
|
||||
public int TimeOfDay {
|
||||
get {
|
||||
return ((int)(this["TimeOfDay"]));
|
||||
}
|
||||
set {
|
||||
this["TimeOfDay"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("DiffuseSampler")]
|
||||
|
@ -4304,8 +4304,8 @@ namespace CodeWalker
|
||||
{
|
||||
WeatherComboBox.Items.Add(wt);
|
||||
}
|
||||
WeatherComboBox.SelectedIndex = 0;
|
||||
WeatherRegionComboBox.SelectedIndex = 0;
|
||||
WeatherComboBox.SelectedIndex = Math.Max(WeatherComboBox.FindString(Settings.Default.Weather), 0);
|
||||
WeatherRegionComboBox.SelectedIndex = Math.Max(WeatherRegionComboBox.FindString(Settings.Default.Region), 0);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
@ -4617,6 +4617,15 @@ namespace CodeWalker
|
||||
StatusBarCheckBox.Checked = s.ShowStatusBar;
|
||||
SnapGridSizeUpDown.Value = (decimal)s.SnapGridSize;
|
||||
SetRotationSnapping(s.SnapRotationDegrees);
|
||||
TimeOfDayTrackBar.Value = s.TimeOfDay;
|
||||
setTime(s.TimeOfDay);
|
||||
LODLightsCheckBox.Checked = s.LODLights;
|
||||
WeatherComboBox.SelectedIndex = Math.Max(WeatherComboBox.FindString(s.Weather), 0);
|
||||
Renderer.SetWeatherType(s.Weather);
|
||||
WeatherRegionComboBox.SelectedIndex = Math.Max(WeatherRegionComboBox.FindString(s.Region), 0);
|
||||
Renderer.individualcloudfrag = s.Clouds;
|
||||
NaturalAmbientLightCheckBox.Checked = s.NatrualAmbientLight;
|
||||
ArtificialAmbientLightCheckBox.Checked = s.ArtificialAmbientLight;
|
||||
|
||||
|
||||
EnableModsCheckBox.Checked = s.EnableMods;
|
||||
@ -4655,7 +4664,13 @@ namespace CodeWalker
|
||||
s.ShowStatusBar = StatusBarCheckBox.Checked;
|
||||
s.SnapRotationDegrees = (float)SnapAngleUpDown.Value;
|
||||
s.SnapGridSize = (float)SnapGridSizeUpDown.Value;
|
||||
|
||||
s.TimeOfDay = TimeOfDayTrackBar.Value;
|
||||
s.LODLights = LODLightsCheckBox.Checked;
|
||||
s.Weather = WeatherComboBox.Text;
|
||||
s.NatrualAmbientLight = NaturalAmbientLightCheckBox.Checked;
|
||||
s.ArtificialAmbientLight = ArtificialAmbientLightCheckBox.Checked;
|
||||
s.Region = WeatherRegionComboBox.Text;
|
||||
s.Clouds = CloudsComboBox.Text;
|
||||
|
||||
//additional settings from gamefilecache...
|
||||
s.EnableMods = gameFileCache.EnableMods;
|
||||
@ -6994,8 +7009,12 @@ namespace CodeWalker
|
||||
|
||||
private void TimeOfDayTrackBar_Scroll(object sender, EventArgs e)
|
||||
{
|
||||
int v = TimeOfDayTrackBar.Value;
|
||||
float hour = v / 60.0f;
|
||||
setTime(TimeOfDayTrackBar.Value);
|
||||
}
|
||||
|
||||
private void setTime(int time)
|
||||
{
|
||||
float hour = time / 60.0f;
|
||||
UpdateTimeOfDayLabel();
|
||||
lock (Renderer.RenderSyncRoot)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user