Пример #1
0
        /// <summary>
        /// Constructs a GUI option notifying the GUI layout that this element has a fixed width. This will override the width 
        /// property set in element style.
        /// </summary>
        /// <param name="width">Width in pixels.</param>
        /// <returns>New option object that can be used for initializing a GUI element.</returns>
        public static GUIOption FixedWidth(int width)
        {
            GUIOption option = new GUIOption();
            option.min = option.max = width;
            option.type = Type.FixedWidth;

            return option;
        }
Пример #2
0
        /// <summary>
        /// Constructs a GUI option notifying the GUI layout that this element has a fixed height. This will override the height 
        /// property set in element style.
        /// </summary>
        /// <param name="height">Height in pixels.</param>
        /// <returns>New option object that can be used for initializing a GUI element.</returns>
        public static GUIOption FixedHeight(int height)
        {
            GUIOption option = new GUIOption();
            option.min = option.max = height;
            option.type = Type.FixedHeight;

            return option;
        }
Пример #3
0
 private static extern void Internal_CreateInstance(GUIProgressBar instance, string style, GUIOption[] options);
Пример #4
0
 private static extern void Internal_CreateInstance(GUIGameObjectField instance, Type type, GUIContent title, int titleWidth,
     string style, GUIOption[] options, bool withTitle);
Пример #5
0
 private static extern void Internal_CreateInstance(GUIListBoxField instance, LocString[] entries, bool multiselect,
     GUIContent title, int titleWidth, string style, GUIOption[] options, bool withTitle);
Пример #6
0
 private static extern void Internal_CreateInstance(GUIListBox instance, LocString[] elements, bool multiselect,
     string style, GUIOption[] options);
Пример #7
0
        /// <summary>
        /// Constructs a GUI option notifying the GUI layout that this element should be positioned at this offset from the 
        /// parent GUI panel. This option is ignored if element is part of a layout since it controls its placement.
        /// </summary>
        /// <param name="x">Horizontal offset from the parent GUI panel origin, in pixels.</param>
        /// <param name="y">Vertical offset from the parent GUI panel origin, in pixels.</param>
        /// <returns>New option object that can be used for initializing a GUI element.</returns>
        public static GUIOption Position(int x, int y)
        {
            GUIOption option = new GUIOption();
            option.min = x;
            option.max = y;
            option.type = Type.Position;

            return option;
        }
Пример #8
0
 protected static extern void Internal_CreateInstancePanel(GUILayout instance, Int16 depth, ushort depthRangeMin, 
     ushort depthRangeMax, GUIOption[] options);
Пример #9
0
 private static extern void Internal_CreateInstance(GUITextureField instance, GUIContent title, int titleWidth,
     string style, GUIOption[] options, bool withTitle);
Пример #10
0
 private static extern void Internal_CreateInstance(GUIEnumField instance, string[] names, Array values, 
     bool multiselect, GUIContent title, int titleWidth, string style, GUIOption[] options, bool withTitle);
Пример #11
0
 private static extern void Internal_CreateInstance(GUITextBox instance, bool multiline, string style, GUIOption[] options);
Пример #12
0
 private static extern void Internal_CreateInstance(GUIRenderTexture instance, IntPtr texture, bool transparency,
     string style, GUIOption[] options);
Пример #13
0
        /// <summary>
        /// Constructs a GUI option notifying the GUI layout that this element has a flexible height with optional min/max 
        /// constraints. Element will be resized according to its contents and parent layout but will always stay within the 
        /// provided range.
        /// </summary>
        /// <param name="minHeight">Minimum height in pixels. Element will never be smaller than this height.</param>
        /// <param name="maxHeight">Maximum height in pixels. Element will never be larger than this height. Specify zero for
        ///                          unlimited height.</param>
        /// <returns>New option object that can be used for initializing a GUI element.</returns>
        public static GUIOption FlexibleHeight(int minHeight = 0, int maxHeight = 0)
        {
            GUIOption option = new GUIOption();
            option.min = minHeight;
            option.max = maxHeight;
            option.type = Type.FlexibleHeight;

            return option;
        }
Пример #14
0
 private static extern void Internal_CreateInstance(GUITexture instance, SpriteTexture texture,
     GUIImageScaleMode scale, bool transparent, string style, GUIOption[] options);
Пример #15
0
 private static extern void Internal_CreateInstance(GUIToggle instance, GUIContent content,
     GUIToggleGroup toggleGroup, string style, GUIOption[] options);
Пример #16
0
 private static extern void Internal_CreateInstance(GUISliderField instance, float min, float max, 
     GUIContent title, int titleWidth, string style, GUIOption[] options, bool withTitle);
Пример #17
0
 private static extern void Internal_CreateInstance(GUISceneTreeView instance, string style, GUIOption[] options);
Пример #18
0
 private static extern void Internal_CreateInstance(GUILabel instance, GUIContent content, string style, 
     GUIOption[] options);
Пример #19
0
 private static extern void Internal_CreateInstance(GUISliderV instance, string style, GUIOption[] options);
Пример #20
0
 protected static extern void Internal_CreateInstanceY(GUILayout instance, GUIOption[] options);
Пример #21
0
        /// <summary>
        /// Constructs a GUI option notifying the GUI layout that this element has a flexible width with optional min/max 
        /// constraints. Element will be resized according to its contents and parent layout but will always stay within the 
        /// provided range.
        /// </summary>
        /// <param name="minWidth">Minimum width in pixels. Element will never be smaller than this width.</param>
        /// <param name="maxWidth">Maximum width in pixels. Element will never be larger than this width. Specify zero for 
        ///                        unlimited width.</param>
        /// <returns>New option object that can be used for initializing a GUI element.</returns>
        public static GUIOption FlexibleWidth(int minWidth = 0, int maxWidth = 0)
        {
            GUIOption option = new GUIOption();
            option.min = minWidth;
            option.max = maxWidth;
            option.type = Type.FlexibleWidth;

            return option;
        }