//********************************** Banshee Engine (www.banshee3d.com) **************************************************// //************** Copyright (c) 2016-2019 Marko Pintera (marko.pintera@gmail.com). All rights reserved. *******************// using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using bs; namespace bs.Editor { /** @addtogroup GUIEditor * @{ */ /// /// A composite GUI object representing an editor field. Editor fields are a combination of a label and an input field. /// Label is optional. This specific implementation displays an input field for a color distribution. /// [ShowInInspector] public partial class GUIColorDistributionField : GUIElement { private GUIColorDistributionField(bool __dummy0) { } protected GUIColorDistributionField() { } /// Creates a new GUI editor field with a label. /// Content to display in the editor field label. /// Width of the label in pixels. /// /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. /// If not specified default style is used. /// public GUIColorDistributionField(GUIContent labelContent, int labelWidth, string style = "") { Internal_create(this, ref labelContent, labelWidth, style); } /// Creates a new GUI editor field with a label. /// Content to display in the editor field label. /// /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. /// If not specified default style is used. /// public GUIColorDistributionField(GUIContent labelContent, string style = "") { Internal_create0(this, ref labelContent, style); } /// Creates a new GUI editor field with a label. /// String to display in the editor field label. /// Width of the label in pixels. /// /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. /// If not specified default style is used. /// public GUIColorDistributionField(LocString labelText, int labelWidth, string style = "") { Internal_create1(this, labelText, labelWidth, style); } /// Creates a new GUI editor field with a label. /// String to display in the editor field label. /// /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. /// If not specified default style is used. /// public GUIColorDistributionField(LocString labelText, string style = "") { Internal_create2(this, labelText, style); } /// Creates a new GUI editor field without a label. /// /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. /// If not specified default style is used. /// public GUIColorDistributionField(string style = "") { Internal_create3(this, style); } /// Changes the value of the field. [ShowInInspector] [NotNull] [PassByCopy] [NativeWrapper] public ColorDistribution Value { get { return Internal_getValue(mCachedPtr); } set { Internal_setValue(mCachedPtr, value); } } /// Returns the type of the currently selected distribution. [NativeWrapper] public PropertyDistributionType DistributionType { get { return Internal_getType(mCachedPtr); } } /// Triggered when the user clicks on the minimum value display for the distribution. partial void OnMinClicked(); /// Triggered when the user clicks on the maximum value display for the distribution. partial void OnMaxClicked(); [MethodImpl(MethodImplOptions.InternalCall)] private static extern ColorDistribution Internal_getValue(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_setValue(IntPtr thisPtr, ColorDistribution value); [MethodImpl(MethodImplOptions.InternalCall)] private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_create(GUIColorDistributionField managedInstance, ref GUIContent labelContent, int labelWidth, string style); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_create0(GUIColorDistributionField managedInstance, ref GUIContent labelContent, string style); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_create1(GUIColorDistributionField managedInstance, LocString labelText, int labelWidth, string style); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_create2(GUIColorDistributionField managedInstance, LocString labelText, string style); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_create3(GUIColorDistributionField managedInstance, string style); private void Internal_onMinClicked() { OnMinClicked(); } private void Internal_onMaxClicked() { OnMaxClicked(); } } /** @} */ }