• Get a framehandle by specifying a specific originframetype and index (in most cases it should be 0 (first index), however it can go above 0 when using originframetypes such as ORIGIN_FRAME_HERO_BUTTON)

    The one with indices above 0 are:

    // The ability buttons at the right bottom corner
    ORIGIN_FRAME_COMMAND_BUTTON <0 to 11>
    // The clickable hero icons at the left of the screen
    ORIGIN_FRAME_HERO_BUTTON <0 to 6>
    // See above for the following:
    ORIGIN_FRAME_HERO_HP_BAR <0 to 6>
    ORIGIN_FRAME_HERO_MANA_BAR <0 to 6>
    ORIGIN_FRAME_HERO_BUTTON_INDICATOR <0 to 6>
    // Item inventory buttons
    ORIGIN_FRAME_ITEM_BUTTON <0 to 5>
    // The buttons altering the minimap
    ORIGIN_FRAME_MINIMAP_BUTTON
    // Indices:
    // 0 = Menu
    // 1 = Allies
    // 2 = Log
    // 3 = Quest
    ORIGIN_FRAME_SYSTEM_BUTTON <0 to 3>

    Here is a basic example that creates a custom timerdialog window:

    set GameUI = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)
    set UIMain = BlzCreateFrame("TimerDialog", GameUI, 0, 0)
    call BlzFrameSetPoint(UIMain, FRAMEPOINT_CENTER, GameUI, FRAMEPOINT_CENTER, 0.25, 0.055)
    call BlzFrameSetSize(UIMain, 0.3, 0.7)

    Take a look at the .fdf files in the game’s CASC or point 1.3 (refer to this document’s table of contents for reference) it should give you some ideas.

    Parameters

    • frameType: HandleHolder<"originframetype">
    • index: number

      to high values will return the frame from the last valid Index.

    Returns HandleHolder<"framehandle">

    Note

    The first time a Frame enters the map's script it takes a handleId.

    Note

    This is up for edition, this native is lacking a more in-depth explanation. For example a list of all of the originframetypes, and their possible indexes.

    Patch

    1.31

Generated using TypeDoc