Beispiel #1
0
        private void SampleGUIOption()
        {
            if (GUILayout.BeginCollapseGroup("[GUIOptions]", ref m_sampleGUIOption))
            {
                GUILayout.Button("Expended", GUIOption.Expended);
                GUILayout.BeginHorizontal();
                GUILayout.Button("Short-Label");
                GUILayout.Button("LLLLLLLLLLLLong-Label");
                GUILayout.Button("Width-100", GUIOption.Width(100));
                GUILayout.EndHorizontal();
                GUILayout.BeginHorizontal();
                GUILayout.Button("Grid 0.5", GUIOption.Grid(0.5f));
                GUILayout.Button("Grid 0.25", GUIOption.Grid(0.25f));
                GUILayout.EndHorizontal();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.Button("AlignLeft", GUIOption.AlignHLeft, GUIOption.Grid(0.33f));
                    GUILayout.Button("AlignCenter", GUIOption.AlignHCenter, GUIOption.Grid(0.34f));
                    GUILayout.Button("AlignRight", GUIOption.AlignHRight, GUIOption.Grid(0.33f));
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.EndCollapseGroup();
        }