AngeliA
Search Results for

    Show / Hide Table of Contents

    Class PlayerMenuUI

    Menu UI for display player's state, manage equipments and items. Display when player press "select" button once.

    Implements
    IMapItem

    Constructors

    PlayerMenuUI()

    Declaration
    public PlayerMenuUI()

    Properties

    CursorInBottomPanel

    True if the cursor is in bottom inventory panel (the one for player's inventory)

    Declaration
    public bool CursorInBottomPanel { get; set; }

    CursorIndex

    Index of the inventory cursor. (0 means bottom left, 1 makes the cursor go right)

    Declaration
    public int CursorIndex { get; set; }

    Instance

    Global instance of this entity

    Declaration
    public static PlayerMenuUI Instance { get; }

    Partner

    Instance of the current partner UI. Partner is the panel shows on top. The bottom one always display player's inventory. When partner panel is null, it display player's equipment panel.

    Declaration
    public PlayerMenuPartnerUI Partner { get; }

    ShowingUI

    True is this menu is currently displaying

    Declaration
    public static bool ShowingUI { get; }

    TakingCount

    Count of the current taking item.

    Declaration
    public int TakingCount { get; }

    TakingID

    ID of the current taking item (the one move with the cursor), 0 means no item is taking.

    Declaration
    public int TakingID { get; }

    TopPanelColumn

    Column count of the partner panel's inventory

    Declaration
    public int TopPanelColumn { get; }

    TopPanelRow

    Row count of the partner panel's inventory

    Declaration
    public int TopPanelRow { get; }

    Methods

    CloseMenu()

    Close the current opening player menu ui

    Declaration
    public static void CloseMenu()

    DrawItemFieldUI(int, int, int, IRect, bool, int)

    Draw a single item field

    Declaration
    public static void DrawItemFieldUI(int itemID, int itemCount, int frameCode, IRect itemRect, bool interactable, int uiIndex)
    Parameters
    Type Name Description
    int itemID

    ID of the item from this field

    int itemCount

    Count of the item from this field

    int frameCode

    Artwork sprite ID of the field's frame

    IRect itemRect

    Rect position of this field in global space

    bool interactable

    True if this field is currently interactable

    int uiIndex

    Cursor index for this field for UI logic only

    DrawTopInventory(int, int, int, int)

    Draw stardard inventory panel ui

    Declaration
    public static void DrawTopInventory(int inventoryID, int column, int row, int avatarID = 0)
    Parameters
    Type Name Description
    int inventoryID

    Inventory ID for the partner ui

    int column

    Inventory column count for the partner ui

    int row

    Inventory row count for the partner ui

    int avatarID

    Artwork sprite ID of the partner avatar

    OnActivated()

    This function is called when entity enter the stage

    Declaration
    public override void OnActivated()
    Overrides
    Entity.OnActivated()

    OnInactivated()

    This function is called when entity leave the stage

    Declaration
    public override void OnInactivated()
    Overrides
    Entity.OnInactivated()

    OpenMenu()

    Open player menu ui without partner. Player equipment ui will be display on top.

    Declaration
    public static PlayerMenuUI OpenMenu()
    Returns
    Type Description
    PlayerMenuUI

    Instance of the player menu ui

    OpenMenuWithPartner(PlayerMenuPartnerUI, int)

    Open player menu ui with given partner ui

    Declaration
    public static bool OpenMenuWithPartner(PlayerMenuPartnerUI partner, int partnerInventoryID)
    Parameters
    Type Name Description
    PlayerMenuPartnerUI partner

    Instance of the partner ui which will be display on top

    Returns
    Type Description
    bool

    True if the menu is opened

    SetTaking(int, int)

    Set current taking item on the cursor

    Declaration
    public void SetTaking(int takingID, int takingCount)

    UpdateUI()

    Declaration
    public override void UpdateUI()
    Overrides
    EntityUI.UpdateUI()
    Back to top ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค