- Joined
- Jul 12, 2010
- Messages
- 1,737
Hello everybody, I began trying to create a custom UI for my map and I have stumbled upon a wall quite early in the process.
I moved the Unit Portrait (aka ORIGIN_FRAME_PORTRAIT ) to the top left and I made a border and background to go along with it.
The problem I have is that the 3D model keeps going through the background and it just won't work.
Feel free to use the test map, any help to resolve this problem is appreciated!
I moved the Unit Portrait (aka ORIGIN_FRAME_PORTRAIT ) to the top left and I made a border and background to go along with it.
The problem I have is that the 3D model keeps going through the background and it just won't work.
JASS:
function Trig_GameUI_Init_Actions takes nothing returns nothing
local framehandle port = BlzGetOriginFrame(ORIGIN_FRAME_PORTRAIT,0)
call BlzHideOriginFrames(true)
call BlzFrameSetAllPoints(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0))
call BlzFrameSetVisible(port, true)
call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME,0), true)
call BlzFrameClearAllPoints(port)
call BlzFrameSetAbsPoint(port, FRAMEPOINT_CENTER, 0.155, 0.525)
endfunction
//===========================================================================
function InitTrig_GameUI takes nothing returns nothing
set gg_trg_GameUI = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_GameUI, 0.10 )
call TriggerAddAction( gg_trg_GameUI, function Trig_GameUI_Init_Actions )
endfunction
JASS:
function Trig_silver_Actions takes nothing returns nothing
local framehandle HeroBackground = BlzCreateFrameByType("BACKDROP", "HeroBackground", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), "", 0)
local framehandle HeroBorder = BlzCreateFrameByType("BACKDROP", "HeroBorder", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) , "", 0)
local framehandle port = BlzGetOriginFrame(ORIGIN_FRAME_PORTRAIT,0)
//======Hero Portrait Border=====\\
call BlzFrameSetSize(HeroBorder , 0.13, 0.13)
call BlzFrameSetAbsPoint(HeroBorder , FRAMEPOINT_CENTER, 0.074, 0.527)
call BlzFrameSetTexture(HeroBorder , "UI\\Widgets\\Glues\\SinglePlayerSkirmish-MinimapCover3.blp",0, true)
//======Hero Portrait Background=====\\
call BlzFrameSetSize(HeroBackground , 0.13, 0.13)
call BlzFrameSetAbsPoint(HeroBackground , FRAMEPOINT_CENTER, 0.074, 0.527)
call BlzFrameSetTexture(HeroBackground , "UI\\Widgets\\EscMenu\\Human\\human-options-button-background-disabled.blp",0, true)
// call BlzFrameSetAlpha(HeroBackground, 150)
//===== Making "HeroBackground" the Parent of ORIGIN_FRAME_PORTRAIT causes the portrait to move
//===== above the background image but it still passes through when animation is played.
call BlzFrameSetParent(port, HeroBackground)
//===== FrameSetLevel seems to not work for ORIGIN_FRAME_PORTRAIT
// call BlzFrameSetLevel(port, 10)
endfunction
//===========================================================================
function InitTrig_Borders takes nothing returns nothing
set gg_trg_Borders = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Borders, 0.20 )
call TriggerAddAction( gg_trg_Borders, function Trig_silver_Actions )
endfunction
Feel free to use the test map, any help to resolve this problem is appreciated!