forked from wowgaming/3.3.5-interface-files
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCinematicFrame.lua
More file actions
32 lines (24 loc) · 749 Bytes
/
Copy pathCinematicFrame.lua
File metadata and controls
32 lines (24 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function CinematicFrame_OnLoad(self)
self:RegisterEvent("CINEMATIC_START");
self:RegisterEvent("CINEMATIC_STOP");
local width = GetScreenWidth();
local height = GetScreenHeight();
if ( width / height > 4 / 3) then
local desiredHeight = width / 2;
if ( desiredHeight > height ) then
desiredHeight = height;
end
local blackBarHeight = ( height - desiredHeight ) / 2;
UpperBlackBar:SetHeight( blackBarHeight );
UpperBlackBar:SetWidth( width );
LowerBlackBar:SetHeight( blackBarHeight );
LowerBlackBar:SetWidth( width );
end
end
function CinematicFrame_OnEvent(self, event, ...)
if ( event == "CINEMATIC_START" ) then
ShowUIPanel(self, 1);
elseif ( event == "CINEMATIC_STOP" ) then
HideUIPanel(self);
end
end