logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Enum ModalDirection

    Controls the axis along which a modal lays out its options.

    Namespace: Serenity.Modal.Domain.Enums
    Assembly: Serenity.Modal.Domain.dll
    Syntax
    public enum ModalDirection
    Remarks

    HORIZONTAL is value 0 — the OPPOSITE of Serenity.Menu.Domain.Enums.MenuDirection (where VERTICAL is 0). This is deliberate: existing modal assets have no stored value for this field and deserialize to 0, and the historical modal layout is a horizontal row of buttons (the modal template's ButtonsWrapper uses a HorizontalLayoutGroup). Making HORIZONTAL the zero value therefore preserves the appearance of every existing modal with no migration. Do not "align" this with MenuDirection — the divergence is intentional and load-bearing for backward compatibility.

    Fields

    Name Description
    HORIZONTAL

    Options are placed side by side (left to right); left/right navigates options and up/down edits the selected option's value. This is the default and matches the historical behavior.

    VERTICAL

    Options are stacked top-to-bottom; up/down navigates options and left/right edits the selected option's value.

    In this article
    © 2026 Serenity. All Rights Reserved