Skip to content

Commit

Permalink
Changed the menu position due to the new map buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
r4m0n committed May 22, 2013
1 parent 5fdaaa8 commit 3f6411f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions MechJeb2/MechJebModuleMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public override void DrawGUI(bool inEditor)
GUI.depth = -100;
GUI.SetNextControlName("MechJebOpen");
GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(new Vector3(0, 0, -90)), Vector3.one);
if (GUI.Button(new Rect((-Screen.height - 100) / 2, Screen.width - 25 - (200 * windowProgr), 100, 25), (windowStat == WindowStat.HIDDEN) ? "/\\ MechJeb /\\" : "\\/ MechJeb \\/"))
if (GUI.Button(new Rect((-Screen.height / 4 - 50), Screen.width - 25 - (200 * windowProgr), 100, 25), (windowStat == WindowStat.HIDDEN) ? "/\\ MechJeb /\\" : "\\/ MechJeb \\/"))
{
if (windowStat == WindowStat.HIDDEN)
{
Expand All @@ -118,7 +118,11 @@ public override void DrawGUI(bool inEditor)
if (windowStat != WindowStat.HIDDEN)
{
windowVector.x = Screen.width - windowProgr * 200;
windowVector.y = (Screen.height - windowPos.height) / 2;
windowVector.y = Screen.height / 4 - windowPos.height / 2;
if (windowVector.y < 75)
{
windowVector.y = 75;
}
windowPos = GUILayout.Window(GetType().FullName.GetHashCode(), windowPos, WindowGUI, "MechJeb " + core.version, GUILayout.Width(200), GUILayout.Height(20));
}
else
Expand Down

0 comments on commit 3f6411f

Please sign in to comment.