Exemple #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;
        }
Exemple #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;
        }
 private static extern void Internal_CreateInstance(GUIProgressBar instance, string style, GUIOption[] options);
 private static extern void Internal_CreateInstance(GUIGameObjectField instance, Type type, GUIContent title, int titleWidth,
     string style, GUIOption[] options, bool withTitle);
Exemple #5
0
 private static extern void Internal_CreateInstance(GUIListBoxField instance, LocString[] entries, bool multiselect,
     GUIContent title, int titleWidth, string style, GUIOption[] options, bool withTitle);
Exemple #6
0
 private static extern void Internal_CreateInstance(GUIListBox instance, LocString[] elements, bool multiselect,
     string style, GUIOption[] options);
Exemple #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;
        }
Exemple #8
0
 protected static extern void Internal_CreateInstancePanel(GUILayout instance, Int16 depth, ushort depthRangeMin, 
     ushort depthRangeMax, GUIOption[] options);
Exemple #9
0
 private static extern void Internal_CreateInstance(GUITextureField instance, GUIContent title, int titleWidth,
     string style, GUIOption[] options, bool withTitle);
 private static extern void Internal_CreateInstance(GUIEnumField instance, string[] names, Array values, 
     bool multiselect, GUIContent title, int titleWidth, string style, GUIOption[] options, bool withTitle);
Exemple #11
0
 private static extern void Internal_CreateInstance(GUITextBox instance, bool multiline, string style, GUIOption[] options);
 private static extern void Internal_CreateInstance(GUIRenderTexture instance, IntPtr texture, bool transparency,
     string style, GUIOption[] options);
Exemple #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;
        }
Exemple #14
0
 private static extern void Internal_CreateInstance(GUITexture instance, SpriteTexture texture,
     GUIImageScaleMode scale, bool transparent, string style, GUIOption[] options);
Exemple #15
0
 private static extern void Internal_CreateInstance(GUIToggle instance, GUIContent content,
     GUIToggleGroup toggleGroup, string style, GUIOption[] options);
Exemple #16
0
 private static extern void Internal_CreateInstance(GUISliderField instance, float min, float max, 
     GUIContent title, int titleWidth, string style, GUIOption[] options, bool withTitle);
 private static extern void Internal_CreateInstance(GUISceneTreeView instance, string style, GUIOption[] options);
Exemple #18
0
 private static extern void Internal_CreateInstance(GUILabel instance, GUIContent content, string style, 
     GUIOption[] options);
Exemple #19
0
 private static extern void Internal_CreateInstance(GUISliderV instance, string style, GUIOption[] options);
Exemple #20
0
 protected static extern void Internal_CreateInstanceY(GUILayout instance, GUIOption[] options);
Exemple #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;
        }