Search Results for

    Show / Hide Table of Contents

    Class OrderedSection

    Section that can be hidden and ordered when in groups.

    Inheritance
    Object
    SimpleControl
    PropertyControl
    Section
    OrderedSection
    Implements
    IControlContainer
    INonAnimatableProperty
    IAdditionalProperties
    Namespace: VRLabs.SimpleShaderInspectors.Controls.Sections
    Syntax
    public class OrderedSection : Section, IControlContainer, INonAnimatableProperty, IAdditionalProperties
    Remarks

    It can be considered an additional evolution of ActivatableSection, but it actually inherits directly from Section.

    Functionality wise it acts pretty much the same as ActivatableSection, the main difference is in how it does that. Namely instead of having a disabled state, it gets disabled it completely disappears from the ui, resulting in an overall cleaner ui.

    Unlike other types of sections, this one cannot be added directly to the inspector, instead it has to be added to an OrderedSectionGroup in order to work properly. In fact the only way to enable a previously disabled OrderedSection in the ui is by using the add button provided by OrderedSectionGroup

    Another quirk of this type of section is that it can be moved up or down relative to the sections of the same group, letting the user order them in whichever way they see fit best.

    Examples

    Example usage:

    // Adds an OrderedSection to the current inspector
    OrderedSectionGroup group = this.AddOrderedSectionGroup("GroupAlias"); 
    
    // Adds an OrderedSection using the specified property as activation property
    group.AddOrderedSection("_ActivateProperty");  
    
     // Adds an OrderedSection using the specified property as activation property,
     // the values for activation are set to 2-3 respectively when disabled and enabled
    group.AddOrderedSection("_ActivateProperty", 2, 3); 
    
    // Adds an OrderedSection using the specified properties for activation and folding state
    group.AddOrderedSection("_ActivateProperty", "_ShowProperty"); 
    
    // Adds an OrderedSection using the specified properties for activation and folding state,
    // the values for activation are set to 2-3 respectively when disabled and enabled
    // the values for folding are set to 4-6 respectively when folded in and out
    group.AddOrderedSection("_ActivateProperty", "_ShowProperty", 2, 3, 4, 6); 

    Constructors

    Name Description
    OrderedSection(String, Single, Single)

    Default constructor of OrderedSection.

    OrderedSection(String, String, Single, Single, Single, Single)

    Constructor of OrderedSection used when creating a property driven OrderedSection.

    Fields

    Name Description
    disableValue

    Float value that the Show bool gets converted if false.

    enableValue

    Float value that the Show bool gets converted if true.

    PushState

    Indicates if the section should be pushed up or down relative to its neighbour sections.

    Properties

    Name Description
    AdditionalProperties

    Extra properties array. Implementation needed by IAdditionalProperties.

    DeleteColor

    Color of the delete icon.

    DeleteIcon

    Style for the delete icon.

    DownColor

    Color of the down icon.

    DownIcon

    Style for the down icon.

    Enabled

    Boolean indicating if the section is enabled or not.

    HasActivatePropertyUpdated

    Boolean indicating if the activate property has been updated this cycle.

    HasSectionTurnedOn

    Boolean indicating if the section has turned on this cycle.

    SectionPosition

    integer indicating the position of the section in the group.

    UpColor

    Color of the up icon.

    UpIcon

    Style for the up icon.

    Methods

    Name Description
    ControlGUI(MaterialEditor)

    Draws the control represented by this object.

    DrawSideButtons()

    Draws and handles the up, down and delete icon on the side.

    PredrawUpdate(MaterialEditor)

    Extension Methods

    Chainables.AddPropertyControl(IControlContainer, String)
    Chainables.Alias<T>(T, String)
    Chainables.SetVisibility<T>(T, Boolean)
    Chainables.SetEnabled<T>(T, Boolean)
    Chainables.AddColorControl(IControlContainer, String, Boolean)
    Chainables.AddControlContainer(IControlContainer)
    Chainables.AddEnumControl<TEnum>(IControlContainer, String)
    Chainables.AddGradientTextureControl(IControlContainer, String, String)
    Chainables.AddKeywordToggleControl(IControlContainer, String)
    Chainables.AddKeywordToggleListControl(IControlContainer, String)
    Chainables.AddLabelControl(IControlContainer, String)
    Chainables.AddLightmapEmissionControl(IControlContainer)
    Chainables.AddSpaceControl(IControlContainer, Int32)
    Chainables.AddTextureControl(IControlContainer, String, String, String)
    Chainables.AddTextureGeneratorControl(IControlContainer, String, String, String)
    Chainables.AddTextureGeneratorControl(IControlContainer, ComputeShader, String, String, String, String)
    Chainables.AddTilingAndOffsetControl(IControlContainer, String)
    Chainables.AddToggleControl(IControlContainer, String, Single, Single)
    Chainables.AddToggleListControl(IControlContainer, String, Single, Single)
    Chainables.AddVectorControl(IControlContainer, String, Boolean, Boolean, Boolean, Boolean)
    Chainables.AddVertexStreamsControl(IControlContainer, String)
    Chainables.AddActivatableSection(IControlContainer, String, String, Single, Single, Single, Single)
    Chainables.AddActivatableSection(IControlContainer, String, Single, Single)
    Chainables.SetUpIcon<T>(T, GUIStyle)
    Chainables.SetDownIcon<T>(T, GUIStyle)
    Chainables.SetDeleteIcon<T>(T, GUIStyle)
    Chainables.SetUpColor<T>(T, Color)
    Chainables.SetDownColor<T>(T, Color)
    Chainables.SetDeleteColor<T>(T, Color)
    Chainables.AddOrderedSectionGroup(IControlContainer, String)
    Chainables.AddSection(IControlContainer, String, Single, Single)
    Chainables.AddSection(IControlContainer)
    Chainables.SetLabelStyle<T>(T, GUIStyle)
    Chainables.SetBackgroundStyle<T>(T, GUIStyle)
    Chainables.SetAreControlsInHeader<T>(T, Boolean)
    Chainables.SetIsPropertyAnimatable<T>(T, Boolean)
    Chainables.SetShowFoldoutArrow<T>(T, Boolean)
    Chainables.SetBackgroundColor<T>(T, Color)
    In This Article
    Back to top Copyright © VRLabs.
    Generated by DocFX