diff --git a/ElectricRoadsKw.sln b/ElectricRoadsKw.sln index 390494d..042344e 100644 --- a/ElectricRoadsKw.sln +++ b/ElectricRoadsKw.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.3.32819.101 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EF00}") = "ElectricRoadsKw", "ElectricRoadsKw\ElectricRoadsKw.csproj", "{291D9EA9-6945-4EA3-8756-37464040F450}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectricRoadsKw", "ElectricRoadsKw\ElectricRoadsKw.csproj", "{291D9EA9-6945-4EA3-8756-37464040F450}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KwyttoUtilityER", "KwyttoUtilityER\KwyttoUtilityER.csproj", "{27C9AAF8-F40F-4D56-0601-9C9025ED0A0C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {291D9EA9-6945-4EA3-8756-37464040F450}.Debug|Any CPU.Build.0 = Debug|Any CPU {291D9EA9-6945-4EA3-8756-37464040F450}.Release|Any CPU.ActiveCfg = Release|Any CPU {291D9EA9-6945-4EA3-8756-37464040F450}.Release|Any CPU.Build.0 = Release|Any CPU + {27C9AAF8-F40F-4D56-0601-9C9025ED0A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {27C9AAF8-F40F-4D56-0601-9C9025ED0A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {27C9AAF8-F40F-4D56-0601-9C9025ED0A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {27C9AAF8-F40F-4D56-0601-9C9025ED0A0C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ElectricRoadsKw/CommonProperties.cs b/ElectricRoadsKw/CommonProperties.cs deleted file mode 100644 index 217a9d3..0000000 --- a/ElectricRoadsKw/CommonProperties.cs +++ /dev/null @@ -1,27 +0,0 @@ -using ElectricRoads; -using Kwytto.Utils; -using UnityEngine; - -namespace Kwytto -{ - public static class CommonProperties - { - public static bool DebugMode => ModInstance.DebugMode; - public static string Version => ModInstance.Version; - public static string FullVersion => ModInstance.FullVersion; - public static string ModName => ModInstance.Instance.SimpleName; - public static string Acronym { get; } = "ER"; - public static string ModRootFolder => MainController.FOLDER_PATH; - public static string ModIcon => ModInstance.Instance.IconName; - public static string ModDllRootFolder => ModInstance.RootFolder; - - public static string GitHubRepoPath => "klyte45/ElectricRoadsKw"; - - - internal static readonly string[] AssetExtraDirectoryNames = new string[0]; - internal static readonly string[] AssetExtraFileNames = new string[] { }; - - public static Color ModColor { get; } = ColorExtensions.FromRGB("643e00"); - public static float UIScale { get; } = 1f; - } -} \ No newline at end of file diff --git a/ElectricRoadsKw/Data/ClassesData.cs b/ElectricRoadsKw/Data/ClassesData.cs index 0e007f8..0a67ffe 100644 --- a/ElectricRoadsKw/Data/ClassesData.cs +++ b/ElectricRoadsKw/Data/ClassesData.cs @@ -1,6 +1,6 @@ using ColossalFramework; using ICities; -using Klyte.Localization; +using ElectricRoads.Localization; using Kwytto.LiteUI; using Kwytto.Utils; using System; diff --git a/ElectricRoadsKw/Data/DataContainer.cs b/ElectricRoadsKw/Data/DataContainer.cs index 70785ef..595cab2 100644 --- a/ElectricRoadsKw/Data/DataContainer.cs +++ b/ElectricRoadsKw/Data/DataContainer.cs @@ -1,8 +1,7 @@ using ColossalFramework; using ColossalFramework.Threading; using ICities; -using Klyte.Localization; -using Kwytto; +using ElectricRoads.Localization; using Kwytto.LiteUI; using Kwytto.Utils; using System; @@ -29,7 +28,7 @@ public void OnLoadData() { LogUtils.DoLog($"LOADING DATA {GetType()}"); instance.Instances = new Dictionary(); - List instancesExt = ReflectionUtils.GetInterfaceImplementations(typeof(IDataExtension), GetType()); + List instancesExt = ReflectionUtils.GetInterfaceImplementations(typeof(IDataExtension), new[] { GetType().Assembly }); LogUtils.DoLog($"SUBTYPE COUNT: {instancesExt.Count}"); foreach (Type type in instancesExt) { @@ -89,7 +88,7 @@ private void ProcessExtension(Type type) try { instance.Instances[type] = basicInstance.Deserialize(type, storage) ?? basicInstance; - if (CommonProperties.DebugMode) + if (ModInstance.DebugMode) { string content = System.Text.Encoding.UTF8.GetString(storage); LogUtils.DoLog($"{type} DATA {storage.Length}b => {content}"); @@ -113,7 +112,7 @@ private void ProcessExtension(Type type) KwyttoDialog.ShowModal(new KwyttoDialog.BindProperties() { title = $"Error loading '{type}' data", - message = $"An error occurred while loading the data from {CommonProperties.ModName}.{(CommonProperties.GitHubRepoPath.IsNullOrWhiteSpace() ? "" : "\nPlease open a issue in GitHub along with the game log attached and a printscreen of this window to get this checked by the mod developer. See the Report-a-bug Helper button in the mod options menu to see details about how to get the game log.")}\nRaw data:", + message = $"An error occurred while loading the data from {ModInstance.Instance.SimpleName}.{(ModInstance.Instance.GitHubRepoPath.IsNullOrWhiteSpace() ? "" : "\nPlease open a issue in GitHub along with the game log attached and a printscreen of this window to get this checked by the mod developer. See the Report-a-bug Helper button in the mod options menu to see details about how to get the game log.")}\nRaw data:", scrollText = content, buttons = new[] { @@ -182,7 +181,7 @@ public void OnSaveData() byte[] data = instance.Instances[type]?.Serialize(); - if (CommonProperties.DebugMode) + if (ModInstance.DebugMode) { string content = System.Text.Encoding.UTF8.GetString(data); LogUtils.DoLog($"{type} DATA (L = {data?.Length}) => {content}"); diff --git a/ElectricRoadsKw/Data/DataExtensionBase.cs b/ElectricRoadsKw/Data/DataExtensionBase.cs index 8a5a526..49011f7 100644 --- a/ElectricRoadsKw/Data/DataExtensionBase.cs +++ b/ElectricRoadsKw/Data/DataExtensionBase.cs @@ -30,7 +30,7 @@ public static U Instance public IDataExtension Deserialize(Type type, byte[] data) { string content = data[0] == '<' ? Encoding.UTF8.GetString(data) : ZipUtils.Unzip(data); - if (CommonProperties.DebugMode) + if (ModInstance.DebugMode) { LogUtils.DoLog($"Deserializing {typeof(U)}:\n{content}"); } @@ -47,8 +47,8 @@ public byte[] Serialize() return null; } BeforeSerialize(); - var xml = XmlUtils.DefaultXmlSerialize((U)this, CommonProperties.DebugMode); - if (CommonProperties.DebugMode) + var xml = XmlUtils.DefaultXmlSerialize((U)this, ModInstance.DebugMode); + if (ModInstance.DebugMode) { LogUtils.DoLog($"Serializing {typeof(U)}:\n{xml}"); } diff --git a/ElectricRoadsKw/ElectricRoadsKw.csproj b/ElectricRoadsKw/ElectricRoadsKw.csproj index 519d18a..81c2f8b 100644 --- a/ElectricRoadsKw/ElectricRoadsKw.csproj +++ b/ElectricRoadsKw/ElectricRoadsKw.csproj @@ -7,7 +7,7 @@ {291D9EA9-6945-4EA3-8756-37464040F450} Library Properties - Klyte + ElectricRoads ElectricRoadsKw v3.5 512 @@ -66,7 +66,6 @@ - Str.Designer.cs @@ -79,22 +78,15 @@ True Str.resx + + + + + - - - - KStr.resx - True - True - - - - KStr.Designer.cs - ResXFileCodeGenerator - @@ -115,6 +107,12 @@ + + + {27c9aaf8-f40f-4d56-0601-9c9025ed0a0c} + KwyttoUtilityER + + set "ModDir=%25LOCALAPPDATA%25\Colossal Order\Cities_Skylines\Addons\Mods\$(SolutionName)\" diff --git a/ElectricRoadsKw/Localization/Str.Designer.cs b/ElectricRoadsKw/Localization/Str.Designer.cs index 188f73a..9b3ca3f 100644 --- a/ElectricRoadsKw/Localization/Str.Designer.cs +++ b/ElectricRoadsKw/Localization/Str.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Klyte.Localization { +namespace ElectricRoads.Localization { using System; @@ -39,7 +39,7 @@ internal Str() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Klyte.Localization.Str", typeof(Str).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ElectricRoads.Localization.Str", typeof(Str).Assembly); resourceMan = temp; } return resourceMan; diff --git a/ElectricRoadsKw/ModInstance.cs b/ElectricRoadsKw/ModInstance.cs index dbf0aad..3a10742 100644 --- a/ElectricRoadsKw/ModInstance.cs +++ b/ElectricRoadsKw/ModInstance.cs @@ -1,15 +1,13 @@ using ElectricRoads.UI; -using ICities; -using Klyte.Localization; +using ElectricRoads.Localization; using Kwytto.Interfaces; using Kwytto.Utils; using System.Collections.Generic; using System.Globalization; using System.Reflection; -using UnifiedUI.Helpers; using UnityEngine; -[assembly: AssemblyVersion("3.0.0.1")] +[assembly: AssemblyVersion("3.0.0.2")] namespace ElectricRoads { public class ModInstance : BasicIUserMod @@ -25,49 +23,33 @@ public class ModInstance : BasicIUserMod [2862121823] = "81 Tiles 2" }; + public override string SafeName => "ElectricRoads"; + + public override string Acronym => "ER"; + + public override Color ModColor { get; } = ColorExtensions.FromRGB("a38b00"); + public enum PatchFlags { RegularGame = 0x1, - Mod81TilesGame = 0x2 + BP81TilesGame = 0x2 } internal static PatchFlags m_currentPatched; - protected override void OnLevelLoadedInherit(LoadMode mode) - { - base.OnLevelLoadedInherit(mode); - Instance.RegisterMod(); - } - - private UUICustomButton m_modButton; - public void RegisterMod() + private IUUIButtonContainerPlaceholder[] cachedUUI; + public override IUUIButtonContainerPlaceholder[] UUIButtons => cachedUUI ?? (cachedUUI = new[] { - m_modButton = UUIHelpers.RegisterCustomButton( - name: SimpleName, - groupName: "Klyte45", - tooltip: Name, - onToggle: (value) => { if (value) { Open(); } else { Close(); } }, - onToolChanged: null, - icon: KResourceLoader.LoadTexture($"UI.Images.{IconName}.png"), - hotkeys: new UUIHotKeys { } - - ); - Close(); - } - internal void Close() - { - m_modButton.IsPressed = false; - MainWindow.Instance.Visible = false; - m_modButton.Button?.Unfocus(); - ApplyButtonColor(); - } - - internal void ApplyButtonColor() => m_modButton.Button.color = Color.Lerp(Color.gray, m_modButton.IsPressed ? Color.white : Color.black, 0.5f); - internal void Open() + new UUIWindowButtonContainerPlaceholder( + buttonName: Instance.SimpleName, + tooltip: Instance.GeneralName, + iconPath: "ModIcon", + windowGetter: ()=>MainWindow.Instance + ) + }); + protected override void DoOnLevelUnloading() { - m_modButton.IsPressed = true; - MainWindow.Instance.Visible = true; - MainWindow.Instance.transform.position = new Vector3(25, 50); - ApplyButtonColor(); + base.DoOnLevelUnloading(); + cachedUUI = null; } } } diff --git a/ElectricRoadsKw/Overrides/ElectricRoadsOverrides.cs b/ElectricRoadsKw/Overrides/ElectricRoadsOverrides.cs index b0eb8b1..5ae4c8c 100644 --- a/ElectricRoadsKw/Overrides/ElectricRoadsOverrides.cs +++ b/ElectricRoadsKw/Overrides/ElectricRoadsOverrides.cs @@ -67,7 +67,7 @@ public void Awake() AddRedirect(typeof(PropInstance).GetMethod("RenderInstance", RedirectorUtils.allFlags, null, new Type[] { typeof(RenderManager.CameraInfo), typeof(PropInfo), typeof(InstanceID), typeof(Vector3), typeof(float), typeof(float), typeof(Color), typeof(Vector4), typeof(bool) }, null), null, null, GetType().GetMethod("LightsOnCheckDetour", RedirectorUtils.allFlags)); AddRedirect(typeof(LightEffect).GetMethod("PopulateGroupData", RedirectorUtils.allFlags), GetType().GetMethod("CheckElectrityNetForLight", RedirectorUtils.allFlags)); - ModInstance.m_currentPatched &= ~ModInstance.PatchFlags.Mod81TilesGame; + ModInstance.m_currentPatched &= ~ModInstance.PatchFlags.BP81TilesGame; ModInstance.m_currentPatched &= ~ModInstance.PatchFlags.RegularGame; diff --git a/ElectricRoadsKw/UI/Images/ModIcon.png b/ElectricRoadsKw/UI/Images/ModIcon.png index bb14c8a..dc2543b 100644 Binary files a/ElectricRoadsKw/UI/Images/ModIcon.png and b/ElectricRoadsKw/UI/Images/ModIcon.png differ diff --git a/ElectricRoadsKw/UI/Images/ModIcon.psd b/ElectricRoadsKw/UI/Images/ModIcon.psd deleted file mode 100644 index 7fb4fae..0000000 Binary files a/ElectricRoadsKw/UI/Images/ModIcon.psd and /dev/null differ diff --git a/ElectricRoadsKw/UI/LiteUI/MainWindow.cs b/ElectricRoadsKw/UI/LiteUI/MainWindow.cs index 2e14e91..60b5615 100644 --- a/ElectricRoadsKw/UI/LiteUI/MainWindow.cs +++ b/ElectricRoadsKw/UI/LiteUI/MainWindow.cs @@ -1,7 +1,6 @@ using ColossalFramework.UI; using ElectricRoads.Data; -using Klyte.Localization; -using Kwytto; +using ElectricRoads.Localization; using Kwytto.LiteUI; using Kwytto.Utils; using System.Collections.Generic; @@ -10,8 +9,13 @@ namespace ElectricRoads.UI { - internal class MainWindow : GUIRootWindowBase + internal class MainWindow : GUIOpacityChanging { + protected override bool showOverModals => false; + + protected override bool requireModal => false; + + protected override float FontSizeMultiplier => .9f; public static MainWindow Instance { get @@ -32,7 +36,6 @@ public static MainWindow Instance private void Init() { - requireModal = false; Init($"{ModInstance.Instance.Name} - Patch: {ModInstance.m_currentPatched}", new Rect(200, 200, 400, 550), true, true, new Vector2(400, 550)); m_allClasses = ((FastList.PrefabData>)typeof(PrefabCollection).GetField("m_scenePrefabs", RedirectorUtils.allFlags).GetValue(null)) @@ -42,6 +45,7 @@ private void Init() .GroupBy(x => x.m_class.name) .OrderBy(x => x.Key) .ToDictionary(x => x.First().m_class, x => x.ToList()); + Visible = false; } public void Start() => Visible = false; @@ -52,18 +56,17 @@ private void Init() public static Color bgSubgroup; public static Color bgNote; - public static Texture2D BgTextureBasic => BgTexture; static MainWindow() { - bgSubgroup = CommonProperties.ModColor.SetBrightness(.20f); + bgSubgroup = ModInstance.Instance.ModColor.SetBrightness(.20f); BgTextureSubgroup = new Texture2D(1, 1); BgTextureSubgroup.SetPixel(0, 0, new Color(bgSubgroup.r, bgSubgroup.g, bgSubgroup.b, 1)); BgTextureSubgroup.Apply(); - bgNote = CommonProperties.ModColor.SetBrightness(.60f); + bgNote = ModInstance.Instance.ModColor.SetBrightness(.60f); BgTextureNote = new Texture2D(1, 1); BgTextureNote.SetPixel(0, 0, new Color(bgNote.r, bgNote.g, bgNote.b, 1)); BgTextureNote.Apply(); @@ -73,7 +76,6 @@ static MainWindow() protected override void OnWindowClosed() { base.OnWindowClosed(); - ModInstance.Instance.Close(); } @@ -89,12 +91,12 @@ internal GUIStyle GreenButton { normal = new GUIStyleState() { - background = GUIKlyteCommons.darkGreenTexture, + background = GUIKwyttoCommons.darkGreenTexture, textColor = Color.white }, hover = new GUIStyleState() { - background = GUIKlyteCommons.greenTexture, + background = GUIKwyttoCommons.greenTexture, textColor = Color.black }, }; @@ -115,12 +117,12 @@ internal GUIStyle RedButton { normal = new GUIStyleState() { - background = GUIKlyteCommons.darkRedTexture, + background = GUIKwyttoCommons.darkRedTexture, textColor = Color.white }, hover = new GUIStyleState() { - background = GUIKlyteCommons.redTexture, + background = GUIKwyttoCommons.redTexture, textColor = Color.white }, }; @@ -154,77 +156,75 @@ public VehicleInfo CurrentInfo } } + private List m_currentInfoList; private VehicleInfo m_currentInfo; - private Texture2D texLoad = KResourceLoader.LoadTexture("UI.Images.Load.png"); - private Texture2D texAll = KResourceLoader.LoadTexture("UI.Images.All.png"); - private Texture2D texNone = KResourceLoader.LoadTexture("UI.Images.None.png"); - private Texture2D texReload = KResourceLoader.LoadTexture("UI.Images.Reload.png"); - private Texture2D texSave = KResourceLoader.LoadTexture("UI.Images.Save.png"); + private Texture2D texLoad = KResourceLoader.LoadTextureMod("Load"); + private Texture2D texAll = KResourceLoader.LoadTextureMod("All"); + private Texture2D texNone = KResourceLoader.LoadTextureMod("None"); + private Texture2D texReload = KResourceLoader.LoadTextureMod("Reload"); + private Texture2D texSave = KResourceLoader.LoadTextureMod("Save"); - protected override void DrawWindow() + protected override void DrawWindow(Vector2 area) { - var area = new Rect(5, 25, WindowRect.width - 10, WindowRect.height - 25); - using (new GUILayout.AreaScope(area)) + var topArea = new Rect(0, 0, area.x, 42); + var bottomArea = new Rect(0, 42, area.x, 20); + var listArea = new Rect(0, 58, area.x, area.y - 62); + using (new GUILayout.AreaScope(topArea)) { - var topArea = new Rect(0, 0, area.width, 42); - var bottomArea = new Rect(0, 42, area.width, 16); - var listArea = new Rect(0, 58, area.width, area.height - 58); - using (new GUILayout.AreaScope(topArea)) + using (new GUILayout.HorizontalScope()) { - using (new GUILayout.HorizontalScope()) + if (GUILayout.Button(new GUIContent(texSave, Str.ER_EXPORT_DEFAULT_BTN))) { - if (GUILayout.Button(new GUIContent(texSave, Str.ER_EXPORT_DEFAULT_BTN))) - { - ClassesData.Instance.SaveAsDefault(); - } - GUILayout.FlexibleSpace(); - if (GUILayout.Button(new GUIContent(texLoad, Str.ER_IMPORT_DEFAULT_BTN))) - { - ClassesData.Instance.LoadDefaults(null); - } - GUILayout.FlexibleSpace(); - if (GUILayout.Button(new GUIContent(texAll, Str.ER_SELECT_ALL_BTN))) - { - ClassesData.Instance.SelectAll(); - } - GUILayout.FlexibleSpace(); - if (GUILayout.Button(new GUIContent(texNone, Str.ER_SELECT_NONE_BTN))) - { - ClassesData.Instance.UnselectAll(); - } - GUILayout.FlexibleSpace(); - if (GUILayout.Button(new GUIContent(texReload, Str.ER_RESET_BTN))) - { - ClassesData.Instance.SafeCleanAll(m_allClasses.Keys); - } + ClassesData.Instance.SaveAsDefault(); + } + GUILayout.FlexibleSpace(); + if (GUILayout.Button(new GUIContent(texLoad, Str.ER_IMPORT_DEFAULT_BTN))) + { + ClassesData.Instance.LoadDefaults(null); + } + GUILayout.FlexibleSpace(); + if (GUILayout.Button(new GUIContent(texAll, Str.ER_SELECT_ALL_BTN))) + { + ClassesData.Instance.SelectAll(); + } + GUILayout.FlexibleSpace(); + if (GUILayout.Button(new GUIContent(texNone, Str.ER_SELECT_NONE_BTN))) + { + ClassesData.Instance.UnselectAll(); + } + GUILayout.FlexibleSpace(); + if (GUILayout.Button(new GUIContent(texReload, Str.ER_RESET_BTN))) + { + ClassesData.Instance.SafeCleanAll(m_allClasses.Keys); } } - using (new GUILayout.AreaScope(listArea)) + } + using (new GUILayout.AreaScope(listArea)) + { + using (var scroll = new GUILayout.ScrollViewScope(scrollPosition)) { - using (var scroll = new GUILayout.ScrollViewScope(scrollPosition)) + using (new GUILayout.VerticalScope()) { - using (new GUILayout.VerticalScope()) + foreach (var item in m_allClasses) { - foreach (var item in m_allClasses) + using (new GUILayout.HorizontalScope()) { - using (new GUILayout.HorizontalScope()) + var oldVal = ClassesData.Instance.GetConductibility(item.Key); + var newVal = GUILayout.Toggle(oldVal, item.Key.name); + if (oldVal != newVal) { - var oldVal = ClassesData.Instance.GetConductibility(item.Key); - var newVal = GUILayout.Toggle(oldVal, item.Key.name); - if (oldVal != newVal) - { - ClassesData.Instance.SetConductibility(item.Key, newVal); - } - GUILayout.FlexibleSpace(); - if (GUILayout.Button("?")) + ClassesData.Instance.SetConductibility(item.Key, newVal); + } + GUILayout.FlexibleSpace(); + if (GUILayout.Button("?")) + { + var clazz = item.Key; + KwyttoDialog.ShowModal(new KwyttoDialog.BindProperties() { - var clazz = item.Key; - KwyttoDialog.ShowModal(new KwyttoDialog.BindProperties() - { - showClose = true, - buttons = new[]{ + showClose = true, + buttons = new[]{ KwyttoDialog.SpaceBtn, new KwyttoDialog.ButtonDefinition{ title=Str.ER_ACTIVATE_CLASS_BTN, @@ -247,25 +247,25 @@ protected override void DrawWindow() onClick=()=>true }, }, - title = string.Format(Str.ER_TITLE_NET_LIST_WINDOW, clazz.name), - message = string.Format(Str.ER_PATTERN_NET_LIST_TITLE, Mathf.Min(30, item.Value.Count), item.Value.Count), - scrollText = string.Join("\n", item.Value.Take(30).Select(x => $"\t- {x.GetUncheckedLocalizedTitle()}").ToArray()), - }); - } + title = string.Format(Str.ER_TITLE_NET_LIST_WINDOW, clazz.name), + message = string.Format(Str.ER_PATTERN_NET_LIST_TITLE, Mathf.Min(30, item.Value.Count), item.Value.Count), + scrollText = string.Join("\n", item.Value.Take(30).Select(x => $"\t- {x.GetUncheckedLocalizedTitle()}").ToArray()), + }); } } } - scrollPosition = scroll.scrollPosition; } - } - using (new GUILayout.AreaScope(bottomArea)) - { - GUILayout.Label(GUI.tooltip); + scrollPosition = scroll.scrollPosition; } } - + using (new GUILayout.AreaScope(bottomArea)) + { + GUILayout.Label(GUI.tooltip); + } } + + private Vector2 scrollPosition; private static MainWindow instance; }