//Draw the overlay options along the left side of the map texture private void toggleBar(int id) { growS(); currentColor = GUILayout.Toggle(currentColor, textWithTT("", "Toggle Color")); Rect d = GUILayoutUtility.GetLastRect(); d.x += 34; d.y += 2; d.width = 48; d.height = 24; if (GUI.Button(d, iconWithTT(SCANskins.SCAN_ColorToggleIcon, "Toggle Color"), SCANskins.SCAN_buttonBorderless)) { currentColor = !currentColor; } fillS(); SCANcontroller.controller.map_grid = GUILayout.Toggle(SCANcontroller.controller.map_grid, textWithTT("", "Toggle Grid")); d = GUILayoutUtility.GetLastRect(); d.x += 34; d.y += 2; d.width = 48; d.height = 24; if (GUI.Button(d, iconWithTT(SCANskins.SCAN_GridIcon, "Toggle Grid"), SCANskins.SCAN_buttonBorderless)) { SCANcontroller.controller.map_grid = !SCANcontroller.controller.map_grid; } if (v != null) { fillS(); SCANcontroller.controller.map_orbit = GUILayout.Toggle(SCANcontroller.controller.map_orbit, textWithTT("", "Toggle Orbit")); d = GUILayoutUtility.GetLastRect(); d.x += 34; d.y += 2; d.width = 48; d.height = 24; if (GUI.Button(d, iconWithTT(SCANskins.SCAN_OrbitIcon, "Toggle Orbit"), SCANskins.SCAN_buttonBorderless)) { SCANcontroller.controller.map_orbit = !SCANcontroller.controller.map_orbit; } fillS(); } else { fillS(); } if (waypoints) { SCANcontroller.controller.map_waypoints = GUILayout.Toggle(SCANcontroller.controller.map_waypoints, textWithTT("", "Toggle Waypoints")); d = GUILayoutUtility.GetLastRect(); d.x += 44; d.y += 2; d.width = 24; d.height = 24; if (GUI.Button(d, iconWithTT(SCANskins.SCAN_WaypointIcon, "Toggle Waypoints"), SCANskins.SCAN_buttonBorderless)) { SCANcontroller.controller.map_waypoints = !SCANcontroller.controller.map_waypoints; } fillS(); } SCANcontroller.controller.map_markers = GUILayout.Toggle(SCANcontroller.controller.map_markers, textWithTT("", "Toggle Anomalies")); d = GUILayoutUtility.GetLastRect(); d.x += 44; d.y += 2; d.width = 24; d.height = 24; if (GUI.Button(d, textWithTT(SCANcontroller.controller.anomalyMarker, "Toggle Anomalies"), SCANskins.SCAN_buttonBorderless)) { SCANcontroller.controller.map_markers = !SCANcontroller.controller.map_markers; } fillS(); SCANcontroller.controller.map_flags = GUILayout.Toggle(SCANcontroller.controller.map_flags, textWithTT("", "Toggle Flags")); d = GUILayoutUtility.GetLastRect(); d.x += 44; d.y += 2; d.width = 24; d.height = 24; if (GUI.Button(d, iconWithTT(SCANskins.SCAN_FlagIcon, "Toggle Flags"), SCANskins.SCAN_buttonBorderless)) { SCANcontroller.controller.map_flags = !SCANcontroller.controller.map_flags; } fillS(); SCANcontroller.controller.map_asteroids = GUILayout.Toggle(SCANcontroller.controller.map_asteroids, textWithTT("", "Toggle Asteroids")); d = GUILayoutUtility.GetLastRect(); d.x += 44; d.y += 2; d.width = 24; d.height = 24; if (GUI.Button(d, iconWithTT(SCANskins.SCAN_AsteroidIcon, "Toggle Asteroids"), SCANskins.SCAN_buttonBorderless)) { SCANcontroller.controller.map_asteroids = !SCANcontroller.controller.map_asteroids; } fillS(); SCANcontroller.controller.legend = GUILayout.Toggle(SCANcontroller.controller.legend, textWithTT("", "Toggle Legend")); d = GUILayoutUtility.GetLastRect(); d.x += 34; d.y += 2; d.width = 48; d.height = 24; if (GUI.Button(d, iconWithTT(SCANskins.SCAN_LegendIcon, "Toggle Legend"), SCANskins.SCAN_buttonBorderless)) { SCANcontroller.controller.legend = !SCANcontroller.controller.legend; } if (SCANconfigLoader.GlobalResource) { fillS(); SCANcontroller.controller.map_ResourceOverlay = GUILayout.Toggle(SCANcontroller.controller.map_ResourceOverlay, textWithTT("", "Toggle Resources")); d = GUILayoutUtility.GetLastRect(); d.x += 44; d.y += 2; d.width = 24; d.height = 24; if (GUI.Button(d, iconWithTT(SCANskins.SCAN_ResourceIcon, "Toggle Resources"), SCANskins.SCAN_buttonBorderless)) { SCANcontroller.controller.map_ResourceOverlay = !SCANcontroller.controller.map_ResourceOverlay; } } stopS(); //Open settings windows using icons instead of text; use tooltips Rect s = new Rect(10, WindowRect.height - 42, 32, 32); if (GUI.Button(s, iconWithTT(SCANskins.SCAN_SettingsIcon, "Settings Menu"), SCANskins.SCAN_windowButton)) { SCANcontroller.controller.settingsWindow.Visible = !SCANcontroller.controller.settingsWindow.Visible; SCANcontroller.controller.settingsWindow.removeControlLocks(); } s.x += 40; if (GUI.Button(s, iconWithTT(SCANskins.SCAN_ColorIcon, "Color Control"), SCANskins.SCAN_windowButton)) { SCANcontroller.controller.colorManager.Visible = !SCANcontroller.controller.colorManager.Visible; SCANcontroller.controller.colorManager.removeControlLocks(); } s.x = WindowRect.width - 66; if (GUI.Button(s, iconWithTT(SCANskins.SCAN_ScreenshotIcon, "Export Map"), SCANskins.SCAN_windowButton)) { if (bigmap.isMapComplete()) { bigmap.exportPNG(); } } }