BlzGetOriginFrame
- Parameters
-
frameType originframetype
index integer
to high values will return the frame from the last valid Index.
- comment
Get a
framehandle
by specifying a specificoriginframetype
and index (in most cases it should be 0 (first index), however it can go above 0 when using originframetypes such asORIGIN_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.
- 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.
- note
The first time a Frame enters the map's script it takes a handleId.
- patch
1.31
- return type
framehandle
- Source code
native BlzGetOriginFrame takes originframetype frameType, integer index returns framehandle
- Source
- ui.j
- wc3modding.com
- BlzGetOriginFrame