Search Results for

    Show / Hide Table of Contents

    Class Menus

    A set of static methods to deal with MLEM.Ui and in-game menus

    Inheritance
    System.Object
    Menus
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: TinyLife.Uis
    Assembly: Tiny Life.dll
    Syntax
    public static class Menus

    Methods

    GamepadHint(Anchor, Func<Options, Buttons>, Vector2, Nullable<Vector2>, Func<Boolean>)

    Returns a new image that displays information about what gamepad can be pressed to invoke an action. This image is automatically hidden if gamepad controls are not currently being used, or if shouldHide returns true.

    Declaration
    public static Image GamepadHint(Anchor anchor, Func<Options, Buttons> button, Vector2 positionOffset = null, Vector2? size = null, Func<bool> shouldHide = null)
    Parameters
    Type Name Description
    MLEM.Ui.Anchor anchor

    The anchor for the image.

    System.Func<Options, Buttons> button

    A function that returns the button that should be displayed.

    Vector2 positionOffset

    The position offset for the image.

    System.Nullable<Vector2> size

    The size of the image, or null for the image to be 12 pixels big.

    System.Func<System.Boolean> shouldHide

    A function that determines whether the hint should currently be hidden, or null to only hide it when gamepad controls are not currently being used.

    Returns
    Type Description
    MLEM.Ui.Elements.Image

    The created gamepad hint image.

    Transition(Action, Action, Menus.TransitionType, Menus.TransitionType, Single, Single, Single, Nullable<Color>)

    Displays a screen transition that includes a fade out, an inbetween action, followed by a fade back in and an after action.

    Declaration
    public static void Transition(Action inbetween = null, Action after = null, Menus.TransitionType outType = Menus.TransitionType.Swipe, Menus.TransitionType inType = Menus.TransitionType.Swipe, float outSpeed = 0.05F, float inSpeed = 0.05F, float waitInbetween = 0.15F, Color? color = null)
    Parameters
    Type Name Description
    System.Action inbetween

    The action that is invoked while the screen is faded out, or null to invoke no action.

    System.Action after

    The action that is invoked after the full fade routine completes, or null to invoke no action.

    Menus.TransitionType outType

    The Menus.TransitionType used for fading out.

    Menus.TransitionType inType

    The Menus.TransitionType used for fading in.

    System.Single outSpeed

    The speed with which outType is displayed per frame.

    System.Single inSpeed

    The speed with which inType is displayed per frame.

    System.Single waitInbetween

    The amount of time to wait while the screen is faded out.

    System.Nullable<Color> color

    The color that the fade should have, or null to use black.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when a fade is already happening when this method is called.

    ☀
    ☾
    In This Article
    Back to top
    © 2021-2022 Ellpeck – Impressum – Privacy – Status
    ☀
    ☾