- Joined
- Jul 18, 2010
- Messages
- 2,377
Jump to Hiding
Jump to ChildFrames
Originframetypes are built in frames managing the default game ui. ORIGIN_FRAME_GAME_UI is our key to generate new container frames. In other tutorials and in many examples, ORIGIN_FRAME_GAME_UI is used as parent for custom created frames. That is done because every frame needs a parent.
Many OriginFrames are nothing special. One can think of originframes as another way to access this frames.
One can get a framehandle out of such an originframetype with that native. We need framehandles to use it inside the framehandle natives.
For the first argument pick one of the constants, for the second one choose in most cases 0. If the origin frame has more than 1 entity, you can get other ones of that originframetype by using a higher number.
Example Frame-GameUI:

From Reforged onwards the World Frame covers the full screen on default. But that black background box might disturb one still. It is additional BACKDROP Blizzard added for the Bottom UI but it is not hidden by BlzHideOriginFrames hence one needs an additional line of code that hides:

There are other options, if one wants the Frame logical visible but not seeable: For example one could reduced the ySize.
There is a not see able Frame At the default position of the CommandButton that blocks mouse clicking at that spot, this frame's position and size is affected by ConsoleUI hence before Warcraft 3 V1.32.6, it was suggested to do things to "ConsoleUI" to get this spot useable when the UI was altered much anyway. With 1.32.6 one can access that Frame and hide it directly with such an action.

When one plans to move some originframes, it is also advised to use this line of code
1.32.6 gave the ability to acces the children of Frames.
Children of "ConsoleUI"/ORIGIN_FRAME_SIMPLE_UI_PARENT
Count: 8 to 9
[0] command button Parent
[1] BottomCenter UI parent (unit info- Inventory)
[2] ResourceBarFrame
[0] Mouse Listener (Gold)
[1] Mouse Listener (Lumber)
[2] Mouse Listener (UpKeep)
[3] Mouse Listener (Food)
[???] Fps/Apm/Ping display
[3] UpperButtonBarFrame
[0] Quest
[1] Menu
[2] Alliance
[3] Log
[4] MiniMapButtonBar
[0 to 4] Buttons 0(Top), 4(Bottom)
[5] command button mouse deadzone
[6] Hero ButtonBar
[0 to 6] HeroButtons
[7] Idle worker Button Container
[0] Button
[0] Charges Box (created with the first idle worker)
[8] World Object Hover info (exist after any object was hovered with the mouse)
Children of BottomCenterUI
Count: 8
[0] Single Unit "SimpleInfoPanelUnitDetail"
[1] Trainer "SimpleInfoPanelBuildingDetail"
[0] SimpleBuildTimeIndicator
[0] Bar Border
[1] Que Button Backgrounds
[2] Que Button next to the Progressbar
[3] Que Bottom Button Container
[0 to 5] Button
[4]
[2] Transporter "SimpleInfoPanelCargoDetail"
[0] CargoContainer
[0 to 9] Cargo Button Container (includes Box)
[0] Button
[1] Life Bar
[2] Mana Bar
[3] Item on Ground "SimpleInfoPanelItemDetail"
[4] selectable Gate/tree/etc "SimpleInfoPanelDestructableDetail"
[5] multiple unit group selection
[0] ContainerGroupButtons
[0 to 11] ButtonContainer
[0] Highlighter Background
[1] Button
[2] Life Bar
[3] Mana Bar
[6] Inventory Parent
[0 to 5] Inventory Button
[7] Inventory Cover (covers the inventory buttons when no inventory)
Children of ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR:
Count: 8
[0 to 7]: BuffIcons + mouse Listeners
Children of ORIGIN_FRAME_GAME_UI
Count: 14 on default. Without Multiboard, Leaderboard, TimerDialog, nor having quest Dialog clicked. With them it has 19.
[0] ORIGIN_FRAME_WORLD_FRAME
[1] Somehow affects the World Object Hover info box
[2] BottomUI Black Background "ConsoleUIBackdrop"
[3] Parent of ORIGIN_FRAME_PORTRAIT
[4] InventoryText, Related to the visuals of SimpleFrames, hiding it makes all SimpleFrames not visible but still clickable
[5] Day Time Clock & Minimap are affected by this one, maybe ancestor/Parent
[0] Affects the visual daytime clock (moving it has wierd effects)
[0] Day Time Clock Mouse Listener
[1] MinimapFrame
[6] CinematicPanel
[7] Chat/LogDialog
[8] AllianceDialog
[9] No idea
[10] Inside Menu (F10) (Probably EscMenuBackdrop)
[11] Chat Input box
[0]
[1]
[0]
[0]
[1]
[2]
[3]
[4]
[1]
[2]
[3]
[12] Option Menu
[13] Mouse Cursor
After anyone clicked the quest dialog 2 further ones are added
Custom added Frames takes slots after Chat/Log
With all
[0] ORIGIN_FRAME_WORLD_FRAME
[1] Somehow affects the World Object Hover info box
[2] BottomUI Black Background "ConsoleUIBackdrop"
[3] Parent of ORIGIN_FRAME_PORTRAIT
[4] InventoryText, Related to the visuals of SimpleFrames, hiding it makes all SimpleFrames not visible but still clickable
[5] Day Time Clock & Minimap are affected by this one, maybe ancestor/Parent
[6] CinematicPanel
[7] Chat/LogDialog
[8] Multiboard
[9] Leaderboard
[10] TimerDialog
[11] No Idea
[12] QuestDialog
[13] AllianceDialog
[14] No Idea
[15] EscMenuBackdrop
[16] Chat Input
[17] EscOptions
[18] Mouse Cursor (Parent)
Children of ORIGIN_FRAME_PORTRAIT
Count: 0
Children of Parent of ORIGIN_FRAME_PORTRAIT
Count: 8
[0] ORIGIN_FRAME_PORTRAIT
[1 to 7] ORIGIN_FRAME_HERO_BUTTON_INDICATOR
Children of ORIGIN_FRAME_WORLD_FRAME
Count: 1
[0] No idea
Children of ORIGIN_FRAME_HERO_BAR
Count: 7
The Hero Buttons
Children of ORIGIN_FRAME_HERO_BUTTON
Count: 3
[0] HP-Bar
[1] MP-Bar
[2] Unspent-SkillPointsBox (only when this slot ever had unspent SkillPoints)
Children of ORIGIN_FRAME_TOOLTIP
Count: 1
Children of ORIGIN_FRAME_UBERTOOLTIP
Count: 1
Children of ORIGIN_FRAME_ITEM_BUTTON/ORIGIN_FRAME_COMMAND_BUTTON
Count: 0, 1 or 3 depends, if this slot ever was used or contained charges
Children of "SimpleInfoPanelIconDamage"...
Count: 1
[0] The mouse hover listener.


UI: Change Lumber Text
[JASS/AI] - UI: Create a TextButton
[JASS/AI] - UI: Positionate Frames (important)
UI: toc-Files
UI: Reading a FDF
UI - The concept of Parent-Frames
[JASS/AI] - UI: FrameEvents and FrameTypes
UI: Frames and Tooltips
[JASS/AI] - UI: Creating a Bar
UI - Simpleframes
UI: What are BACKDROPs?
UI: GLUEBUTTON
UI: TEXTAREA the scrolling Text Frame
UI: EditBox - Text Input
[JASS/AI] - UI: Creating a Cam control
UI: Showing 3 Multiboards
UI: OriginFrames
Default Names for BlzGetFrameByName (Access to Existing game-Frames)
[JASS/AI] - UI: List - Default MainFrames (built in CreateAble)
Jump to ChildFrames
Originframetypes are built in frames managing the default game ui. ORIGIN_FRAME_GAME_UI is our key to generate new container frames. In other tutorials and in many examples, ORIGIN_FRAME_GAME_UI is used as parent for custom created frames. That is done because every frame needs a parent.
Many OriginFrames are nothing special. One can think of originframes as another way to access this frames.
One can get a framehandle out of such an originframetype with that native. We need framehandles to use it inside the framehandle natives.
JASS:
native BlzGetOriginFrame takes originframetype frameType, integer index returns framehandle
For the first argument pick one of the constants, for the second one choose in most cases 0. If the origin frame has more than 1 entity, you can get other ones of that originframetype by using a higher number.
Example Frame-GameUI:
BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)
OriginframeType InfoTable
������Hiding default UI
There exists a native to hide all of them.call BlzHideOriginFrames(true)
, After one used it the screen will look like that. The ability buttons will appear as soon the player selected a unit.
From Reforged onwards the World Frame covers the full screen on default. But that black background box might disturb one still. It is additional BACKDROP Blizzard added for the Bottom UI but it is not hidden by BlzHideOriginFrames hence one needs an additional line of code that hides:
call BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false)

There are other options, if one wants the Frame logical visible but not seeable: For example one could reduced the ySize.
BlzFrameSetSize(BlzGetFrameByName("ConsoleUIBackdrop",0), 0, 0.0001)
There is a not see able Frame At the default position of the CommandButton that blocks mouse clicking at that spot, this frame's position and size is affected by ConsoleUI hence before Warcraft 3 V1.32.6, it was suggested to do things to "ConsoleUI" to get this spot useable when the UI was altered much anyway. With 1.32.6 one can access that Frame and hide it directly with such an action.
BlzFrameSetVisible(BlzFrameGetChild(BlzGetFrameByName("ConsoleUI", 0), 5), false)
Alternative Hide only Bottom UI
There are also some other options to "hide" parts of the UI. One is to move the bottom Of "ConsoleUI" a little bit lower that has to be done at map Init, doing it later leads to crashes.BlzFrameSetAbsPoint(BlzGetFrameByName("ConsoleUI", 0), FRAMEPOINT_BOTTOM, 0.4, -0.18)

When one plans to move some originframes, it is also advised to use this line of code
BlzEnableUIAutoPosition(false)
. That will stop the reposing of some of this built in frames when the user changes resolution or windowMode.1.32.6 gave the ability to acces the children of Frames.
BlzFrameGetChildrenCount(frame) : integer
Returns the amount of non String/Texture childFrames.
BlzFrameGetChild (frame, index) -> frame
Returns the non String/Texture childFrame with that index: should be called with 0 to BlzFrameGetChildrenCount(frame) - 1. Child-Frames take Indexes based on their Level. The child with the lowest Level takes the lowest index.
Children of "ConsoleUI"/ORIGIN_FRAME_SIMPLE_UI_PARENT
Count: 8 to 9
[0] command button Parent
[1] BottomCenter UI parent (unit info- Inventory)
[2] ResourceBarFrame
[0] Mouse Listener (Gold)
[1] Mouse Listener (Lumber)
[2] Mouse Listener (UpKeep)
[3] Mouse Listener (Food)
[???] Fps/Apm/Ping display
[3] UpperButtonBarFrame
[0] Quest
[1] Menu
[2] Alliance
[3] Log
[4] MiniMapButtonBar
[0 to 4] Buttons 0(Top), 4(Bottom)
[5] command button mouse deadzone
[6] Hero ButtonBar
[0 to 6] HeroButtons
[7] Idle worker Button Container
[0] Button
[0] Charges Box (created with the first idle worker)
[8] World Object Hover info (exist after any object was hovered with the mouse)
Children of BottomCenterUI
Count: 8
[0] Single Unit "SimpleInfoPanelUnitDetail"
[1] Trainer "SimpleInfoPanelBuildingDetail"
[0] SimpleBuildTimeIndicator
[0] Bar Border
[1] Que Button Backgrounds
[2] Que Button next to the Progressbar
[3] Que Bottom Button Container
[0 to 5] Button
[4]
[2] Transporter "SimpleInfoPanelCargoDetail"
[0] CargoContainer
[0 to 9] Cargo Button Container (includes Box)
[0] Button
[1] Life Bar
[2] Mana Bar
[3] Item on Ground "SimpleInfoPanelItemDetail"
[4] selectable Gate/tree/etc "SimpleInfoPanelDestructableDetail"
[5] multiple unit group selection
[0] ContainerGroupButtons
[0 to 11] ButtonContainer
[0] Highlighter Background
[1] Button
[2] Life Bar
[3] Mana Bar
[6] Inventory Parent
[0 to 5] Inventory Button
[7] Inventory Cover (covers the inventory buttons when no inventory)
Children of ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR:
Count: 8
[0 to 7]: BuffIcons + mouse Listeners
Children of ORIGIN_FRAME_GAME_UI
Count: 14 on default. Without Multiboard, Leaderboard, TimerDialog, nor having quest Dialog clicked. With them it has 19.
[0] ORIGIN_FRAME_WORLD_FRAME
[1] Somehow affects the World Object Hover info box
[2] BottomUI Black Background "ConsoleUIBackdrop"
[3] Parent of ORIGIN_FRAME_PORTRAIT
[4] InventoryText, Related to the visuals of SimpleFrames, hiding it makes all SimpleFrames not visible but still clickable
[5] Day Time Clock & Minimap are affected by this one, maybe ancestor/Parent
[0] Affects the visual daytime clock (moving it has wierd effects)
[0] Day Time Clock Mouse Listener
[1] MinimapFrame
[6] CinematicPanel
[7] Chat/LogDialog
[8] AllianceDialog
[9] No idea
[10] Inside Menu (F10) (Probably EscMenuBackdrop)
[11] Chat Input box
[0]
[1]
[0]
[0]
[1]
[2]
[3]
[4]
[1]
[2]
[3]
[12] Option Menu
[13] Mouse Cursor
After anyone clicked the quest dialog 2 further ones are added
Custom added Frames takes slots after Chat/Log
With all
[0] ORIGIN_FRAME_WORLD_FRAME
[1] Somehow affects the World Object Hover info box
[2] BottomUI Black Background "ConsoleUIBackdrop"
[3] Parent of ORIGIN_FRAME_PORTRAIT
[4] InventoryText, Related to the visuals of SimpleFrames, hiding it makes all SimpleFrames not visible but still clickable
[5] Day Time Clock & Minimap are affected by this one, maybe ancestor/Parent
[6] CinematicPanel
[7] Chat/LogDialog
[8] Multiboard
[9] Leaderboard
[10] TimerDialog
[11] No Idea
[12] QuestDialog
[13] AllianceDialog
[14] No Idea
[15] EscMenuBackdrop
[16] Chat Input
[17] EscOptions
[18] Mouse Cursor (Parent)
Children of ORIGIN_FRAME_PORTRAIT
Count: 0
Children of Parent of ORIGIN_FRAME_PORTRAIT
Count: 8
[0] ORIGIN_FRAME_PORTRAIT
[1 to 7] ORIGIN_FRAME_HERO_BUTTON_INDICATOR
Children of ORIGIN_FRAME_WORLD_FRAME
Count: 1
[0] No idea
Children of ORIGIN_FRAME_HERO_BAR
Count: 7
The Hero Buttons
Children of ORIGIN_FRAME_HERO_BUTTON
Count: 3
[0] HP-Bar
[1] MP-Bar
[2] Unspent-SkillPointsBox (only when this slot ever had unspent SkillPoints)
Children of ORIGIN_FRAME_TOOLTIP
Count: 1
Children of ORIGIN_FRAME_UBERTOOLTIP
Count: 1
Children of ORIGIN_FRAME_ITEM_BUTTON/ORIGIN_FRAME_COMMAND_BUTTON
Count: 0, 1 or 3 depends, if this slot ever was used or contained charges
Children of "SimpleInfoPanelIconDamage"...
Count: 1
[0] The mouse hover listener.
Hiding default UI
There exists a native to hide all of them.call BlzHideOriginFrames(true)
, After one used it the screen will look like that. The ability buttons will appear as soon the player selected a unit after hide was used.
1.31
Beta Nov 19 2019
After one has hidden the default ui, it would be great to use the now gained space with the playable game. The next jass line extents the world to fullscreen. The World_FRAME will copy all points of Game_UI.
JASS:
call BlzFrameSetAllPoints(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0))
In this reforge beta version the world Frame is fullscreen, but there was a black background box added behind the bottom UI which is not hidden by HideOrigin. It can be hidden with:
In the Beta also new fdf was deployed allowing to access item and Command Buttons over BlzGetFrameByName for some reason in this version moving the frames with their originframe access buggs.
("CommandButton_0", 0)
("CommandButton_11", 0)
("InventoryButton_0", 0)
("InventoryButton_5", 0)
("MiniMapFrame", 0)
call BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false)
In the Beta also new fdf was deployed allowing to access item and Command Buttons over BlzGetFrameByName for some reason in this version moving the frames with their originframe access buggs.
("CommandButton_0", 0)
("CommandButton_11", 0)
("InventoryButton_0", 0)
("InventoryButton_5", 0)
("MiniMapFrame", 0)

Other UI-Frame Tutorials
The following links might provide more insight into this subject.UI: Change Lumber Text
[JASS/AI] - UI: Create a TextButton
[JASS/AI] - UI: Positionate Frames (important)
UI: toc-Files
UI: Reading a FDF
UI - The concept of Parent-Frames
[JASS/AI] - UI: FrameEvents and FrameTypes
UI: Frames and Tooltips
[JASS/AI] - UI: Creating a Bar
UI - Simpleframes
UI: What are BACKDROPs?
UI: GLUEBUTTON
UI: TEXTAREA the scrolling Text Frame
UI: EditBox - Text Input
[JASS/AI] - UI: Creating a Cam control
UI: Showing 3 Multiboards
UI: OriginFrames
Default Names for BlzGetFrameByName (Access to Existing game-Frames)
[JASS/AI] - UI: List - Default MainFrames (built in CreateAble)
Attachments
Last edited: