public void Draw() { GUI.depth = 0; GUI.skin = HighLogic.Skin; // Draw Satellite Selector if (mEnabled && mSatelliteFragment.Satellite != null) { GUILayout.BeginArea(PositionSatellite, AbstractWindow.Frame); { mSatelliteFragment.Draw(); } GUILayout.EndArea(); } // Draw Antenna Selector if (mEnabled && mSatelliteFragment.Satellite != null && mAntennaFragment.Antenna != null) { GUILayout.BeginArea(PositionAntenna, AbstractWindow.Frame); { mAntennaFragment.Draw(); } GUILayout.EndArea(); } // Draw Toolbar GUILayout.BeginArea(Position, Texture.Background); { GUILayout.BeginHorizontal(); { GUILayout.FlexibleSpace(); if (GUILayout.Button(TextureComButton, Style.Button)) { OnClickCompath(); } if (GUILayout.Button(TexturePlanetButton, Style.Button)) { OnClickPlanet(); } if (GUILayout.Button(TextureTypeButton, Style.Button)) { OnClickType(); } if (GUILayout.Button("", StyleStatusButton)) { OnClickStatus(); } } GUILayout.EndHorizontal(); } GUILayout.EndArea(); }
public void Draw() { GUI.depth = 0; GUI.skin = HighLogic.Skin; // Draw Satellite Selector if (mEnabled && mSatelliteFragment.Satellite != null) { GUILayout.BeginArea(PositionSatellite, AbstractWindow.Frame); { mSatelliteFragment.Draw(); } GUILayout.EndArea(); } // Draw Antenna Selector if (mEnabled && mSatelliteFragment.Satellite != null && mAntennaFragment.Antenna != null) { GUILayout.BeginArea(PositionAntenna, AbstractWindow.Frame); { mAntennaFragment.Draw(); } GUILayout.EndArea(); } // Switch the background from map view to tracking station Texture2D backgroundImage = Texture.Background; if (this.onTrackingStation) { backgroundImage = Texture.BackgroundLeft; } // Draw Toolbar GUILayout.BeginArea(Position, backgroundImage); { GUILayout.BeginHorizontal(); { if (this.onTrackingStation) { if (GUILayout.Button("", StyleStatusButton)) { OnClickStatus(); } if (GUILayout.Button(TextureTypeButton, Style.Button)) { OnClickType(); } if (GUILayout.Button(TextureReachButton, Style.Button)) { OnClickReach(); } if (GUILayout.Button(TextureComButton, Style.Button)) { OnClickCompath(); } } else { GUILayout.FlexibleSpace(); if (GUILayout.Button(TextureComButton, Style.Button)) { OnClickCompath(); } if (GUILayout.Button(TextureReachButton, Style.Button)) { OnClickReach(); } if (GUILayout.Button(TextureTypeButton, Style.Button)) { OnClickType(); } if (GUILayout.Button("", StyleStatusButton)) { OnClickStatus(); } } } GUILayout.EndHorizontal(); } GUILayout.EndArea(); }