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

Simply closes its parent form. Makes it easy to add to your form.

<Button name="ClosedButton" inherits="UIPanelCloseButton" render="ComponentRender" onToolbox="true" frameid="{B65F5134-4BA6-4f70-82D3-467E0FB8C6D0}" icon="Button">
<!--
<FrameSkin>
<Setup>
<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

WoWInterface » Developer Discussions » General Authoring Discussion » New closed button for toolbox


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