OK.
I have read some of @Tasyen amazing tutorials about UI Frames.
I feel ready to start creating my own UI elements.
But once again in Warcraft 3 nothing works like your intuition would let you think.
Before starting to make my own UI frames, I wanted to hide the Origin Frame and the remaining Black Backdrop. I do this at map init, and so far so good.
Now I wanted to make a few elements visible again, and modifying a few others.
Some frames just refuse to show.
Here is the function I call at map init :
I use the local fh even when not really needed, but I did this in case I would need further modifications.
Anyways, as you can see in comments on the code, I can't seem to be able to prevent the Main Frame Border (I don't want stones around my main frame like in the human UI !) - But I guess there that I am not using the right Frame Names.
As for the Portrait not showing, nor the 3 upper buttons, I don't understand why they don't show either.
After the map is initialized, I try to change these 3 buttons like I have seen on one of @Tasyen tutorials, so I use another function :
So I want to know, while I'm at it if, once the 3 buttons finally decide to show, this function will indeed place them on the top left of the 4:3 screen, one below the other.
By the way, reading dozens of fdf files, the frame name for the portrait, the hero bar and hero button ...and maybe even the frames borders seem nowhere to be found....
EDIT : found a typo in my second function, it should be
I have read some of @Tasyen amazing tutorials about UI Frames.
I feel ready to start creating my own UI elements.
But once again in Warcraft 3 nothing works like your intuition would let you think.
Before starting to make my own UI frames, I wanted to hide the Origin Frame and the remaining Black Backdrop. I do this at map init, and so far so good.
Now I wanted to make a few elements visible again, and modifying a few others.
Some frames just refuse to show.
Here is the function I call at map init :
JASS:
function UIInit takes nothing returns nothing
local framehandle fh=null
local framehandle menu=null
local framehandle log=null
local framehandle help=null
// Hide standard UI
call BlzHideOriginFrames(true)
call BlzEnableUIAutoPosition(false)
call BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop", 0), false)
// Show / hide some standard UI elements
set fh=BlzGetFrameByName("ResourceBarFrame", 0)
call BlzFrameSetVisible(fh, true)
set fh=BlzGetFrameByName("EscMenuBorder",0) // not working
call BlzFrameSetVisible(fh, false)
set fh=BlzGetFrameByName("CinematicBorder",0) // not working
call BlzFrameSetVisible(fh, false)
set fh=BlzGetFrameByName("ChatDialog", 0)
call BlzFrameSetVisible(fh, true)
set fh=BlzGetFrameByName("MiniMapFrame", 0)
call BlzFrameSetVisible(fh, true)
set fh=BlzGetFrameByName("MinimapSignalButton", 0)
call BlzFrameSetVisible(fh, true)
set fh=BlzGetOriginFrame(ORIGIN_FRAME_PORTRAIT, 0) // not working
call BlzFrameSetVisible(fh, true)
set fh=BlzGetFrameByName("ChatDialog", 0)
call BlzFrameSetVisible(fh, true)
set fh=BlzGetFrameByName("CommandBarFrame", 0)
call BlzFrameSetVisible(fh, true)
set fh=BlzGetOriginFrame(ORIGIN_FRAME_HERO_BAR, 0)
call BlzFrameSetVisible(fh, true)
set fh=BlzGetOriginFrame(ORIGIN_FRAME_HERO_BUTTON, 0)
call BlzFrameSetVisible(fh, true)
set menu=BlzGetFrameByName("UpperButtonBarMenuButton",0) // All 3 not working
set log=BlzGetFrameByName("UpperButtonBarChatButton",0)
set help=BlzGetFrameByName("UpperButtonBarQuestsButton",0)
call BlzFrameSetVisible(menu, true)
call BlzFrameSetVisible(log, true)
call BlzFrameSetVisible(help, true)
endfunction
I use the local fh even when not really needed, but I did this in case I would need further modifications.
Anyways, as you can see in comments on the code, I can't seem to be able to prevent the Main Frame Border (I don't want stones around my main frame like in the human UI !) - But I guess there that I am not using the right Frame Names.
As for the Portrait not showing, nor the 3 upper buttons, I don't understand why they don't show either.
After the map is initialized, I try to change these 3 buttons like I have seen on one of @Tasyen tutorials, so I use another function :
JASS:
function UISetup takes nothing returns nothing
local framehandle menu=null
local framehandle log=null
local framehandle help=null
set menu=BlzGetFrameByName("UpperButtonBarMenuButton",0)
set log=BlzGetFrameByName("UpperButtonBarChatButton",0)
set help=BlzGetFrameByName("UpperButtonBarQuestsButton",0)
call BlzFrameClearAllPoints(menu)
call BlzFrameClearAllPoints(log)
call BlzFrameClearAllPoints(help)
call BlzFrameSetAbsPoint(menu, FRAMEPOINT_LEFT, 0.0, 0.0)
call BlzFrameSetPoint(log, FRAMEPOINT_TOP, log, FRAMEPOINT_BOTTOM, 0.0, 0.0)
call BlzFrameSetPoint(help, FRAMEPOINT_TOP, log, FRAMEPOINT_BOTTOM, 0.0, 0.0)
call BlzFrameSetSize(help, 0.08, 0.0008) // random values, haven't checked yet (need a wider button)
endfunction
So I want to know, while I'm at it if, once the 3 buttons finally decide to show, this function will indeed place them on the top left of the 4:3 screen, one below the other.
By the way, reading dozens of fdf files, the frame name for the portrait, the hero bar and hero button ...and maybe even the frames borders seem nowhere to be found....
EDIT : found a typo in my second function, it should be
call BlzFrameSetPoint(log, FRAMEPOINT_TOP, menu, FRAMEPOINT_BOTTOM, 0.0, 0.0)
. Anyways this doesn't change a thing on the problem though...
Last edited: