WoW:XML/Inset: Difference between revisions

From AddOn Studio
< XML
Jump to navigation Jump to search
m (catfix)
No edit summary
Line 1: Line 1:
== HitRectInsets ==
Elements: AbsInset, RelInset
Elements: AbsInset, RelInset


Attributes: left, right, top, bottom
Attributes: left, right, top, bottom


Specifies the rectangle to be used for mouse interaction with the frame. E.g. a 100x100 frame with HitRectInsets of 2 for each attribute will only respond to mouse events within a 96x96 square centered within the frame.
Defines a 4-way set of margins, positioning one area within another.
 
Used as:
 
As <BackgroundInsets> to "push in" the background texture to put in line with the border or edge textures of the frame,
 
As <TextInsets> to define text margins,
 
As <HitRectInsets> to modify a frame's hit rectangle in relation to its normal size.
 
Examples:
 
<HitRectInsets>
    <AbsInset left="0" right="-100" top="0" bottom="0"/>
</HitRectInsets>
 
<HitRectInsets>
    <RelInset left="0" right="-100" top="0" bottom="0"/>
</HitRectInsets>
 
<HitRectInsets left="0" right="-100" top="0" bottom="0" />


== Example ==
<TextInsets left="2" right="2" top="2" bottom="2" />


From FrameXML\OptionsFrameTemplates.xml:
From FrameXML\OptionsFrameTemplates.xml:
Line 19: Line 37:
This allows you to click the checkbox up to 100 pixels (scaled) to the right of the box itself (where the label would be).
This allows you to click the checkbox up to 100 pixels (scaled) to the right of the box itself (where the label would be).


== BackgroundInsets ==
You add the background file which is the dialog box background. You then add the edgeFile which will be the dialog box border texture (this will go around the border or "edge" of the frame). You will notice if you remove the background insets you will see the background texture on the outside of the edge texture. BackgroundInsets fixes this.
[[Category:Interface customization]]
[[Category:Interface customization]]

Revision as of 16:18, 18 September 2009

Elements: AbsInset, RelInset

Attributes: left, right, top, bottom

Defines a 4-way set of margins, positioning one area within another.

Used as:

As <BackgroundInsets> to "push in" the background texture to put in line with the border or edge textures of the frame,

As <TextInsets> to define text margins,

As <HitRectInsets> to modify a frame's hit rectangle in relation to its normal size.

Examples:

<HitRectInsets>
   <AbsInset left="0" right="-100" top="0" bottom="0"/>
</HitRectInsets>
<HitRectInsets>
   <RelInset left="0" right="-100" top="0" bottom="0"/>
</HitRectInsets>
<HitRectInsets left="0" right="-100" top="0" bottom="0" />
<TextInsets left="2" right="2" top="2" bottom="2" />

From FrameXML\OptionsFrameTemplates.xml:

<CheckButton name="OptionsCheckButtonTemplate" inherits="UICheckButtonTemplate" virtual="true">
	<HitRectInsets>
		<AbsInset left="0" right="-100" top="0" bottom="0"/>
	</HitRectInsets>
</CheckButton>

This allows you to click the checkbox up to 100 pixels (scaled) to the right of the box itself (where the label would be).

BackgroundInsets

You add the background file which is the dialog box background. You then add the edgeFile which will be the dialog box border texture (this will go around the border or "edge" of the frame). You will notice if you remove the background insets you will see the background texture on the outside of the edge texture. BackgroundInsets fixes this.