mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-20 01:46:21 +00:00
Ensure minimum width for imgui windows
This commit is contained in:
1 file changed
+2
-1
@@ -75,7 +75,8 @@ public class Window
|
|||||||
Rect = Rect.ResetSize();
|
Rect = Rect.ResetSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect = GUILayout.Window(Id, Rect, Func, Title);
|
GUI.skin.label.wordWrap = false;
|
||||||
|
Rect = GUILayout.Window(Id, Rect, Func, Title, GUILayout.MinWidth(GUI.skin.label.CalcSize(new GUIContent(Title)).x * 2));
|
||||||
|
|
||||||
if ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)) && Rect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
|
if ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)) && Rect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user