Thread Tools Display Modes
06-07-06, 01:41 AM   #1
Hevanus
A Deviate Faerie Dragon
 
Hevanus's Avatar
Join Date: Jun 2006
Posts: 15
Unable to edit properties of elements under Project Explorer->Frame

I'm trying to make my frame draggable by implementing the bottom suggestion here: http://www.wowwiki.com/HOWTO:_Make_a_Frame_Draggable

In the Project Explorer on the left side of the screen I expanded the Frame section, then the XML file containing my form/frame, then clicked the form/frame itself. I see the properties on the Properties area on the right side of the screen, but if I try to change them (e.g., frameStrata) the change reverts as soon as I try to save the file. This is really annoying in the case of frameStrata specifically, because it means my frame is always obscured by other frames unless I either post-edit the XML every time I save, or use a SetFrameLevel() hack.

Also, I can't seem to enter anything at all for for some fields (e.g., TitleRegion). Of course, opening in a text editor and pasting in the TitleRegion XML manually that I want works great, but then WoW UI Designer removes it again the next time I re-save.

It would be great if there were an option to have WoW UI Designer leave in the XML anything it doesn't understand. I realize that this may not be easy though if it re-generates the XML from scratch every time you save.

Last edited by Hevanus : 06-11-06 at 02:06 PM. Reason: Revised wording and added suggestion
  Reply With Quote
06-19-06, 05:59 PM   #2
Zed03
A Murloc Raider
Join Date: Jun 2006
Posts: 5
To my understanding it the developer's intention to recognize ALL valid xml tags in the final product - leaving something in it doesnt understand will mean that the application is flawed.

Instead of working backwards and leaving a 'hack' in the beta that leaves invalid code where it was, it makes much more sence to simply add this TitleRegion to the WoWUIDes.

To do this, follow these steps:

http://www.wowinterface.com/forums/s...ead.php?t=2579

Ofcourse instead of adding parent you will be adding TitleRegion. Hope this helps.
  Reply With Quote
09-23-06, 03:56 PM   #3
Hevanus
A Deviate Faerie Dragon
 
Hevanus's Avatar
Join Date: Jun 2006
Posts: 15
I tried this and it doesn't work. It causes an error when I try to create a new form - something about not being able to convert a string. I copied the "parent" definition and changed it to TitleRegion in both places.

I don't think it would have worked anyways, because I need to be able to also have a parameter to TitleRegion called setAllPoints which I want to set to "true".

Any other ideas?
  Reply With Quote
09-23-06, 07:16 PM   #4
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
Post

You would make a new skin file in [INSTALLDIR]\Skins, say called Draggable.xml, and put the following code in it:

Code:
<?xml version="1.0" encoding="utf-8" ?>
<Skin name="Draggable" skinid="{8309da78-006d-4401-9d4f-cbc448d08261}">
<Frame name="form" render="FrameRender" onToolbox="false" frameid="{047a5294-fa59-460b-83cb-0c19711baeb7}" icon="Frame">
	<FrameSkin>
	 <Setup>
		<Property name="AnchorOffset" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" value="new System.Drawing.Point(0,0)" category="Layout" visible="true" />
		<Property name="AnchorParent" type="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="&quot;UIParent&quot;" category="Layout" visible="true" />
		<Property name="AnchorPoint" type="wowuides.UI.FRAMEPOINT" value="wowuides.UI.FRAMEPOINT.CENTER" category="Layout" visible="true" />
		<Property name="BackdropColor" type="System.Drawing.Color, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" value="System.Drawing.Color.FromArgb(94,94,86)" visible="false" />
		<Property name="clampedToScreen" displayName="Clamped To Screen" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="false" category="Behaviour" visible="true" defaultCopy="true" />
		<Property name="EnableKeyboard" displayName="Enable Keyboard" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="false" category="Behaviour" visible="true" />
		<Property name="EnableMouse" displayName="Enable Mouse" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="false" category="Behaviour" visible="true" />
		<Property name="Moveable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="false" category="Behaviour" visible="true" />
		<Property name="Opacity" visible="true" />
		<Property name="parent" displayName="Parent" type="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="string.Empty" category="Layout" visible="true" defaultCopy="true" />
		<Property name="Resizeable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="false" category="Behaviour" visible="true" />
		<Property name="Size" value="new System.Drawing.Size(400,400)" visible="true" />
	 </Setup>
	 <Script>
		<OnSetupFrame>
		 frame.Size = Dimension.FromSize(control.Size);
		 frame.Anchors.Clear();
		 frame.Anchors.Add(new LayoutFrame.Anchor());
		 frame.Anchors[0].point = (FRAMEPOINT)control.Properties["AnchorPoint"];
		 frame.Anchors[0].Offset = Dimension.FromPoint((System.Drawing.Point)control.Properties["AnchorOffset"]);
		 frame.Anchors[0].relativeTo = (string)control.Properties["AnchorParent"];
		 frame.alpha = (float)control.Opacity;
		 frame.enableKeyboard = (bool)control.Properties["EnableKeyboard"];
		 frame.enableMouse = (bool)control.Properties["EnableMouse"];
		 frame.movable = (bool)control.Properties["Moveable"];
		 frame.resizable = (bool)control.Properties["Resizeable"];
	</OnSetupFrame>
		<OnSetupForm>
			control.Size = frame.Size.ToSize();
			control.Properties["AnchorPoint"] = frame.Anchors[0].point;
			control.Properties["AnchorParent"] = frame.Anchors[0].relativeTo;
			control.Properties["AnchorOffset"] = frame.Anchors[0].Offset.ToPoint();
			control.Opacity = frame.alpha;
			control.Properties["EnableKeyboard"] = frame.enableKeyboard;
			control.Properties["EnableMouse"] = frame.enableMouse;
			control.Properties["Moveable"] = frame.movable;
			control.Properties["Resizeable"] = frame.resizable;
		</OnSetupForm>
	 </Script>
	</FrameSkin>
	<TitleRegion setAllPoints="true" />
	<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
	 <BackgroundInsets>
		<AbsInset left="11" right="12" top="12" bottom="11"/>
	 </BackgroundInsets>
	 <TileSize>
		<AbsValue val="32"/>
	 </TileSize>
	 <EdgeSize>
		<AbsValue val="32"/>
	 </EdgeSize>
	</Backdrop>
</Frame>
</Skin>
For the next release I will add a property to the existing skins to add/remove the TitleRegion automatically.

Nulk
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)

Last edited by Nulkris : 09-23-06 at 07:37 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » TitleRegion

Thread Tools
Display Modes

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