hirashi3630 / urgui Goto Github PK
View Code? Open in Web Editor NEWUrGUI: easy to create GUI for Unity mods and debug
License: MIT License
UrGUI: easy to create GUI for Unity mods and debug
License: MIT License
defining only 4 floats without specifying name is now not possible due to the dynamic Begin parameters (06a2274)
window1 = GUIWindow.Begin("Example", 10, 10, 200, 200);
reorganizing optional size parameters might be a temporary solution
Search field that filters items in scrollview
items can have multiple controls such as labels, buttons, toggles...
Ability to drag n slide to change values on Float/IntFields - will be useful in V2/V3 controls
In toggle's gif is wrong title
In slider's gif is wrong title
Automatically call window.Draw()
or at least warn if no call has been made
the bottom one is default GUI.Box
fixing this would also fix #28
Change transparency of dropdown selection
to see which ColorPicker is selected
currently to create a GUIWindow
you need to specify starting X/Y position and width/height like so...
var window1 = GUIWindow.Begin("window1's title", 10, 10, 200, 400);
make a dynamic positioning to be able to create a window with only title parameter like so...
var window1 = GUIWindow.Begin("window1's title");
support multiple windows that don't cover each other
Remove AlignControl in GUIFormatting
use native GUISkin/GUIStyle formatting
.ini/.json/.xml
[06:06:44.923] [Ko0-Bot] System.MissingMethodException: Method not found: 'UnityEngine.AssetBundle UnityEngine.AssetBundle.LoadFromMemory(Byte[])'.
at UrGUI.GUIWindow.GUIWindow.LoadDefaultSkin()
at UrGUI.GUIWindow.GUIWindow.Ini()
at UrGUI.GUIWindow.GUIWindow.Begin(String windowTitle, Single startX, Single startY, Single startWidth, Single startHeight, Single margin, Single controlHeight, Single controlSpace, Boolean isEnabled, Boolean isDraggable, Boolean dynamicHeight)
at UrGUI.GUIWindow.GUIWindow.Begin(String windowTitle, Single startWidth, Single margin, Single controlHeight, Single controlSpace, Boolean isEnabled, Boolean isDraggable, Boolean dynamicHeight)
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEvent.<>c.b__1_0(LemonAction x) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 174
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:44.935] [Ko0-Bot] System.TypeInitializationException: The type initializer for 'UrGUI.GUIWindow.Utils.GUIFormatting' threw an exception.
---> System.MissingMethodException: Method not found: 'Void UnityEngine.GUIStyle..ctor(UnityEngine.GUIStyle)'.
at UrGUI.GUIWindow.Utils.GUIFormatting..cctor()
--- End of inner exception stack trace ---
at UrGUI.GUIWindow.Utils.GUIFormatting.get_StringStyle()
at UrGUI.GUIWindow.Utils.GUIFormatting.GetContentStringSize(String text)
at UrGUI.GUIWindow.GUIWindowControls.WLabel.Draw(Rect r)
at UrGUI.GUIWindow.GUIWindow.Draw()
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEvent.<>c.b__1_0(LemonAction x) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 174
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:45.037] [Ko0-Bot] System.TypeInitializationException: The type initializer for 'UrGUI.GUIWindow.Utils.GUIFormatting' threw an exception.
---> System.MissingMethodException: Method not found: 'Void UnityEngine.GUIStyle..ctor(UnityEngine.GUIStyle)'.
at UrGUI.GUIWindow.Utils.GUIFormatting..cctor()
--- End of inner exception stack trace ---
at UrGUI.GUIWindow.Utils.GUIFormatting.get_StringStyle()
at UrGUI.GUIWindow.Utils.GUIFormatting.GetContentStringSize(String text)
at UrGUI.GUIWindow.GUIWindowControls.WLabel.Draw(Rect r)
at UrGUI.GUIWindow.GUIWindow.Draw()
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEvent.<>c.b__1_0(LemonAction x) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 174
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:45.038] [Ko0-Bot] System.TypeInitializationException: The type initializer for 'UrGUI.GUIWindow.Utils.GUIFormatting' threw an exception.
---> System.MissingMethodException: Method not found: 'Void UnityEngine.GUIStyle..ctor(UnityEngine.GUIStyle)'.
at UrGUI.GUIWindow.Utils.GUIFormatting..cctor()
--- End of inner exception stack trace ---
at UrGUI.GUIWindow.Utils.GUIFormatting.get_StringStyle()
at UrGUI.GUIWindow.Utils.GUIFormatting.GetContentStringSize(String text)
at UrGUI.GUIWindow.GUIWindowControls.WLabel.Draw(Rect r)
at UrGUI.GUIWindow.GUIWindow.Draw()
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEvent.<>c.b__1_0(LemonAction x) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 174
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:45.152] [Ko0-Bot] System.TypeInitializationException: The type initializer for 'UrGUI.GUIWindow.Utils.GUIFormatting' threw an exception.
---> System.MissingMethodException: Method not found: 'Void UnityEngine.GUIStyle..ctor(UnityEngine.GUIStyle)'.
at UrGUI.GUIWindow.Utils.GUIFormatting..cctor()
--- End of inner exception stack trace ---
at UrGUI.GUIWindow.Utils.GUIFormatting.get_StringStyle()
at UrGUI.GUIWindow.Utils.GUIFormatting.GetContentStringSize(String text)
at UrGUI.GUIWindow.GUIWindowControls.WLabel.Draw(Rect r)
at UrGUI.GUIWindow.GUIWindow.Draw()
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:45.153] [Ko0-Bot] System.TypeInitializationException: The type initializer for 'UrGUI.GUIWindow.Utils.GUIFormatting' threw an exception.
---> System.MissingMethodException: Method not found: 'Void UnityEngine.GUIStyle..ctor(UnityEngine.GUIStyle)'.
at UrGUI.GUIWindow.Utils.GUIFormatting..cctor()
--- End of inner exception stack trace ---
at UrGUI.GUIWindow.Utils.GUIFormatting.get_StringStyle()
at UrGUI.GUIWindow.Utils.GUIFormatting.GetContentStringSize(String text)
at UrGUI.GUIWindow.GUIWindowControls.WLabel.Draw(Rect r)
at UrGUI.GUIWindow.GUIWindow.Draw()
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:45.263] [Ko0-Bot] System.TypeInitializationException: The type initializer for 'UrGUI.GUIWindow.Utils.GUIFormatting' threw an exception.
---> System.MissingMethodException: Method not found: 'Void UnityEngine.GUIStyle..ctor(UnityEngine.GUIStyle)'.
at UrGUI.GUIWindow.Utils.GUIFormatting..cctor()
--- End of inner exception stack trace ---
at UrGUI.GUIWindow.Utils.GUIFormatting.get_StringStyle()
at UrGUI.GUIWindow.Utils.GUIFormatting.GetContentStringSize(String text)
at UrGUI.GUIWindow.GUIWindowControls.WLabel.Draw(Rect r)
at UrGUI.GUIWindow.GUIWindow.Draw()
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:45.264] [Ko0-Bot] System.TypeInitializationException: The type initializer for 'UrGUI.GUIWindow.Utils.GUIFormatting' threw an exception.
---> System.MissingMethodException: Method not found: 'Void UnityEngine.GUIStyle..ctor(UnityEngine.GUIStyle)'.
at UrGUI.GUIWindow.Utils.GUIFormatting..cctor()
--- End of inner exception stack trace ---
at UrGUI.GUIWindow.Utils.GUIFormatting.get_StringStyle()
at UrGUI.GUIWindow.Utils.GUIFormatting.GetContentStringSize(String text)
at UrGUI.GUIWindow.GUIWindowControls.WLabel.Draw(Rect r)
at UrGUI.GUIWindow.GUIWindow.Draw()
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:45.331] [Ko0-Bot] System.TypeInitializationException: The type initializer for 'UrGUI.GUIWindow.Utils.GUIFormatting' threw an exception.
---> System.MissingMethodException: Method not found: 'Void UnityEngine.GUIStyle..ctor(UnityEngine.GUIStyle)'.
at UrGUI.GUIWindow.Utils.GUIFormatting..cctor()
--- End of inner exception stack trace ---
at UrGUI.GUIWindow.Utils.GUIFormatting.get_StringStyle()
at UrGUI.GUIWindow.Utils.GUIFormatting.GetContentStringSize(String text)
at UrGUI.GUIWindow.GUIWindowControls.WLabel.Draw(Rect r)
at UrGUI.GUIWindow.GUIWindow.Draw()
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:45.331] [Ko0-Bot] System.TypeInitializationException: The type initializer for 'UrGUI.GUIWindow.Utils.GUIFormatting' threw an exception.
---> System.MissingMethodException: Method not found: 'Void UnityEngine.GUIStyle..ctor(UnityEngine.GUIStyle)'.
at UrGUI.GUIWindow.Utils.GUIFormatting..cctor()
--- End of inner exception stack trace ---
at UrGUI.GUIWindow.Utils.GUIFormatting.get_StringStyle()
at UrGUI.GUIWindow.Utils.GUIFormatting.GetContentStringSize(String text)
at UrGUI.GUIWindow.GUIWindowControls.WLabel.Draw(Rect r)
at UrGUI.GUIWindow.GUIWindow.Draw()
at MelonTest.MainMelon.OnGUI()
at MelonLoader.MelonEventBase1.Invoke(Action
1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[06:06:59.159] [UnityExplorer] [UniverseLib] Can't cache type named DragState Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.BaseField1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type) at System.RuntimeType.RuntimeTypeCache.GetEnclosingType() at System.RuntimeType.RuntimeTypeCache.GetNameSpace() at System.RuntimeType.get_Namespace() at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124 [06:07:04.414] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.TypedUxmlAttributeDescription
1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
at System.RuntimeType.get_Namespace()
at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124
[06:07:04.418] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.TypedUxmlAttributeDescription1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type) at System.RuntimeType.RuntimeTypeCache.GetEnclosingType() at System.RuntimeType.RuntimeTypeCache.GetNameSpace() at System.RuntimeType.get_Namespace() at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124 [06:07:04.420] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.TypedUxmlAttributeDescription
1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
at System.RuntimeType.get_Namespace()
at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124
[06:07:04.438] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.TypedUxmlAttributeDescription1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type) at System.RuntimeType.RuntimeTypeCache.GetEnclosingType() at System.RuntimeType.RuntimeTypeCache.GetNameSpace() at System.RuntimeType.get_Namespace() at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124 [06:07:04.439] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.TypedUxmlAttributeDescription
1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
at System.RuntimeType.get_Namespace()
at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124
[06:07:04.440] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.TypedUxmlAttributeDescription1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type) at System.RuntimeType.RuntimeTypeCache.GetEnclosingType() at System.RuntimeType.RuntimeTypeCache.GetNameSpace() at System.RuntimeType.get_Namespace() at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124 [06:07:04.441] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.TypedUxmlAttributeDescription
1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
at System.RuntimeType.get_Namespace()
at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124
[06:07:04.441] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.UIR.ShaderInfoStorage1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type) at System.RuntimeType.RuntimeTypeCache.GetEnclosingType() at System.RuntimeType.RuntimeTypeCache.GetNameSpace() at System.RuntimeType.get_Namespace() at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124 [06:07:04.442] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.UIR.ShaderInfoStorage
1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
at System.RuntimeType.get_Namespace()
at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124
[06:07:04.442] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.UIR.LinkedPool1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type) at System.RuntimeType.RuntimeTypeCache.GetEnclosingType() at System.RuntimeType.RuntimeTypeCache.GetNameSpace() at System.RuntimeType.get_Namespace() at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124 [06:07:04.443] [UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: Could not load type 'UnityEngine.UIElements.UIR.LinkedPool
1' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
at System.RuntimeType.get_Namespace()
at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in C:\Users\xande\Documents\Documents\Btd6 Mods\Mod Projects\UniverseLib-NewML\src\Reflection\ReflectionUtility.cs:line 124
Make custom controls separated for easier and another usage (outside GUIWindow)
Desc
Usage
Build
Release
Images/gifs
would be mostly used for Label and Separator (up, middle, down)
previous version of this removed in 756670c
Make support for multiple buttons to be next to each other
ColorPicker, TextField, FloatField
Calls onValueChanged Action as soon as value change
Add option to call this Action only when user loses focus or save button
Rename GUIWindow
+ other classes and their confusing namespaces
Unity already has UnityEngine.GUI.Window
so it's a little confusing.
same as FloatField but with int
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.