Skinning How To/Add custom artwork to the viewer
A simple file replace is not all you can do with skinning. You can also add your own artwork, with your own file names if you wish. These can take the form if icons, buttons, or backgrounds.
The viewer supports files saved in PNG, TGA, or J2C formats. To add your own artwork to the viewer:
- Save your image in one of the following formats above, for example, foo.tga.
- Move foo.tga to the SecondLifeReleaseCandidate\skins\textures folder.
- In this folder, find and open the file textures.xml and add the following line:
<foo.tga preload="true"/>anywhere between
</textures>. (Note that you can also use scale_rect values for your texture. For more information, read scale_rect).
preload="true"/> ensures the texture loads on startup.
Using your artwork
To use your artwork, you need to reference it in another xml file. For example:
<icon bottom="0" left="0" scale_image="true" width="100" follows="left|right|top|bottom" height="26" image_name="foo.tga"/>
<button bottom="0" font="SansSerif" height="20" left="0" image_selected="foo.tga" image_unselected="foo2tga" image_disabled="foo3.tga" image_disabled_selected="foo4.tga" image_overlay="icn_foo.tga" label="foo" name="foo" tool_tip="Show foo"
Any combination of image_* parameters can be used for buttons, and using your texture as an icon in its own panel (as is done in panel_toolbar.xml loading panel_bg_toolbar.xml) is a way to create your own backgrounds.