Skip to content
/ QGUI Public

A simple but effective IMGUI library for the Unity Engine for when EditorGUILayout is unavailable

License

Notifications You must be signed in to change notification settings

QFSW/QGUI

Repository files navigation

QGUI

A simple but effective IMGUI library for the Unity Engine for when EditorGUILayout is unavailable. It was created for internal use within my various tools and plugins

QGUI provides the LayoutController that eases working with Rects by being able to reserve the demanded space within the rect, automatically applying padding and offsets for you

Example Usage

The following is an example of using QGUI's LayoutController to emulate a HorizontalLayoutGroup where EditorGUILayout is unavailable

EditorGUILayout

EditorGUILayout.BeginHorizontal();
val1 = EditorGUILayout.Toggle(label1, val1, GUILayout.Width(100));
val2 = EditorGUILayout.Toggle(label2, val2);
EditorGUILayout.EndHorizontal();

QGUI

LayoutController layout = new LayoutController(rect);
val1 = EditorGUI.Toggle(layout.ReserveHorizontal(100), label1, val1);
val2 = EditorGUI.Toggle(layout.CurrentRect, label2, val2);

Installation via Package Manager

2019.3+

Starting with Unity 2019.3, the package manager UI has support for git packages

Click the + to add a new git package and add https://github.com/QFSW/QGUI.git as the source

2018.3 - 2019.2

To install via package manager, add the file Packages/manifest.json and add the following line to the "dependencies"

"com.qfsw.qgui": "https://github.com/QFSW/QGUI.git"

Your file should end up like this

{
  "dependencies": {
    "com.qfsw.qgui": "https://github.com/QFSW/QGUI.git",
    ...
  },
}

About

A simple but effective IMGUI library for the Unity Engine for when EditorGUILayout is unavailable

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages