Thread Tools Display Modes
12-08-05, 03:46 PM   #1
Konstant
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 33
New controls

I'm having an issue developing new controls for the tool box. Mainly with the fact that upon rendering that the graphics edge is outside of the size of my control.

After fiddling with it; I can get it line up... sort of. It's off by a few pixels. I'd like to release my mod but it doesnt look pretty. >.<

If you could help me with this I'd be willing to greatly flesh out your toolbox. With your permission of course.
  Reply With Quote
12-08-05, 05:39 PM   #2
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
That's not really enough for me to go on. If you could email me your skin file and project then I will look at it and see what's what.

I am more than happy for people to be working on more components, so go on fleshing.

[email protected]
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)
  Reply With Quote
12-09-05, 04:17 PM   #3
Konstant
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 33
ItemButton

1) Drop this code into your default skin.
2) It will show up in your toolbox.
3) Drag it onto your rendered form.
4) It looks like an item box. Close that form.
5) Then reopen it. It will now look like the your default button. Red background and all.

<Button name="ItemButton" inherits="ItemButtonTemplate" render="ComponentRender" frameid="{2D508884-59C2-4f83-AE10-27AAAD48391B}" icon="Button">
<!--
<FrameSkin>
<Setup>
<Property name="Location" visible="true" />
<Property name="Size" value="new System.Drawing.Size(100,22)" visible="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" defaultCopy="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" defaultCopy="true" />
<Property name="id" displayName="Id" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="0" category="Behaviour" visible="true" defaultCopy="true" />
<Property name="NormalTexture" displayName="Normal Texture" type="wowuides.Texture" value="@skin@" visible="true" category="Appearance" defaultCopy="true" />
<Property name="Text" 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.TOPLEFT;
frame.Anchors[0].Offset = Dimension.FromPoint(control.Location);
frame.text = control.Text;
</OnSetupFrame>
<OnSetupForm>
control.Location = frame.Anchors[0].Offset.ToPoint();
control.Size = frame.Size.ToSize();
control.Text = frame.text;
</OnSetupForm>
</Script>
</FrameSkin>
-->
<Size>
<AbsDimension x="100" y="22"/>
</Size>
</Button>
  Reply With Quote
12-09-05, 04:23 PM   #4
Konstant
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 33
And its normal texture property will disappear.
  Reply With Quote
12-11-05, 12:56 AM   #5
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
Exclamation

The issue with the button reloading as default is because you didn't generate a new GUID for the frameId, so on loading it used the one you copied from, the default Button. The issue with odd texture placement seems to be related to a bug I found, so I will create a new nightly build tomorrow for you to try out.

Thanks for the info.
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)
  Reply With Quote
12-12-05, 02:50 PM   #6
Konstant
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 33
Originally Posted by Nulkris
The issue with the button reloading as default is because you didn't generate a new GUID for the frameId, so on loading it used the one you copied from, the default Button. The issue with odd texture placement seems to be related to a bug I found, so I will create a new nightly build tomorrow for you to try out.

Thanks for the info.
How do I generate a proper GUID?
  Reply With Quote
12-12-05, 04:38 PM   #7
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
You can use:

http://www.microsoft.com/downloads/d...displaylang=en
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)
  Reply With Quote
12-12-05, 04:44 PM   #8
Konstant
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 33
Thanks.

Now when I repeat the steps above; draw, close, open. The control opens blank.

The normal texture remains though.

Did you post your newest build?

Edit: Added source code.
I changed the guid to one provided by the guid generator. Do I need to so something with the publickeytoken?

<Button name="ItemButton" inherits="ItemButtonTemplate" render="ComponentRender" frameid="{EC53BF10-6E7C-4fcf-BC66-218F3F6132AF}" icon="Button">
<!--
<FrameSkin>
<Setup>
<Property name="Location" visible="true" />
<Property name="Size" value="new System.Drawing.Size(100,22)" visible="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" defaultCopy="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" defaultCopy="true" />
<Property name="id" displayName="Id" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="0" category="Behaviour" visible="true" defaultCopy="true" />
<Property name="NormalTexture" displayName="Normal Texture" type="wowuides.Texture" value="@skin@" visible="true" category="Appearance" defaultCopy="true" />
<Property name="Text" 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.TOPLEFT;
frame.Anchors[0].Offset = Dimension.FromPoint(control.Location);
frame.text = control.Text;
</OnSetupFrame>
<OnSetupForm>
control.Location = frame.Anchors[0].Offset.ToPoint();
control.Size = frame.Size.ToSize();
control.Text = frame.text;
</OnSetupForm>
</Script>
</FrameSkin>
-->
<Size>
<AbsDimension x="100" y="22"/>
</Size>
</Button>

Last edited by Konstant : 12-12-05 at 04:48 PM. Reason: added source code
  Reply With Quote
12-12-05, 04:58 PM   #9
Konstant
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 33
When I delete these lines of code it renders properly.

<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" defaultCopy="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" defaultCopy="true" />
<Property name="id" displayName="Id" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="0" category="Behaviour" visible="true" defaultCopy="true" />
<Property name="NormalTexture" displayName="Normal Texture" type="wowuides.Texture" value="@skin@" visible="true" category="Appearance" defaultCopy="true" />
  Reply With Quote
12-12-05, 05:03 PM   #10
Konstant
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 33
It's flipping out on this line

<Property name="NormalTexture" displayName="Normal Texture" type="wowuides.Texture" value="@skin@" visible="true" category="Appearance" defaultCopy="true" />
  Reply With Quote
12-12-05, 06:31 PM   #11
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
Yeah, there is a problem with the defaultCopy mechanism, I will be posting up a new nightly build soon, I was sick yesterday so I didn't get to it.

Edit: try the new nightly build up now (4d) http://wowuides.wowinterface.com/nb/...1.0.200.4d.msi
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)

Last edited by Nulkris : 12-12-05 at 07:29 PM.
  Reply With Quote
12-12-05, 08:03 PM   #12
Konstant
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 33
Will do.

Additionally, you can include this into your skin its an item box. However their is a problem pertaining to when you drag an item/ability into the box it defaults to the setnormaltexture width and height (64, 64) instead of the size of the box.

Basically you drag in a texture and it gets enlarged to (64, 64) rather then the size of your control.

Edit: Yah going to need this fixed for dynamic texture changing mods.

<Button name="ItemButton" inherits="ItemButtonTemplate" render="ComponentRender" onToolbox="true" frameid="{BE5D72CF-B815-43ef-BE3F-AFB463DB0014}" icon="Button">
<!--
<FrameSkin>
<Setup>
<Property name="Backdrop" type="wowuides.Backdrop" value="null" visible="true" category="Appearance" 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" defaultCopy="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" defaultCopy="true" />
<Property name="frameLevel" displayName="Frame Level" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="0" category="Behaviour" visible="true" defaultCopy="true" />
<Property name="frameStrata" displayName="Frame Strata" type="wowuides.FRAMESTRATA" value="wowuides.FRAMESTRATA.PARENT" category="Layout" visible="true" defaultCopy="true" />
<Property name="HighlightTexture" displayName="Highlight Texture" type="wowuides.Texture" value="@skin@" visible="true" category="Appearance" defaultCopy="true" />
<Property name="id" displayName="Id" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="0" category="Behaviour" visible="true" defaultCopy="true" />
<Property name="Location" visible="true" />
<Property name="MaximumSize" visible="true" />
<Property name="MinimumSize" visible="true" />
<Property name="movable" displayName="Moveable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="false" category="Behaviour" visible="true" defaultCopy="true" />
<Property name="NormalTexture" displayName="Normal Texture" type="wowuides.Texture" value="@skin@" visible="true" category="Appearance" defaultCopy="true" />
<Property name="PushedTexture" displayName="Pushed Texture" type="wowuides.Texture" value="@skin@" visible="true" category="Appearance" defaultCopy="true" />
<Property name="resizable" displayName="Resizeable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="false" category="Behaviour" visible="true" defaultCopy="true" />
<Property name="Size" value="new System.Drawing.Size(100,22)" visible="true" />
<Property name="toplevel" displayName="Top Level" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" value="false" category="Behaviour" visible="true" defaultCopy="true" />
</Setup>
<Script>
<OnSetupFrame>
frame.Size = Dimension.FromSize(control.Size);
frame.Anchors.Clear();
frame.Anchors.Add(new LayoutFrame.Anchor());
frame.Anchors[0].point = FRAMEPOINT.TOPLEFT;
frame.Anchors[0].Offset = Dimension.FromPoint(control.Location);
if(control.MaximumSize.Width &gt; 0 &amp;&amp; control.MaximumSize.Height &gt; 0) {
if(frame.ResizeBounds == null)
frame.ResizeBounds = new Frame.__ResizeBounds();
frame.ResizeBounds.maxResize = Dimension.FromSize(control.MaximumSize);
}
else if(frame.ResizeBounds != null) {
frame.ResizeBounds.maxResize = null;
}
if(control.MinimumSize.Width &gt; 0 &amp;&amp; control.MinimumSize.Height &gt; 0) {
if(frame.ResizeBounds == null)
frame.ResizeBounds = new Frame.__ResizeBounds();
frame.ResizeBounds.minResize = Dimension.FromSize(control.MinimumSize);
}
else if(frame.ResizeBounds != null) {
frame.ResizeBounds.minResize = null;
}
frame.text = control.Text;
</OnSetupFrame>
<OnSetupForm>
control.Size = frame.Size.ToSize();
control.Location = frame.Anchors[0].Offset.ToPoint();
if(frame.ResizeBounds != null) {
if(frame.ResizeBounds.maxResize != null)
control.MaximumSize = frame.ResizeBounds.maxResize.ToSize();
else
control.MaximumSize = Size.Empty;
if(frame.ResizeBounds.minResize != null)
control.MinimumSize = frame.ResizeBounds.minResize.ToSize();
else
control.MinimumSize = Size.Empty;
}
else {
control.MaximumSize = Size.Empty;
control.MinimumSize = Size.Empty;
}
control.Text = frame.text;
</OnSetupForm>
</Script>
</FrameSkin>
-->
</Button>
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » New controls

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