Skip to content

Commit

Permalink
Added UI scaling code to position of EEX menu
Browse files Browse the repository at this point in the history
Fixed accidently disabling the ability to change the anglesnap on/off by clicking the sprite
  • Loading branch information
linuxgurugamer committed May 15, 2016
1 parent 9b364db commit 01af76c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
12 changes: 6 additions & 6 deletions EditorExtensionsRedux.userprefs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Properties StartupItem="Packagers\BetaPackage.mdproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug Win" />
<MonoDevelop.Ide.Workbench ActiveDocument="EditorExtensionsRedux\EditorExtensionsRedux.cs">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Release" />
<MonoDevelop.Ide.Workbench ActiveDocument="README.md">
<Files>
<File FileName="EditorExtensionsRedux\SelectRoot2Behaviour.cs" Line="91" Column="11" />
<File FileName="EditorExtensionsRedux\SelectRoot2Behaviour.cs" Line="1" Column="1" />
<File FileName="EditorExtensionsRedux\NoOffsetLimits\NoOffsetLimitsBehaviour.cs" Line="1" Column="1" />
<File FileName="EditorExtensionsRedux\AppLauncherButton.cs" Line="1" Column="1" />
<File FileName="EditorExtensionsRedux\Utility.cs" Line="1" Column="1" />
Expand All @@ -18,9 +18,9 @@
<File FileName="EditorExtensionsRedux\StripSymmetry\ExtensionMethods.cs" Line="1" Column="1" />
<File FileName="EditorExtensionsRedux\Config\ConfigData.cs" Line="1" Column="1" />
<File FileName="EditorExtensionsRedux\SettingsWindow.cs" Line="1" Column="1" />
<File FileName="EditorExtensionsRedux\EditorExtensionsRedux.cs" Line="524" Column="1" />
<File FileName="EditorExtensionsRedux\FineAdjustWindow.cs" Line="7" Column="31" />
<File FileName="README.md" Line="11" Column="4" />
<File FileName="EditorExtensionsRedux\EditorExtensionsRedux.cs" Line="1" Column="1" />
<File FileName="EditorExtensionsRedux\FineAdjustWindow.cs" Line="1" Column="1" />
<File FileName="README.md" Line="13" Column="65" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
Expand Down
9 changes: 5 additions & 4 deletions EditorExtensionsRedux/EditorExtensionsRedux.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1220,12 +1220,12 @@ public void ShowMenu ()
if (!validVersion)
return;
Vector3 position = Input.mousePosition;
int toolbarHeight = (int)(_toolbarHeight * GameSettings.UI_SCALE);
_menuRect = new Rect () {
xMin = position.x - _menuWidth / 2,
xMax = position.x + _menuWidth / 2,
yMin = Screen.height - _toolbarHeight - _menuHeight,
yMax = Screen.height - _toolbarHeight
yMin = Screen.height - toolbarHeight - _menuHeight,
yMax = Screen.height - toolbarHeight
};
_showMenu = true;
}
Expand Down Expand Up @@ -1370,10 +1370,11 @@ void OSDMessage (string message)

void AdjustSnapLocations ()
{

if (editor.srfAttachAngleSnap == 0) {
GameSettings.VAB_USE_ANGLE_SNAP = false;
} else {
GameSettings.VAB_USE_ANGLE_SNAP = true;
// GameSettings.VAB_USE_ANGLE_SNAP = true;
}

//symmetry & angle sprite/label size and position
Expand Down
2 changes: 1 addition & 1 deletion EditorExtensionsRedux/EditorExtensionsRedux.version
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"MAJOR":3,
"MINOR":2,
"PATCH":8,
"PATCH":9,
"BUILD":0
},
"KSP_VERSION":
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
##
##

## Changes in 3.2.10
Added UI scaling code to position of EEX menu
Fixed accidently disabling the ability to change the anglesnap on/off by clicking the spirt

## Changes in 3.2.9
Removed old code from the FineAdjust Update function which was causing an exception
Reduced height of popup menu
Fixed bug where clicking on the symmetry sprite (the one which changes the angle snap degrees) when the angle was zero
would not allow surface attachments to anything other than the +z axis:
"I can place the battery only on the +z axis of the structure. I cannot place it on -z, +x, -x"
Removed performance issue when Fine Adjustments window was shown
Reduced performance impact when fine adjustments are being done

## Changes in 3.2.8
Added code from Fwiffo to fix bug where changing the angle snap while in rotate mode would not affect the rotate gizmo
Expand Down

0 comments on commit 01af76c

Please sign in to comment.