public void Awake() { Log.Info("WernherChecker.Awake"); Settings = new WCSettings(); if (checklistSystem == null) { checklistSystem = new ChecklistSystem(); } settingsWindow = new Rect(); baseWindowID = UnityEngine.Random.Range(1000, 2000000) + _AssemblyName.GetHashCode(); DataPath = KSPUtil.ApplicationRootPath + "GameData/WernherChecker/PluginData/"; settingsTexture = GameDatabase.Instance.GetTexture("WernherChecker/Images/settings", false); tooltipBGTexture = GameDatabase.Instance.GetTexture("WernherChecker/Images/tooltip_BG", false); windowStyle = new GUIStyle(HighLogic.Skin.window); boxStyle = new GUIStyle(HighLogic.Skin.box); buttonStyle = new GUIStyle(HighLogic.Skin.button); toggleStyle = new GUIStyle(HighLogic.Skin.toggle); labelStyle = new GUIStyle(HighLogic.Skin.label); tooltipStyle = new GUIStyle(HighLogic.Skin.textArea) { padding = new RectOffset(4, 4, 4, 4), border = new RectOffset(2, 2, 2, 2), wordWrap = true, alignment = TextAnchor.UpperLeft, normal = { background = tooltipBGTexture }, richText = true, }; mousePos = Input.mousePosition; ReloadSettings(); GameEvents.OnGameSettingsApplied.Add(ReloadSettings); }