Skip to content

Commit

Permalink
editor window settings fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jwvanderbeck committed Jan 19, 2015
1 parent f0acb61 commit 5959193
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions TestFlightCore/TestFlightCore/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Settings(String FilePath) : base(FilePath) {
[Persistent] public bool showStatusTextInMSD = true;
[Persistent] public bool shortenPartNameInMSD = false;
[Persistent] public bool mainWindowLocked = true;
[Persistent] public bool edtiorWindowLocked = true;
[Persistent] public bool editorWindowLocked = true;
[Persistent] public int currentMSDSize = 1;
[Persistent] public bool flightHUDEnabled = false;
[Persistent] public bool editorShowGraph = false;
Expand All @@ -45,11 +45,12 @@ public Settings(String FilePath) : base(FilePath) {
[Persistent] public PersistentRect flightHUDPositionStored = new PersistentRect();
public Rect flightHUDPosition = new Rect(100,50,0,0);
[Persistent] public PersistentRect editorWindowPositionStored = new PersistentRect();
public Rect editorWindowPosition = new Rect(0,0,0,0);
public Rect editorWindowPosition = new Rect(250,100,0,0);

public override void OnDecodeFromConfigNode()
{
mainWindowPosition = mainWindowPositionStored.ToRect();
editorWindowPosition = editorWindowPositionStored.ToRect();
flightHUDPosition = flightHUDPositionStored.ToRect();
currentMSDScrollPosition = currentMSDScrollPositionStored.ToVector2();
currentEditorScrollPosition = currentEditorScrollPositionStored.ToVector2();
Expand All @@ -58,6 +59,7 @@ public override void OnDecodeFromConfigNode()
public override void OnEncodeToConfigNode()
{
mainWindowPositionStored = mainWindowPositionStored.FromRect(mainWindowPosition);
editorWindowPositionStored = editorWindowPositionStored.FromRect(editorWindowPosition);
flightHUDPositionStored = flightHUDPositionStored.FromRect(flightHUDPosition);
currentMSDScrollPositionStored = currentMSDScrollPositionStored.FromVector2(currentMSDScrollPosition);
currentEditorScrollPositionStored = currentEditorScrollPositionStored.FromVector2(currentMSDScrollPosition);
Expand Down

0 comments on commit 5959193

Please sign in to comment.