Thread Tools Display Modes
12-12-05, 11:48 PM   #1
Konstant
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 33
New Itembox control toolbox

Copy and paste to your favorite skin. Its a simple item box that isn't red. You can change the background textures. Make sure to resize the normaltexture to the same size of the control.

<Button name="ItemButton" inherits="ItemButtonTemplate" render="ComponentRender" onToolbox="true" frameid="{2F3D4611-47A8-46c2-A563-599F54D6E1FE}" icon="Button">
<!--
<FrameSkin>
<Setup>
<Property name="Backdrop" type="wowuides.Backdrop" value="null" visible="true" category="Appearance" defaultCopy="true" />
<Property name="DisabledTexture" displayName="Disabled Texture" type="wowuides.Texture" value="@skin@" 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="PushedTextOffset" displayName="Pushed Text Offset" type="wowuides.Dimension" value="new wowuides.Dimension()" 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
03-15-06, 09:22 AM   #2
dafire
Premium Member
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 216
cool .. it would be really great to collect controls somewhere
  Reply With Quote
12-17-06, 11:58 PM   #3
Ikil
A Defias Bandit
Join Date: Dec 2006
Posts: 2
Would I be able to use this for instance, as receptacle for an item drag?

ie. drag item from master loot box onto item button

I've done the XML bit, and it appears in my toolbox, but when I drag it onto the form the box doesn't show - nor does it show "in game"..

Thanks in advance!
Ikil
  Reply With Quote
12-20-06, 08:00 PM   #4
mercdev
A Fallenroot Satyr
 
mercdev's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: May 2005
Posts: 22
Originally Posted by Ikil
Would I be able to use this for instance, as receptacle for an item drag?

ie. drag item from master loot box onto item button

I've done the XML bit, and it appears in my toolbox, but when I drag it onto the form the box doesn't show - nor does it show "in game"..

Thanks in advance!
Ikil
I'd suggest you look at the drag events in Blizzard_RaidUI.lua. I realize you're new but the best way to learn this stuff is to just jump in there
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » New Itembox control toolbox

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