WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   New Itembox control toolbox (https://www.wowinterface.com/forums/showthread.php?t=2634)

Konstant 12-12-05 11:48 PM

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>

dafire 03-15-06 09:22 AM

cool .. it would be really great to collect controls somewhere ;)

Ikil 12-17-06 11:58 PM

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

mercdev 12-20-06 08:00 PM

Quote:

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 :cool:


All times are GMT -6. The time now is 07:16 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI