haibo19981984
02-03-2011 09:29:04
<Resource type="ResourceLayout" name="ButtonImage" version="3.2.0">
<Widget type="Widget" skin="ButtonEmptySkin" position="20 20 16 16" name="Root">
<Property key="TextAlign" value="Center"/>
<Property key="FontName" value="Default"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
<Widget type="ImageBox" skin="ImageBox" position="0 0 16 16" align="Stretch" name="Image">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
<Widget type="Button" skin="ButtonImage" position="20 55 32 32">
<Property key="Caption" value="test"/>
<Property key="ImageResource" value="PointerArrowImage"/>
</Widget>
</Resource>
Above is in MyGUI_BlueWhiteTemplates.xml.
I don't understand some script in it,such as:
(1)position="20 20 16 16"
I can understand "16 16",it is button's size.
What is "20 20"?
(2)key="LE_TargetWidgetType"
What is the function of the script?
"LE" is LayoutEditor.exe?
(3)<Widget type="Button" skin="ButtonImage" position="20 55 32 32">
<Property key="Caption" value="test"/>
<Property key="ImageResource" value="PointerArrowImage"/>
</Widget>
I don't find skin "ButtonImage" in MyGUI_BlueWhiteSkins.xml.
So I don't understand it.
It seems a button that use text "test" and image "PointerArrowImage".
<Resource type="ResourceLayout" name="ButtonImage">
<Widget type="Widget" skin="PanelEmpty" position="20 20 16 16" name="Root">
<Widget type="ImageBox" skin="ImageBox" position="0 0 16 16" align="Stretch" name="Image">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
</Resource>
above is my ButtonImage.
I only want a ButtonImage which has only an image.