- Joined
- Jul 18, 2010
- Messages
- 2,377
One can access LeaderBoard, Multiboard, TimerDialog, Dialog with the frame natives. By doing that one can for example show 2 Multiboard/Leaderboards at the same time.
When a Leaderboard is created and shown the frame one reads with BlzGetFrameByName("Leaderboard",0) is that Leaderboard. When one would create another Leaderboard this new one would also be saved in BlzGetFrameByName("Leaderboard",0).
The GUI functions create and show at the same time.
The same happens for Multiboards.
TimerDialog instead uses BlzGetFrameByName("TimerDialog", x), x for the amount of created ones, starting with 0 for the first one. A CreateContext of a Destroyed TimerDialogs is not reused.
When the map is restarted in Menu the createcontext don`t reset (1.31.)
Timer Dialog Frame has 2 TEXT-Childs "TimerDialogValue" and "TimerDialogTitle". "TimerDialogValue" will update multiple times a second changing it with the framenatives would make no good. "TimerDialogTitle" can be changed with a native so also no good with the frames but what about "TimerDialogBackdrop". That one can be changed to show an icon for example, but it has to be quite big cause of the way shown text.
TimerDialogs attach themself left to the nearest lowest shown living TimerDialog.
When an Dialog is shown it can be read with BlzGetFrameByName("ScriptDialog", x), but that is kinda hard to predict cause showing dialog when other dialogs are still active inreases the cratecontext in a wierd way.
BlzGetFrameByName("ScriptDialogButton", x) are set afer/while a dialog is shown. x increases everytime. When one shows an Dialog with 2 buttons the first shown will use index 1&2 at the 2.show the used 3&4 and that continues. It does not matter if that is the same Dialog or another dialog with 2 buttons.
When a Leaderboard is created and shown the frame one reads with BlzGetFrameByName("Leaderboard",0) is that Leaderboard. When one would create another Leaderboard this new one would also be saved in BlzGetFrameByName("Leaderboard",0).
The GUI functions create and show at the same time.
The same happens for Multiboards.
JASS:
function Trig_Nahkampf_Initialisierung_Actions takes nothing returns nothing
local framehandle multi1
local framehandle multi2
local framehandle multi3
call CreateMultiboardBJ( 4, 2, "TRIGSTR_001" )
set udg_MB[1] = bj_lastCreatedMultiboard
set multi1 = BlzGetFrameByName("Multiboard",0)
call CreateMultiboardBJ( 3, 3, "TRIGSTR_002" )
set multi2 = BlzGetFrameByName("Multiboard",0)
set udg_MB[2] = bj_lastCreatedMultiboard
call CreateMultiboardBJ( 3, 1, "TRIGSTR_003" )
set multi3 = BlzGetFrameByName("Multiboard",0)
set udg_MB[3] = bj_lastCreatedMultiboard
call BlzFrameClearAllPoints(multi1)
call BlzFrameSetPoint(multi1, FRAMEPOINT_TOPLEFT, multi2, FRAMEPOINT_BOTTOMLEFT,0,0)
call BlzFrameSetVisible(multi1, true)
call BlzFrameClearAllPoints(multi2)
call BlzFrameSetAbsPoint(multi2, FRAMEPOINT_TOPRIGHT, 0.2,0.55)
call BlzFrameSetVisible(multi2, true)
endfunction
TimerDialog instead uses BlzGetFrameByName("TimerDialog", x), x for the amount of created ones, starting with 0 for the first one. A CreateContext of a Destroyed TimerDialogs is not reused.
When the map is restarted in Menu the createcontext don`t reset (1.31.)
Timer Dialog Frame has 2 TEXT-Childs "TimerDialogValue" and "TimerDialogTitle". "TimerDialogValue" will update multiple times a second changing it with the framenatives would make no good. "TimerDialogTitle" can be changed with a native so also no good with the frames but what about "TimerDialogBackdrop". That one can be changed to show an icon for example, but it has to be quite big cause of the way shown text.
TimerDialogs attach themself left to the nearest lowest shown living TimerDialog.
When an Dialog is shown it can be read with BlzGetFrameByName("ScriptDialog", x), but that is kinda hard to predict cause showing dialog when other dialogs are still active inreases the cratecontext in a wierd way.
BlzGetFrameByName("ScriptDialogButton", x) are set afer/while a dialog is shown. x increases everytime. When one shows an Dialog with 2 buttons the first shown will use index 1&2 at the 2.show the used 3&4 and that continues. It does not matter if that is the same Dialog or another dialog with 2 buttons.
Last edited: