• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

UI: OriginFrames

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.
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

������
ConstantIndexesinfo2img

ORIGIN_FRAME_GAME_UI
without it nothing will be displayed.

ORIGIN_FRAME_WORLD_FRAME
the visible playground, units, items, effects, fog... every object participating in the game is displayed on it. World.jpg

ORIGIN_FRAME_HERO_BAR
parent of all HERO_BUTTONS, HeroButtons share the same visibility.HeroBar.jpg

ORIGIN_FRAME_HERO_BUTTON
0 to 6the clickable buttons of own/allied heroes on the left of the screenHeroButtons.jpg

ORIGIN_FRAME_HERO_HP_BAR
0 to 6connected to HeroButtonsHero_HP&Mana_Bar.jpg

ORIGIN_FRAME_HERO_MANA_BAR
0 to 6connected to HeroButtons

ORIGIN_FRAME_HERO_BUTTON_INDICATOR
0 to 6The glowing when a hero has skillpoints; connected to HeroButtons. They reappear when a hero gains a new skillpoint even when all originframes are hidden.Hero_Button_Indicator.jpg

ORIGIN_FRAME_ITEM_BUTTON
0 to 5Items in the inventory. Reappear/updates every selection, When its parent is visible. In 1.32.x Moving this glitches instead one has to move BlzGetFrameByName("InventoryButton_0", 0)... to ("InventoryButton_5", 0)ItemButtons.jpg

ORIGIN_FRAME_COMMAND_BUTTON
0 to 11the buttons to order units around, like ITEM_BUTTON, Reappear/update every selection. In 1.32.x Moving this glitches instead one has to move BlzGetFrameByName("CommandButton_0", 0)... to ("CommandButton_11", 0)COMMAND_BUTTON.jpg

ORIGIN_FRAME_SYSTEM_BUTTON
0 to 3Menu, allies, Log/chat, QuestSystem Buttons.jpg

ORIGIN_FRAME_PORTRAIT
Face of the main selected Unit, uses a different coordination system 0,0 being the absolute bottomLeft which makes it difficult to be used together with other frames (not 4:3, like for the others)PORTRAIT.jpg

ORIGIN_FRAME_MINIMAP

ORIGIN_FRAME_MINIMAP_BUTTON
0 to 40 is the Button at top to 4 Button at the bottomMiniMap Buttons.jpg

ORIGIN_FRAME_TOOLTIP

ORIGIN_FRAME_UBERTOOLTIP
Handles the Tooltip window

ORIGIN_FRAME_CHAT_MSG

ORIGIN_FRAME_UNIT_MSG
print frame for game display message / DisplayTextToPlayerUnit_Msg.jpg

ORIGIN_FRAME_TOP_MSG
Frame: UpKeep Change Warning Message, below the dayTime ClockTop Msg.jpg

ORIGIN_FRAME_PORTRAIT_HP_TEXT
V1.32+ Does not exist until any selection was done and a short time passed. Force a Selection and wait a short time. Does only pos itself correctly with
FRAMEPOINT_CENTER. Likely a String-Frame with showing many of the behaviours a String-Frame have (crash one SetAlpha/Level, BlzFrameGetText returns the shown Value, BlzFrameSetFont works...).
BloodMageFaceHPText.jpg

ORIGIN_FRAME_PORTRAIT_MANA_TEXT
Like ORIGIN_FRAME_PORTRAIT_HP_TEXTBloodMageFaceMPText.jpg

ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR
The Frame has a size to fit all 8 possible Buffs
BuffBar.jpg

ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR_LABEL
V1.32+ Attached to ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR on default
BuffLabel.jpg

ORIGIN_FRAME_SIMPLE_UI_PARENT
V1.32+

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.
Reforged BlzHideOriginFrames.jpg

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)
Reforged HideOrign and Black Box.jpg
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)
Move Bottom.jpg

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.
HideOriginFrames.jpg

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:
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)


World Fullscreen.jpg



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

  • OriginFrame HideShow.w3x
    18.4 KB · Views: 666
  • OriginFrame HideShow Reforged.w3x
    18.7 KB · Views: 561
Last edited:
Level 14
Joined
Jan 16, 2009
Messages
716
One interesting note is that the portrait is not on the 4:3 screen but on the whole screen.
(0,0) would place it at the the bottom left corner of your screen and (0.8,0.6) at the top right corner.
This makes it quite hard (but possible with some math) to place the portrait in relation with other elements that are on the 4:3 screen.
 
So this shows how to "get" a frame, how to set/hide a specific frame then?
One uses BlzFrameSetVisible takes framehandle frame, boolean visible returns nothing on the frame. This is not recommended for SimpleFrame childs of type String or Texture.

That line would show the Hero_Bar. One should use it, if one wants the hero Icons back after one used BlzHideOriginFrames
JASS:
call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_HERO_BAR,0), true)
 

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,864
One uses BlzFrameSetVisible takes framehandle frame, boolean visible returns nothing on the frame. This is not recommended for SimpleFrame childs of type String or Texture.

That line would show the Hero_Bar. One should use it, if one wants the hero Icons back after one used BlzHideOriginFrames
JASS:
call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_HERO_BAR,0), true)
But if one wants to show/hide for one player, then we have to do it by local player, right? It's the only option?
 
I think so, yes. One has to do use GetLocalPlayer for that. In that context some people on hive discord said that using BlzGetOriginFrame inside a local block can disconnect. They recommended to use BlzGetOriginFrame synced and do only the action (show, hide, enable, repos ...) inside the GetLocalPlayer block.

Edit: BlzGetOriginFrame and/or BlzGetFrameByName will dc the game, if used localy only.

Edit Edit Added 16 July 2019 : This is only partly correct. BlzGetFrameByName/BlzGetOriginFrames can be used in GetLocalPlayer blocks without desync when the function using the same arguments was called at an earlier time for all players. My explanition for that is, this functions are creating a new handle when that frame did not have a handle yet. I was wondering before why the handleIds of basic frames where so instable different in my tests. When the first call is in a GetLocalPlayer block the handle stack gets desync and the game breaks. Custom Created Frames get handles at creation and won't desync, when they were created for all players.
 
Last edited:
Level 3
Joined
Mar 11, 2019
Messages
31
How do I show a units HP/mana numbers and the inventory/minimap after hiding the UI? And I can't seem to make the unit's 3d portrait hidden either.
 
Last edited:
show a units HP/mana numbers
I do not know how to access that frame. Its one of the 5 (buffs, time clock texture, hp/Mp, Idle wroker and targeting error/help message)

minimap after hiding the UI? And I can't seem to make the unit's 3d portrait hidden either.
Some examples to make frames visible again.
JASS:
call BlzFrameSetVisible(BlzGetFrameByName("UpperButtonBarFrame",0),true) //Show Quests, Menu, Allies, Log
call BlzFrameSetVisible(BlzGetFrameByName("ResourceBarFrame",0),true) //Show Gold, Lumber, food and Upkeep; also enables /fps /ping /apm
call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_PORTRAIT,0), true) //show the 3D Face
call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_HERO_BAR,0), true) //Show the Hero Icons at left top of the screen
call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_MINIMAP,0), true) //Show MiniMap
call BlzFrameSetVisible(BlzFrameGetParent(BlzGetFrameByName("SimpleInfoPanelUnitDetail",0)),true)//Show the parent of the SimpleInfoPanelUnitDetail will show unit stats and inventory
call BlzFrameSetParent(BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_ITEM_BUTTON, 0)), BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_COMMAND_BUTTON, 0)))//Change parentShip of the Inventory to the command_Buttons Parent. Normaly the Inventory belongs to the SimpleInfoPanelUnitDetail parent, which could be still hidden.
 
Last edited:
Level 3
Joined
Mar 11, 2019
Messages
31
I do not know how to access that frame. Its one of the 4 (buffs, time clock texture, hp/Mp and targeting error/help message)


Some examples to make frames visible again.
JASS:
call BlzFrameSetVisible(BlzGetFrameByName("UpperButtonBarFrame",0),true) //Show Quests, Menu, Allies, Log
call BlzFrameSetVisible(BlzGetFrameByName("ResourceBarFrame",0),true) //Show Gold, Lumber, food and Upkeep; also enables /fps /ping /apm
call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_PORTRAIT,0), true) //show the 3D Face
call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_HERO_BAR,0), true) //Show the Hero Icons at left top of the screen
call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_MINIMAP,0), true) //Show MiniMap
call BlzFrameSetVisible(BlzFrameGetParent(BlzGetFrameByName("SimpleInfoPanelUnitDetail",0)),true)//Show the parent of the SimpleInfoPanelUnitDetail will show unit stats and inventory
call BlzFrameSetParent(BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_ITEM_BUTTON, 0)), BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_COMMAND_BUTTON, 0)))//Change parentShip of the Inventory to the command_Buttons Parent. Normaly the Inventory belongs to the SimpleInfoPanelUnitDetail parent, which could be still hidden.

Cool thanks for your help. Sorry I'm a big noob when it comes to this so I have a dumb question, if I change "true" to "false" would it remove them instead?
 
Level 3
Joined
Mar 11, 2019
Messages
31
Yes, false would hide them instead.
Hmmm for some reason this code


Code:
function InitUI takes nothing returns nothing
  
  
    call BlzHideOriginFrames(true)
    call BlzFrameSetAllPoints(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0))
    call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_PORTRAIT,0), false)

endfunction
looks like this
hmmmmm.png
Am I doing something wrong?
 
Last edited:

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,864
Probably because you deleted
JASS:
call BlzFrameSetAllPoints(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0))
too?
For future reference use jass tags instead of code ones when showing code.
 
Level 3
Joined
Mar 11, 2019
Messages
31
Probably because you deleted
JASS:
call BlzFrameSetAllPoints(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0))
too?
For future reference use jass tags instead of code ones when showing code.
Nope, I put it back in and it just removes the black bar. Of course the unit portrait/buttons disappear when a unit isn't selected, but when I select the villager it comes back.
222f2f2ff.png
 
Last edited:
Level 3
Joined
Mar 11, 2019
Messages
31
Figured all the other stuff out. This jass stuff is confusing lol.

question:

How do I get ORIGIN_FRAME_HERO_HP_BAR to show up without the hero image?


Edit: Nevermind, I just detached it from the parent and moved it off the screen
 
Last edited:
Level 3
Joined
Oct 9, 2012
Messages
28
Is there an fdf file for the OriginFrames? What if I want to make extra inventory UIs, do I need to write a new fdf from scratch, and handle events, tooltips, icons?
 
Is there an fdf file for the OriginFrames? What if I want to make extra inventory UIs, do I need to write a new fdf from scratch, and handle events, tooltips, icons?
I did not find any inventory fdf. Currently one would have to recreate the whole behaviour when one wants additional visible/clickable inventory slots. With everything that your map needs of them which includes probably: control click events, tooltips, icons, cooldown models and charges.
Each inventory slot would be a GLUEBUTTON, BUTTON or SIMPLEBUTTON.

If you find basic types you can use. Then you don't need to create a new fdf, Althrough fdf is cleaner and more powerful if it works.
 
Level 7
Joined
Jun 14, 2009
Messages
235
Do you know if these methods could be used to modify tooltips? Like to get the text within a tooltips and change it?
 
Level 3
Joined
Oct 9, 2012
Messages
28
I did not find any inventory fdf. Currently one would have to recreate the whole behaviour when one wants additional visible/clickable inventory slots. With everything that your map needs of them which includes probably: control click events, tooltips, icons, cooldown models and charges.
Each inventory slot would be a GLUEBUTTON, BUTTON or SIMPLEBUTTON.

If you find basic types you can use. Then you don't need to create a new fdf, Althrough fdf is cleaner and more powerful if it works.
Thanks for your reply. I thought it would be easier with new natives. sigh..
 
Level 19
Joined
Jul 12, 2010
Messages
1,713
@Tasyen goes at it again with the epic UI modifications!

Nobody gonna mention this?
WC3ScrnShot_071519_001.jpg

It shows when selection is clear, when you select an item on the ground and when you select an enemy unit without inventory.

Is it possible to hide that without hiding the whole Inventory UI?
 
Last edited:
Its a consequence of showing the parent of "SimpleInfoPanelUnitDetail". Which enable the inventory, the item on ground info, the destructable screen and that texture.
If one would only need to show the inventory and the unit stats. One can shift the parentship to the command buttons parent then one sees the itembuttons only when one has selected an unit.
JASS:
call BlzFrameSetParent(BlzGetFrameByName("SimpleInfoPanelUnitDetail",0), BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_COMMAND_BUTTON, 0))) //show Unit Detail when seeing command card
call BlzFrameSetParent(BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_ITEM_BUTTON, 0)), BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_COMMAND_BUTTON, 0))) //show inventory when seen command card

If one needs the item on the ground description / destructable feature, no idea how without that texture.
 
Level 21
Joined
Mar 15, 2010
Messages
240
@Tasyen goes at it again with the epic UI modifications!

Nobody gonna mention this?

It shows when selection is clear, when you select an item on the ground and when you select an enemy unit without inventory.

Is it possible to hide that without hiding the whole Inventory UI?

I found a solution! What I did was...
  1. Locate the "HumanUITile-InventoryCover" texture through Warcraft 3 Viewer. This is the texture that pops up next to item descriptions, etc.
  2. I then saved the texture as a TGA file.
  3. I then opened the file in Photoshop and made it transparent by editing the alpha channel.

I guess you can do this for much of the UI, as long as there's gameplay underneath?
 
Last edited:
I found a solution! What I did was...
  1. Locate the "HumanUITile-InventoryCover" texture through Warcraft 3 Viewer. This is the texture that pops up next to item descriptions, etc.
  2. I then saved the texture as a TGA file.
  3. I then opened the file in Photoshop and made it transparent by editing the alpha channel.
That is a solution yeah.
Then one Imports that transparent blp into ones map overwritting the default one. But one does not need to base the blp on the default one. With a smaller blp it is also working.

ui\console\human\humanuitile-inventorycover.blp
ui\console\nightelf\nightelfuitile-inventorycover.blp
ui\console\orc\orcuitile-inventorycover.blp
ui\console\undead\undeaduitile-inventorycover.blp

To get rid of the inventory text one replaces the text in game interface to " " (a single space) of the field INVENTORY.
 
Level 13
Joined
Nov 7, 2014
Messages
571
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))

How does one revert ORIGIN_FRAME_WORLD_FRAME back to its "non-fullscreen" points?

This seems to work but the values might be wrong...
Lua:
local f = BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0)
local r = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)

local pt

pt = FRAMEPOINT_BOTTOMLEFT
BlzFrameSetPoint(f, pt, r, pt, 0.0, 0.13)

pt = FRAMEPOINT_BOTTOMRIGHT
BlzFrameSetPoint(f, pt, r, pt, 0.0, 0.13)

pt = FRAMEPOINT_TOPRIGHT
BlzFrameSetPoint(f, pt, r, pt, 0.0, -0.020)

pt = FRAMEPOINT_TOPLEFT
BlzFrameSetPoint(f, pt, r, pt, 0.0, -0.020)
 
The values look good to me.

I found a solution! What I did was...
  1. Locate the "HumanUITile-InventoryCover" texture through Warcraft 3 Viewer. This is the texture that pops up next to item descriptions, etc.
  2. I then saved the texture as a TGA file.
  3. I then opened the file in Photoshop and made it transparent by editing the alpha channel.

I guess you can do this for much of the UI, as long as there's gameplay underneath?
The Reforge Beta (nov 19 2019) has access to that frame one can just set its alpha to 0 and it is not visible anymore.
call BlzFrameSetAlpha( BlzGetFrameByName("SimpleInventoryCover", 0), 0)


After one has hidden the default UI the Item Buttons Slots don't have a background anymore but still block the screen. Might good to know where they are by giving them the backgrounds back.
 

Attachments

  • Custom Item Slot Backgrounds.w3x
    18.4 KB · Views: 256
Last edited:
Level 4
Joined
Jul 9, 2007
Messages
50
Hey Tasyen,

Thanks for the amazing tutorials!

Now with reforged online, I found that with BlzHideOriginFrames() you are left with a black bar at the bottom at the width of the 4:3 screen.
You can get rid of it with BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false).
Maybe you could update your tutorial in that part?

I also have a question:
I seem to be unable to put frames outside the 4:3 screen. Even when I anchor something to the top-right of ORIGIN_FRAME_WORLD_FRAME, it will still be in the 4:3 screen. Also, if I add a positive offset in x, the frame will but cut off at the edge of the 4:3 screen.
Do you have a solution to this? I think it should be possible because the ORIGIN_FRAME_HERO_BAR is also outside, anchored to the left of the screen.
However, I couldn't find its fdf in ui/framedef/ui/.

Code:
frame = BlzCreateFrameByType("BACKDROP", "myframe", BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), "", 0)
--BlzFrameSetPoint(frame, FRAMEPOINT_TOPRIGHT, BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), FRAMEPOINT_TOPRIGHT, -0.01, -0.06)
BlzFrameSetPoint(frame, FRAMEPOINT_TOPRIGHT, BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), FRAMEPOINT_TOPRIGHT, 0.1, -0.06)
BlzFrameSetSize(frame, 0.2, 0.3)
BlzFrameSetTexture(frame, "Textures\\black32.blp", 0, true)
 
Now with reforged online, I found that with BlzHideOriginFrames() you are left with a black bar at the bottom at the width of the 4:3 screen.
You can get rid of it with BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false).
Maybe you could update your tutorial in that part?
The infos were already there, but yeah should be the default one, the old is now in a hidden tag, I did not update the map, uploaded another one for reforged.

I seem to be unable to put frames outside the 4:3 screen. Even when I anchor something to the top-right of ORIGIN_FRAME_WORLD_FRAME, it will still be in the 4:3 screen. Also, if I add a positive offset in x, the frame will but cut off at the edge of the 4:3 screen.
Do you have a solution to this? I think it should be possible because the ORIGIN_FRAME_HERO_BAR is also outside, anchored to the left of the screen.
Not really. For some reasons custom Frames can not leave the 4:3 Screen, I say custom cause there are Frames that can leave it like Multiboards, TimerDialogs, LeaderBoard unsure about that Hero Buttons they could be simple frames which would free them anyway from the restriction. Currently only custom SimpleFrames can leave the 4:3 Part.
 
Last edited:
One needs to set 2 opposite corner Points to move the minimap, a Lua example.

Lua:
do
    local realFunc = MarkGameStarted
    function MarkGameStarted()
      realFunc()
      local frame = BlzGetOriginFrame(ORIGIN_FRAME_MINIMAP, 0)
      BlzFrameSetAbsPoint(frame, FRAMEPOINT_BOTTOMLEFT, 0.2, 0.2)
      BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPRIGHT, 0.4, 0.4)
    end
end

Edited: Replaced selfexecution with a less problematic approach
 
Last edited:
Hello Tasyen,

I want mouse click to console interface area and keep the console buttons (i just move the buttons).
It seems that the console interface area is still hidden there.
i tried fucntion
Code:
BlzFrameSetAbsPoint(BlzGetFrameByName("ConsoleUI", 0), FRAMEPOINT_BOTTOM, 0.4, -0.18)
but button position is deviated.

Could you help me how to mouse click to console interface area and keep the console buttons?

upload_2020-3-8_1-30-26.png
 
Level 3
Joined
Jan 20, 2020
Messages
48
So how exactly do I show the inventory of units after I've hidden origin frames and the console background?
This doesn't seem to work:
call BlzFrameSetVisible(BlzGetFrameByName("ORIGIN_FRAME_ITEM_BUTTON", 0), true)
 
Hide origin Frames does not hide the item buttons itself, it hides one of their ancestors. A Frame needs all of his ancestor-Frames visible, to be visible itself.
The item buttons are an offspring of the Parent of the bottom center Unit Info Panel, hence you will end up with both of them visible.
If that is not a problem then this line of code would show them:
BlzFrameSetVisible(BlzFrameGetParent(BlzGetFrameByName("SimpleInfoPanelUnitDetail", 0)), true)

In the past I suggested to change parentship of the item buttons. But doing that stoped the item cooldown models form being shown.
 
Level 3
Joined
Jan 20, 2020
Messages
48
Hide origin Frames does not hide the item buttons itself, it hides one of their ancestors. A Frame needs all of his ancestor-Frames visible, to be visible itself.
The item buttons are an offspring of the Parent of the bottom center Unit Info Panel, hence you will end up with both of them visible.
If that is not a problem then this line of code would show them:
BlzFrameSetVisible(BlzFrameGetParent(BlzGetFrameByName("SimpleInfoPanelUnitDetail", 0)), true)

In the past I suggested to change parentship of the item buttons. But doing that stoped the item cooldown models form being shown.

Thank you for elaborating! All these scripts befuddle me - these all seem extremely useful; I just wish Blizz built all of this stuff into the GUI; SC2 had more UI related stuff built right into its trigger editor - I was surprised to see that they didn't do the same with Reforged.
 
Level 3
Joined
Jan 20, 2020
Messages
48

One other thing - is it normal that when you go in and out of cinematic mode that the game messes up the UI? I've been having to re-run the hide origins scripts whenever I go out of cinematic mode, but I may be doing something wrong
 
In reforged that happens to me as well (but not in 1.31.1). The bottom Center Unit Info Frames and the Portrait are visible again after having Entered & Left the cinimatic mode.

SC2 had more UI related stuff built right into its trigger editor - I was surprised to see that they didn't do the same with Reforged.
Warcraft 3's GUI Triggers misses a lot of features that the game provide, even outside of this frame-UI features.
 
Top