Thread Tools Display Modes
10-28-13, 02:59 PM   #1
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Need frame's to Hide during Cinematic

Hi, I have an issue with an in-game cinematic where frames show over it. Usually I would use:

Lua Code:
  1. local frameEvent = CreateFrame('Frame')
  2. frameEvent:RegisterEvent("CINEMATIC_START")
  3. frameEvent:SetScript('OnEvent', myEventHandler)
  4. function eventHandlers.CINEMATIC_START()
  5.     playerGradient:Hide()
  6.     targetGradient:Hide()
  7. end

however I don't think the "Deathwing's destruction at the Maelstrom" cinematic actually counts as a cinematic which is the problem. When I go in Orgrimmar as a Horde and right click on the NPC and select "Show me, dragon." to play the cinematic I get this:



Does anyone know the reason why or how to fix this? Thank you!
  Reply With Quote
10-28-13, 03:51 PM   #2
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Are those frames anchored/parented to WorldFrame by any chance?
  Reply With Quote
10-28-13, 04:04 PM   #3
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
So long as the "main" frame is parented to UIParent, you should be fine =X.
  Reply With Quote
10-28-13, 04:24 PM   #4
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Originally Posted by Nibelheim View Post
Are those frames anchored/parented to WorldFrame by any chance?
No they are not actually parented to anything, I just use a script to make them only show when my Unit frames are showing and their relative Frame positioning are set to those unit frames. I could try parenting them to the UIParent, hopefully that will help as long as it does not interfere with the script for when its meant to show and when to hide depending on whether I have a target or not. I don't see why it would but my knowledge of Lua isn't the best ^^

Thanks for the replies!
  Reply With Quote
10-28-13, 10:13 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You should always parent your frames to something, and this is just one reason why.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-29-13, 12:55 AM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
More specifically, you should always parent your frames to UIParent, or to something else that traces its parentage back to UIParent. This will ensure two things:

(1) Your frame respects the user's UI scale.

(2) Your frame hides when it's supposed to -- eg. if the user presses Alt-Z to hide the UI, or when a cinematic is showing, etc.

Neither of these affect your ability to :Hide() and :Show() your frame in any way; in the case of #2 above the game doesn't :Hide() your frame -- it :Hide()s the UIParent, which automatically hides all of its children, regardless of their individual visibility status.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-30-13, 01:07 PM   #7
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Okay that solved that issue, Thank you
  Reply With Quote
11-05-13, 02:36 AM   #8
AnrDaemon
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 156
If you are modifying some frame with your own, it makes sense to parent it to modified frame, or it's parent. Just for consistency, if not for any other reason.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Need frame's to Hide during Cinematic


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off