Skip to main content

History: MyGUI skin creating

Source of version: 7

Copy to clipboard
            {maketoc}

!!Skin format
MyGUI 3.0 skin format description. For skin examples look at Media/MyGUI_Media/core_skin.xml - all default skins described there.

{CODE(wrap="1", colors="xml")} <?xml version="1.0" encoding="UTF-8"?>
 
 <MyGUI type="Resource" version="1.1">
 
 	<Resource type="ResourceSkin" name = "__Skin_name__" size = "__width height__" texture = "__Texture_file_name__" >
 	<!- Size property is default widget size, subskins and child widgets alignment also rely on this size -->
 		<Property key="__Property_name__" value = "__Property_value__" /> 
 		<!- Some widet types have special properties, you can specify them in skin instead setting properties for each widget copy in layout or in code -->
 
 		<Child type="__Widget_type__" skin="__Some_skin_name__" offset = "__left top width height__" align = "__Some_align__" name = "__Child_widget_name__">
 		<!- Offset and align is properties of child widget inside skin, they works exactly as position and align in layout files and in code when you creating widgets -->
 			<Property key="__Property_name__" value = "__Property_value__" />
 			<!- Child widgets also may have some properties --> 
 		</Child>
 		<!- Skin may have child widgets, for example Window have buttons on it and each button is child widget -->
  
 		<BasisSkin type="__SubSkin_type__" offset = "__left top width height__" align = "__Some_align__">
 		<!- Offset and align here works same way as for child widgets -->
 			<State name="__state_name__" offset = "__left top width height__"/>
 			<!- Here is defined part of texture for different widget states. ''Offset'' is offset in texture that shown part of it that will be rendered. -->
 		</BasisSkin>
 		<!- ''BasisSkin'' with type ''MainSkin'' or ''SubSkin'' is an actual part of texture that will be rendered.
 			Usually skins contain one part (part of texture stretched over whole widget) - SubSkin_type should be ''MainSkin'',
 				      three parts (left part, stretched central part and right part) - SubSkin_type should be ''SubSkin''
 				      or nine parts (one in center and 8 around) - SubSkin_type should be SubSkin.
 			You may have any amount of ''BasisSkin'' elements one for each texture part.
 		-->
 
 		<BasisSkin type="SimpleText" offset = "__left top width height__" align = "__Some_align__">
 		<!- Offset and align here works same way as for child widgets -->
 			<State name="__state_name__" colour="__R G B or #RRGGBB (hex)__"/>
 			<!- ''SimpleText'' may contain state description, it is optional. If it contain node - default colour will be used for all states. -->
 		</BasisSkin>
 		<!- ''SimpleText'' is place where widget text is placed. Also if this text should be selectable or editable you should use ''EditText'' type instead. >
 	</Resource>
   
 	<!- Lots of other skins here ... -->
 </MyGUI>{CODE}

MainSkin - subskin for whole widget, ignore alignment (works faster)
SubSkin - any size subskin with alignment
SimpleText - simple text with colour (works faster)
EditText - text for editing and selecting

Possible __colour__ values are R G B (colour mask from 0. to 1.) (1. 0. 0. - red) or hex color (#FF0000 - red).

Possible __skin_alignment__ values can be found in ((MyGUI align table|__align table.__)) Multiply alignment specified with spaces between alignments
{CODE(wrap="1", colors="c++")} align = "HStretch Top"{CODE}
it is the same as
{CODE(wrap="1", colors="c++")} HStretch  | Top{CODE}
(binary |) in code.

Possible __property_name__ values can be found in ((MyGUI skin properties table|__skin properties table.__)) (__warning - outdated__)

also follow some rules:
* if skin have one subskin then it must have type "MainSkin" else subskins must have type "SubSkin"
* if text not intended for editing selecting or copying then it should have type "SimpleText"

!!Pointer format
For pointer examples look at Media/MyGUI_Media/core_pointer.xml
{CODE(wrap="1", colors="xml")} 	<Resource type="ResourceImageSetPointer" name="__Pointer_name__">
 		<Property key="Point" value="__x y (hto spot position)__"/>
 		<Property key="Size" value="__width height__"/>
 		<Property key="Resource" value="__Image_resource_name(not texture - it is ResourceImageSet defined somewhere in XML)__"/>
 	</Resource>{CODE}

        

History

Information Version
Mon 24 of Feb, 2014 19:04 GMT-0000 Altren 10
Mon 24 of Feb, 2014 19:01 GMT-0000 Altren 9
Mon 24 of Feb, 2014 15:16 GMT-0000 only_a_ptr Researched v3.2.0's themes and wrote JavaDoc-like XML reference 8
Sat 01 of May, 2010 05:06 GMT-0000 jacmoe 7
Sat 01 of May, 2010 05:05 GMT-0000 jacmoe 6
Thu 31 of Dec, 2009 20:08 GMT-0000 jacmoe 5
Mon 28 of Dec, 2009 05:51 GMT-0000 jacmoe 4
Mon 28 of Dec, 2009 05:51 GMT-0000 jacmoe 3
Mon 28 of Dec, 2009 05:49 GMT-0000 jacmoe 2
Fri 09 of Oct, 2009 15:25 GMT-0000 OgreWikiBot Robot: Cosmetic changes 1