Difference between revisions of "Client Skinning"

From Starsonata Wiki
Jump to: navigation, search
(Redirecting to Category:Client Skinning)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Client 2 Skinning Guide<br>  =
+
#REDIRECT [[Category:Client_Skinning]]
 
 
== Creating a New Skin  ==
 
 
 
In Client 2, instead of editing the files in place, you actually create a new folder in the Contents dir. This will allow us to patch files without overwriting mods and allow people to share mods more easily.
 
 
 
Here is an example of creating a simple mod for C2:
 
 
 
#Create ''Contents/&lt;newSkinName&gt;/'' next to ''Contents/Default''
 
#Copy the appropriate file from ''Contents/Default/&lt;dir1&gt;/&lt;dir2&gt;'' to ''Contents/&lt;newSkinName&gt;/&lt;dir1&gt;/&lt;dir2&gt;''
 
#Make the changes you want to make to the file
 
#Change the ''UserConfig.xml'' packages attribute to read ''packages="&lt;newSkinName&gt; Default"'' instead of ''packages="Default"''
 
#*This will tell C2 to first look in &lt;newSkinName&gt; for the files it needs, then revert to Default for anything it doesn't find. You can chain many of these packages to apply multiple mods. (Eventually we'll have a UI mod manager as well).
 
 
 
Lastly, the packages attribute can also read in zip files, so you could place a zip file named '''&lt;newSkinName&gt;.zip in Contents/ and add it to the packages in the same way''', and it would read it. (This will make it even easier to share mods with others)
 
 
 
Any questions related to this can be sent to pip on the forums or asked on IRC.
 
 
 
== XML Documentation  ==
 
 
 
=== Button  ===
 
 
 
=== Window  ===
 
 
 
=== WindowTrans  ===
 
 
 
=== ModalScreen  ===
 
 
 
=== MessageBox  ===
 
 
 
=== ScrollBar  ===
 
 
 
=== Image  ===
 
 
 
<code>&lt;element type="image"&gt; </code>
 
 
 
==== Example:  ====
 
 
 
<code>&lt;element type="image"&gt;</code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code>
 
  &lt;attributes&gt;
 
&lt;rect name="Rect" value="12, 37, 483, 305" /&gt;
 
&lt;texture name="Texture" value="background.station.ships" /&gt;
 
&lt;bool name="UseAlphaChannel" value="true" /&gt;
 
&lt;color name="Color" value="9fffffff" /&gt;
 
&lt;rect name="ImageRect" value="25, 63, 498, 333" /&gt;
 
&lt;/attributes&gt;
 
</code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code></code>
 
 
 
<code>&lt;/element&gt; </code>
 
 
 
==== Notes:  ====
 
 
 
Rect is the coordinates that the image will appear
 
 
 
The texture name is the name of an image specified in images.xml
 
 
 
ImageRect specifies a subset of the image to display
 
 
 
Color is in the aarrggbb format
 
 
 
=== Rectangle  ===
 
 
 
<code>&lt;element type="rectangle"&gt;</code>
 
 
 
<code>&nbsp;&nbsp;&lt;attributes&gt;<br>&nbsp;&nbsp; &nbsp;&lt;string name="IdName" value="" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;string name="TextID" value="" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;int name="Id" value="-1" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;string name="Caption" value="" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;rect name="Rect" value="0, 0, 1, 1" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;position name="MinSize" value="1, 1" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;position name="MaxSize" value="0, 0" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;bool name="NoClip" value="false" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;enum name="LeftAlign" value="upperLeft" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;enum name="RightAlign" value="upperLeft" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;enum name="TopAlign" value="upperLeft" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;enum name="BottomAlign" value="upperLeft" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;bool name="Visible" value="true" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;bool name="Enabled" value="true" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;bool name="TabStop" value="false" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;bool name="TabGroup" value="false" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;int name="TabOrder" value="-1" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;color name="col_left_up" value="ffffffff" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;color name="col_right_up" value="ffffffff" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;color name="col_left_down" value="ffffffff" /&gt;<br>&nbsp;&nbsp; &nbsp;&lt;color name="col_right_down" value="ffffffff" /&gt;<br>&nbsp;&nbsp;&lt;/attributes&gt;</code>
 
 
 
<code>&lt;/element&gt; </code>
 
 
 
=== Checkbox  ===
 
<pre>&lt;code&gt;&lt;element type="checkBox"&gt;
 
  &lt;attributes&gt;
 
    &lt;string name="IdName" value="" /&gt;
 
    &lt;string name="TextID" value="" /&gt;
 
    &lt;int name="Id" value="-1" /&gt;
 
    &lt;string name="Caption" value="" /&gt;
 
    &lt;rect name="Rect" value="0, 0, 1, 1" /&gt;
 
    &lt;position name="MinSize" value="1, 1" /&gt;
 
    &lt;position name="MaxSize" value="0, 0" /&gt;
 
    &lt;bool name="NoClip" value="false" /&gt;
 
    &lt;enum name="LeftAlign" value="upperLeft" /&gt;
 
    &lt;enum name="RightAlign" value="upperLeft" /&gt;
 
    &lt;enum name="TopAlign" value="upperLeft" /&gt;
 
    &lt;enum name="BottomAlign" value="upperLeft" /&gt;
 
    &lt;bool name="Visible" value="true" /&gt;
 
    &lt;bool name="Enabled" value="true" /&gt;
 
    &lt;bool name="TabStop" value="true" /&gt;
 
    &lt;bool name="TabGroup" value="false" /&gt;
 
    &lt;int name="TabOrder" value="3" /&gt;
 
    &lt;bool name="Checked" value="false" /&gt;
 
    &lt;int name="IconChecked" value="-1" /&gt;
 
    &lt;int name="IconUnchecked" value="-1" /&gt;
 
    &lt;string name="IconBankName" value="" /&gt;
 
  &lt;/attributes&gt;
 
&lt;/element&gt;
 
&lt;/code&gt;</pre>
 
=== Table  ===
 
 
 
=== MeshViewer  ===
 
 
 
=== StaticText  ===
 
 
 
=== EditBox  ===
 
 
 
=== SpinBox  ===
 
 
 
=== TabControl  ===
 
 
 
=== Tab  ===
 
 
 
=== ContextMenu  ===
 
 
 
=== Menu  ===
 
 
 
=== Toolbar  ===
 
 
 
=== ComboBox  ===
 
 
 
=== Chat  ===
 
 
 
=== RadioButtonGroup  ===
 
 
 
=== RadioCheckboxGroup  ===
 
 
 
=== Slider  ===
 
 
 
=== Tutorial  ===
 
 
 
=== Callback  ===
 
 
 
== Variables  ==
 
 
 
=== Game Manager Variables  ===
 
 
 
player_shields<br>player_visibility<br>player_energy<br>player_hull_usage
 
 
 
player_shields_text<br>player_speed_text<br>player_energy_text<br>player_credits_text<br>player_hull_space_text<br>
 
 
 
<br>
 
 
 
----
 
 
 
[[Category:Guides]] [[Category:C2_testing|Ss2_testing]] [[Category:Development:ContentDevelopment]]
 

Latest revision as of 12:51, 26 February 2012