• 🏆 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!

[General] Is it possible to change the Timer Window position?

Status
Not open for further replies.
Level 1
Joined
Feb 7, 2020
Messages
2
I have multiboard and when hero dies
it showing a timer window above the multiboard
is there a way to make the timer window appear below the multiboard?
 
Yes, one can move Timer Dialogs, multiboards and Leaderboards. For your wanted goal you have to move the multiboard and the timerdialog. And you have to move them everytime you destroy/create a new timer dialog. Also when the user changes the resolution. Cause the will restore their default layout.

Could look like that
Lua:
TimerStart(CreateTimer(), 0, false, function()
    xpcall(function()
 
    CreateMultiboardBJ(2, 3, "title")
    CreateTimerDialogBJ(nil, "title")
    local timerDialogFrame = BlzGetFrameByName("TimerDialog", 0)
    local multiboardFrame = BlzGetFrameByName("Multiboard", 0)
    local multiboardContentBoxFrame = BlzGetFrameByName("MultiboardBackdrop", 0)
 
    BlzFrameClearAllPoints(timerDialogFrame)
    BlzFrameSetPoint(timerDialogFrame, FRAMEPOINT_TOPRIGHT, multiboardContentBoxFrame, FRAMEPOINT_BOTTOMRIGHT, 0, 0)
    BlzFrameSetAbsPoint(multiboardFrame, FRAMEPOINT_TOPRIGHT, 0.9, 0.58)
    end, print)
end)

With that code the timerDialog will not fit itself directly below the mulitboard when it is closed.
When it is closed you would have to move the timerdialog below the multiboardFrame instead of the ContentBoxFrame

TimerDialog uses BlzGetFrameByName("TimerDialog", x), x for the amount of total created ones - 1, starting with 0 for the first one. A CreateContext of a Destroyed TimerDialogs is not reused.

One could change the image of the timerdialog by manipulating "TimerDialogBackdrop".
 
Status
Not open for further replies.
Top