void Awake() { hintOverlay = new HintOverlay( () => HighLogic.Skin, () => new GUIStyle(GUI.skin.box) { padding = GUI.skin.button.padding, margin = GUI.skin.button.margin, alignment = TextAnchor.MiddleLeft, fontSize = HintFontSize, }, adjustGuiScale: true); _guiMainScale = new GuiScale(getPivotFn: () => _mousePosition); }
/// <summary>Overridden from MonoBehaviour.</summary> /// <remarks>Registers listeners, reads configuration and creates global UI objects.</remarks> void Awake() { GameEvents.onVesselSwitching.Add(OnVesselSwitch); GameEvents.onVesselChange.Add(OnVesselChange); GameEvents.onPartCouple.Add(OnPartCouple); ConfigAccessor.ReadFieldsInType(typeof(Controller), this); _mouseInfoOverlay = new HintOverlay( infoOverlayFontSize, infoOverlayHintPadding, infoOverlayTextColor, infoOverlayBackgroundColor); // Drop vessel selection when main modifier is released. vesselSwitchKey.OnRelease += delegate { SetHoveredVessel(null); }; // Iterate thru stabilization modes. switchStabilizationModeKey.OnClick += SelectNextStabilizationMode; }
/// <summary>Overridden from MonoBehaviour.</summary> /// <remarks>Registers listeners, reads configuration and creates global UI objects.</remarks> void Awake() { GameEvents.onVesselSwitching.Add(OnVesselSwitch); GameEvents.onVesselChange.Add(OnVesselChange); GameEvents.onPartCouple.Add(OnPartCouple); ConfigAccessor.ReadFieldsInType(typeof(Controller), this); _mouseInfoOverlay = new HintOverlay( () => GUI.skin, () => new GUIStyle(GUI.skin.box) { padding = GUI.skin.button.padding, margin = GUI.skin.button.margin, alignment = TextAnchor.MiddleLeft, fontSize = _infoOverlayFontSize, }, adjustGuiScale: true); // Drop vessel selection when main modifier is released. _vesselSwitchKey.OnRelease += delegate { SetHoveredVessel(null); }; // Iterate through stabilization modes. _switchStabilizationModeKey.OnClick += SelectNextStabilizationMode; }
void Awake() { hintOverlay = new HintOverlay(HintFontSize, 3, Color.white, hintBackground); }