Beispiel #1
0
 private void Start()
 {
     windows          = new WindowLaunchers();
     windows.isWindow = false;
     windows.Add("Part1", typeof(PrefsGUIExample_Part1));
     windows.Add("Part2", typeof(PrefsGUIExample_Part2));
     windows.Add("Part3", typeof(PrefsGUIExample_Part3));
     windows.Add("PrefsSearch", PrefsSearch.DoGUI).SetWidth(600f).SetHeight(800f);
 }
Beispiel #2
0
        void InitFolds()
        {
            launchers = new WindowLaunchers()
            {
                isWindow = false
            };

            // Add() returns Fold. so you can method chains.
            // SetWidth() can set window width.
            launchers.Add("Simple Add()", () => GUILayout.Label("This is WindowLaunchers."))
            .SetTitleAction(() => GUILayout.Label("Title Action"))
            .SetWidth(500f);


            // if name used already, it will margined.
            launchers.Add("Simple Add()", () => GUILayout.Label("added by same name"));

            launchers.Add("With checkEnableFunc.",
                          () => isEnable,
                          () => GUILayout.Label("Displayed only when checkEnableFunc return true.")
                          );

            launchers.Add("finds the type of IDoGUI in the scene.", typeof(FieldExample));
        }
Beispiel #3
0
        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);
        }