-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathRapidGUIExample.cs
35 lines (30 loc) · 1.12 KB
/
RapidGUIExample.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using UnityEngine;
namespace RapidGUI.Example
{
public class RapidGUIExample : MonoBehaviour
{
WindowLaunchers launchers;
public void Start()
{
// if WindowLaunchers.isWindow == true(default)
// WindowLaunchers will be wrapped in window.
// child windows automaticaly aligned.
launchers = new WindowLaunchers
{
name = "WindowLaunchers"
};
launchers.Add("RGUI.Field()", typeof(FieldExample));
launchers.Add("RGUI.Field() with class", typeof(FieldWithClassExample));
launchers.Add("RGUI.Slider()", typeof(SliderExample));
launchers.Add("RGUI.MinMaxSlider()", typeof(MinMaxSliderExample));
launchers.Add("Scope", typeof(ScopeExample));
launchers.Add("Fold / Folds", typeof(FoldExample));
launchers.Add("WindowLauncher / WindowLaunchers", typeof(WindowLauncherExample));
launchers.Add("Misc", typeof(MiscExample)).SetWidth(600f);
}
void OnGUI()
{
launchers.DoGUI();
}
}
}