Search Results for

    Class SContainerOptions

    Inheritance
    object
    SUiElement
    SUiElement<SContainerOptions>
    SContainerOptions
    SPanelOptions
    SScrollContainerOptions
    STabControllerOptions
    Inherited Members
    SUiElement<SContainerOptions>.TextObject
    SUiElement<SContainerOptions>.VisibilityObservable
    SUiElement<SContainerOptions>.BindVisibility(Observable<bool>)
    SUiElement<SContainerOptions>.UnbindVisibility()
    SUiElement<SContainerOptions>.Name(string)
    SUiElement<SContainerOptions>.Id(string)
    SUiElement<SContainerOptions>.Class(string)
    SUiElement<SContainerOptions>.Text(string)
    SUiElement<SContainerOptions>.RichText(string)
    SUiElement<SContainerOptions>.FontSize(int)
    SUiElement<SContainerOptions>.FontAutoSize(bool)
    SUiElement<SContainerOptions>.FontColor(Color)
    SUiElement<SContainerOptions>.FontColor(string)
    SUiElement<SContainerOptions>.Find<TObj>(string)
    SUiElement<SContainerOptions>.MinOffset(int?, int?)
    SUiElement<SContainerOptions>.MaxOffset(int?, int?)
    SUiElement<SContainerOptions>.Size(float?, float?)
    SUiElement<SContainerOptions>.Size(Vector2)
    SUiElement<SContainerOptions>.Position(float?, float?)
    SUiElement<SContainerOptions>.Width(float)
    SUiElement<SContainerOptions>.Height(float)
    SUiElement<SContainerOptions>.PHeight(float)
    SUiElement<SContainerOptions>.PWidth(float)
    SUiElement<SContainerOptions>.MHeight(float)
    SUiElement<SContainerOptions>.MWidth(float)
    SUiElement<SContainerOptions>.FlexHeight(float)
    SUiElement<SContainerOptions>.FlexWidth(float)
    SUiElement<SContainerOptions>.RectPadding(float, float, float, float)
    SUiElement<SContainerOptions>.RectPadding(float, float)
    SUiElement<SContainerOptions>.RectPadding(float)
    SUiElement<SContainerOptions>.HFill()
    SUiElement<SContainerOptions>.VFill()
    SUiElement<SContainerOptions>.VOffset(float, float)
    SUiElement<SContainerOptions>.HOffset(float, float)
    SUiElement<SContainerOptions>.Pivot(float?, float?)
    SUiElement<SContainerOptions>.AspectRatio(AspectRatioFitter.AspectMode)
    SUiElement<SContainerOptions>.Anchor(AnchorType)
    SUiElement<SContainerOptions>.Dock(EDockType)
    SUiElement<SContainerOptions>.Ppu(float)
    SUiElement<SContainerOptions>.Visible(bool)
    SUiElement<SContainerOptions>.Active(bool)
    SUiElement<SContainerOptions>.Toggle()
    SUiElement<SContainerOptions>.OnClick(Action)
    SUiElement<SContainerOptions>.Add(SUiElement)
    SUiElement<SContainerOptions>.this[string]
    SUiElement.RectTransform
    SUiElement.Root
    SUiElement.Parent
    SUiElement._id
    SUiElement._classes
    SUiElement.SetParent(Transform)
    SUiElement.SetParent(SUiElement)
    SUiElement.Remove()
    SUiElement.As<T>()
    SUiElement.GetClass(string)
    SUiElement.GetOrAdd<T>()
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: SUI
    Assembly: SonsSdk.dll
    Syntax
    public class SContainerOptions : SUiElement<SContainerOptions>

    Constructors

    SContainerOptions(GameObject)

    Declaration
    public SContainerOptions(GameObject root)
    Parameters
    Type Name Description
    GameObject root

    Properties

    this[SUiElement]

    Declaration
    public SContainerOptions this[SUiElement element] { get; }
    Parameters
    Type Name Description
    SUiElement element
    Property Value
    Type Description
    SContainerOptions

    Methods

    AutoSize(string)

    M = MinSize, P = PreferredSize. First letter is width, second is height

    Declaration
    public SContainerOptions AutoSize(string mode = "XX")
    Parameters
    Type Name Description
    string mode
    Returns
    Type Description
    SContainerOptions
    Exceptions
    Type Condition
    Exception

    AutoSize(FitMode, FitMode)

    Configures automatic sizing for the container using ContentSizeFitter.

    Declaration
    public SContainerOptions AutoSize(ContentSizeFitter.FitMode horizontal, ContentSizeFitter.FitMode vertical)
    Parameters
    Type Name Description
    FitMode horizontal

    The horizontal fitting mode for content.

    FitMode vertical

    The vertical fitting mode for content.

    Returns
    Type Description
    SContainerOptions

    Background(BackgroundDefinition)

    Declaration
    public SContainerOptions Background(SUI.BackgroundDefinition backgroundDefinition)
    Parameters
    Type Name Description
    SUI.BackgroundDefinition backgroundDefinition
    Returns
    Type Description
    SContainerOptions

    Background(bool)

    Declaration
    public SContainerOptions Background(bool show)
    Parameters
    Type Name Description
    bool show
    Returns
    Type Description
    SContainerOptions

    Background(string, bool)

    Declaration
    public SContainerOptions Background(string color, bool clean = false)
    Parameters
    Type Name Description
    string color
    bool clean
    Returns
    Type Description
    SContainerOptions

    Background(Color, EBackground, Type?)

    Sets the background appearance of the container using a solid color and an optional background sprite.

    Declaration
    public SContainerOptions Background(Color color, EBackground type = EBackground.Sons, Image.Type? spriteType = null)
    Parameters
    Type Name Description
    Color color

    The desired background color.

    EBackground type
    Image.Type? spriteType
    Returns
    Type Description
    SContainerOptions

    Background(Sprite, Color?, Type)

    Sets the background appearance of the container using a solid color and an optional background sprite.

    Declaration
    public SContainerOptions Background(Sprite sprite, Color? color, Image.Type type = 0)
    Parameters
    Type Name Description
    Sprite sprite
    Color? color

    The desired background color.

    Type type
    Returns
    Type Description
    SContainerOptions

    BindVisibility(Observable<bool>, bool)

    Binds the visibility of the container to an observable boolean value.

    Declaration
    public SContainerOptions BindVisibility(Observable<bool> observable, bool toggleGameObject)
    Parameters
    Type Name Description
    Observable<bool> observable

    The observable boolean value to bind to.

    bool toggleGameObject

    Whether to toggle the GameObject's active state based on the observable value or the canvasgroup alpha.

    Returns
    Type Description
    SContainerOptions

    CanvasGroup(float, bool)

    Declaration
    public SContainerOptions CanvasGroup(float alpha = 1, bool interactable = true)
    Parameters
    Type Name Description
    float alpha
    bool interactable
    Returns
    Type Description
    SContainerOptions

    CellSize(float, float)

    Sets the cell size of the GridLayoutGroup attached to the root object.

    Declaration
    public SContainerOptions CellSize(float width, float height)
    Parameters
    Type Name Description
    float width

    Width of the cell.

    float height

    Height of the cell.

    Returns
    Type Description
    SContainerOptions

    ChildControl(bool?, bool?)

    Configures whether child elements in the container's horizontal or vertical layout should control their width and/or height.

    Declaration
    public SContainerOptions ChildControl(bool? width = null, bool? height = null)
    Parameters
    Type Name Description
    bool? width

    Optional. Set to true to enable child width control, false to disable. Set to null to keep the current setting.

    bool? height

    Optional. Set to true to enable child height control, false to disable. Set to null to keep the current setting.

    Returns
    Type Description
    SContainerOptions

    ChildExpand(bool?, bool?)

    Configures whether child elements in the container's horizontal or vertical layout should expand to fill available space.

    Declaration
    public SContainerOptions ChildExpand(bool? width = null, bool? height = null)
    Parameters
    Type Name Description
    bool? width

    Optional. Set to true to enable child width expansion, false to disable. Set to null to keep the current setting.

    bool? height

    Optional. Set to true to enable child height expansion, false to disable. Set to null to keep the current setting.

    Returns
    Type Description
    SContainerOptions

    Grid(int, float)

    Creates a grid layout with the given constraint count and spacing.

    Declaration
    public SContainerOptions Grid(int constraintCount, float spacing = 0)
    Parameters
    Type Name Description
    int constraintCount

    Number of the fixed rows or columns

    float spacing
    Returns
    Type Description
    SContainerOptions

    Horizontal(float, string)

    Configures the container's layout as horizontal with optional spacing and layout mode.

    Declaration
    public SContainerOptions Horizontal(float spacing = 0, string mode = null)
    Parameters
    Type Name Description
    float spacing

    Optional. The amount of spacing between elements.

    string mode

    Optional. The layout mode to apply (e.g., flexible, fixed, etc.).

    Returns
    Type Description
    SContainerOptions

    LayoutChildAlignment(TextAnchor)

    Sets the alignment of child elements within the container's horizontal or vertical layout.

    Declaration
    public SContainerOptions LayoutChildAlignment(TextAnchor alignment)
    Parameters
    Type Name Description
    TextAnchor alignment

    The alignment for child elements.

    Returns
    Type Description
    SContainerOptions

    LayoutMode(string)

    E = Expand, C = Control. First letter is width, second is height

    Declaration
    public SContainerOptions LayoutMode(string mode = "ee")
    Parameters
    Type Name Description
    string mode
    Returns
    Type Description
    SContainerOptions

    LayoutUseChildScale(bool?, bool?)

    Configures whether child elements in the container's horizontal or vertical layout should use child scale settings.

    Declaration
    public SContainerOptions LayoutUseChildScale(bool? width = null, bool? height = null)
    Parameters
    Type Name Description
    bool? width

    Optional. Set to true to enable child width scaling, false to disable. Set to null to keep the current setting.

    bool? height

    Optional. Set to true to enable child height scaling, false to disable. Set to null to keep the current setting.

    Returns
    Type Description
    SContainerOptions

    Opacity(float)

    Declaration
    public SContainerOptions Opacity(float alpha)
    Parameters
    Type Name Description
    float alpha
    Returns
    Type Description
    SContainerOptions

    OverrideSorting(int)

    Gets or adds a canvas and overrides the sorting order of the parent canvas.

    Declaration
    public SContainerOptions OverrideSorting(int sortingOrder)
    Parameters
    Type Name Description
    int sortingOrder
    Returns
    Type Description
    SContainerOptions

    Padding(float)

    Sets equal padding for all sides of the container's layout.

    Declaration
    public SContainerOptions Padding(float padding)
    Parameters
    Type Name Description
    float padding

    The amount of padding to apply on all sides.

    Returns
    Type Description
    SContainerOptions

    Padding(float, float, float, float)

    Sets padding for the container's layout on all sides individually.

    Declaration
    public SContainerOptions Padding(float left, float right, float top, float bottom)
    Parameters
    Type Name Description
    float left

    The amount of padding for the left side.

    float right

    The amount of padding for the right side.

    float top

    The amount of padding for the top side.

    float bottom

    The amount of padding for the bottom side.

    Returns
    Type Description
    SContainerOptions

    PaddingHorizontal(float)

    Sets horizontal padding for the container's layout.

    Declaration
    public SContainerOptions PaddingHorizontal(float padding)
    Parameters
    Type Name Description
    float padding

    The amount of horizontal padding to apply.

    Returns
    Type Description
    SContainerOptions

    PaddingVertical(float)

    Sets vertical padding for the container's layout.

    Declaration
    public SContainerOptions PaddingVertical(float padding)
    Parameters
    Type Name Description
    float padding

    The amount of vertical padding to apply.

    Returns
    Type Description
    SContainerOptions

    Spacing(float)

    Sets the spacing between elements in the container's horizontal or vertical layout.

    Declaration
    public virtual SContainerOptions Spacing(float spacing)
    Parameters
    Type Name Description
    float spacing

    The amount of spacing between elements.

    Returns
    Type Description
    SContainerOptions

    Spacing(float, float)

    Sets the spacing between rows and columns in the container's grid layout.

    Declaration
    public virtual SContainerOptions Spacing(float spacingRow, float spacingCol)
    Parameters
    Type Name Description
    float spacingRow

    The amount of spacing between rows.

    float spacingCol

    The amount of spacing between columns.

    Returns
    Type Description
    SContainerOptions

    Vertical(float, string)

    Configures the container's layout as vertical with optional spacing and layout mode.

    Declaration
    public SContainerOptions Vertical(float spacing = 0, string mode = null)
    Parameters
    Type Name Description
    float spacing

    Optional. The amount of spacing between elements.

    string mode

    Optional. The layout mode to apply (e.g., flexible, fixed, etc.).

    Returns
    Type Description
    SContainerOptions

    VisibilityObservalbleChanged(bool)

    Declaration
    protected override void VisibilityObservalbleChanged(bool value)
    Parameters
    Type Name Description
    bool value
    Overrides
    SUiElement<SContainerOptions>.VisibilityObservalbleChanged(bool)

    Operators

    operator -(SContainerOptions, SUiElement)

    Declaration
    public static SContainerOptions operator -(SContainerOptions container, SUiElement element)
    Parameters
    Type Name Description
    SContainerOptions container
    SUiElement element
    Returns
    Type Description
    SContainerOptions