Thread Tools Display Modes
07-15-16, 04:30 PM   #1
Cybeloras
A Fallenroot Satyr
 
Cybeloras's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 28
TitleRegion no longer works properly

On Live, you can add a TitleRegion to a frame as follows to get automatic draggability for that frame:

Code:
	<Frame name="MyFrameTemplate" hidden="true" movable="true" toplevel="true" clampedToScreen="true" enableMouse="true" frameStrata="DIALOG" parent="UIParent" virtual="true">
		<Size x="330"/>

		<TitleRegion setAllPoints="true"/>

                ...

	</Frame>
In Legion, this no longer works, but with a twist: If you do any of the following:
* Change the size or the scale of the parent in any way while the parent is shown
* Call essentially ANY method on the TitleRegion (all those methods that are defined for Region, but not those defined for ParentedObject or UIObject),
it will cause it to start responding again. So, if you call :GetCenter(), for example, on your title region, it will start responding to drags again (even though you didn't (really) do anything to it).

This works in Legion, but is obviously pretty lame:

Code:
	<Frame name="MyFrameTemplate" hidden="true" movable="true" toplevel="true" clampedToScreen="true" enableMouse="true" frameStrata="DIALOG" parent="UIParent" virtual="true">
		<Size x="330"/>

		<TitleRegion setAllPoints="true"/>

		<Scripts>
			<OnShow>
				self:GetTitleRegion():GetCenter()
			</OnShow>
		</Scripts>

	</Frame>

Last edited by Cybeloras : 07-15-16 at 04:38 PM.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » TitleRegion no longer works properly


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