12-12-05, 11:48 PM | #1 |
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 > 0 && control.MaximumSize.Height > 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 > 0 && control.MinimumSize.Height > 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> |
|
03-15-06, 09:22 AM | #2 |
cool .. it would be really great to collect controls somewhere
|
|
12-17-06, 11:58 PM | #3 |
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 |
|
12-20-06, 08:00 PM | #4 | |
|
||
WoWInterface » Developer Discussions » General Authoring Discussion » New Itembox control toolbox |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|