Skip to content

Commit

Permalink
WaypointWindow cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed Nov 1, 2023
1 parent 890fb57 commit d04257e
Show file tree
Hide file tree
Showing 2 changed files with 435 additions and 477 deletions.
8 changes: 4 additions & 4 deletions MechJeb2/MechJebModuleRoverWindow.cs
Expand Up @@ -28,8 +28,8 @@ protected override void WindowGUI(int windowID)
if (GUI.Button(new Rect(WindowPos.width - 48, 0, 13, 20), "?", GuiUtils.YellowOnHover))
{
MechJebModuleWaypointHelpWindow help = Core.GetComputerModule<MechJebModuleWaypointHelpWindow>();
help.selTopic = ((IList)help.topics).IndexOf("Controller");
help.Enabled = help.selTopic > -1 || help.Enabled;
help.SelTopic = ((IList)help.Topics).IndexOf("Controller");
help.Enabled = help.SelTopic > -1 || help.Enabled;
}

ed.registry.Find(i => i.id == "Toggle:RoverController.ControlHeading").DrawItem();
Expand Down Expand Up @@ -84,7 +84,7 @@ protected override void WindowGUI(int windowID)

if (GUILayout.Button(Localizer.Format("#MechJeb_Rover_button1"))) // "To Target"
{
Core.GetComputerModule<MechJebModuleWaypointWindow>().selIndex = -1;
Core.GetComputerModule<MechJebModuleWaypointWindow>().SelIndex = -1;
autopilot.WaypointIndex = 0;
autopilot.Waypoints.Clear();
if (vssl != null) { autopilot.Waypoints.Add(new MechJebWaypoint(vssl, 25f)); }
Expand Down Expand Up @@ -132,7 +132,7 @@ protected override void WindowGUI(int windowID)
waypoints.Enabled = !waypoints.Enabled;
if (waypoints.Enabled)
{
waypoints.Mode = MechJebModuleWaypointWindow.WaypointMode.Rover;
waypoints.Mode = MechJebModuleWaypointWindow.WaypointMode.ROVER;
}
}

Expand Down

0 comments on commit d04257e

Please sign in to comment.