Skinning.commandImages

From Shareaza Wiki
Jump to navigation Jump to search

JUST RECOVERED, WHERE IS THAT BOX?

  Languages:

[[::Skinning.commandImages|English]] • [[::Skinning.commandImages/de|Deutsch]] • [[::Skinning.commandImages/es|Español]] • [[::Skinning.commandImages/fr|Français]] • [[::Skinning.commandImages/he|עברית]] • [[::Skinning.commandImages/it|Italiano]] • [[::Skinning.commandImages/nl|Nederlands]] • [[::Skinning.commandImages/pl|Polski]] • [[::Skinning.commandImages/pt|Português]] • [[::Skinning.commandImages/ru|Русский]] • [[::Skinning.commandImages/zh-hant|‪中文(繁體)]]

e
  Recovered

The following content has been recovered from the old wiki and pantheraproject*net. Date unknown, but seems links properly. Competent verification needed. OCE.

e

commandImages

The commandImages provides new icons for different Shareaza commands, replacing the original (default) icons.

Any number of new command icons can be specified, but each must be 16x16 in size. You can load images from .ico files (one image per file), or .bmp image files (many images per file, arranged in a row). Icon files have automatic transparency, while bitmap files need to have a specific transparency colour. By default this is light green (00FF00), but you can specify a different colour.

A visual list of the default icons and their corresponding IDs can be found in <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-default" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-default">Default.xml</a> and <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions">Definitions.xml</a> online.

Here is an example from MyIconsSkin.xml:

 <?xml version="1.0" encoding="UTF-8"?>
 <skin xmlns="http://www.shareaza.com/schemas/Skin.xsd" version="1.0">
  <manifest name="My Icons Skin" author="Me" type="Skin"/>
  <commandImages>
   <bitmap path="MyIcons.bmp" mask="00FF00">
     <image id="ID_TAB_HOME"/>
     <image id="ID_TAB_LIBRARY"/>
     <image id="ID_TAB_NETWORK"/>
     <image id="ID_TAB_TRANSFERS"/>
     <image id="ID_TAB_CONNECT"/>
  </bitmap>
  <icon path="MyIcon.ico" id="ID_NETWORK_CONNECT"/>
  </commandImages>
 </skin>

In the case of an icon, the target command where the icon is to be used is specified in the id attribute. For a list of command IDs, check out default-en.xml in your skins folder or consult the visual index of icons in <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-default" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-default">Default.xml</a> and <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions">Definitions.xml</a> online.

In the case of a bitmap, many icons are stored in the same image. Each icon must be associated with one or more commands. This is done with the <image> tag, which also has an id attribute.

Advanced users may note that there is a second parameter named index which can be applied to the <image> tag, which specifies the index of the icon in the image file (0-based). Specific use of this attribute can be used to associate the same image index with several commands, thus avoiding duplication. For example:

 <bitmap path="MyIcons.bmp" mask="00FF00">
  <image id="ID_NETWORK_CONNECT" index="0"/>
  <image id="ID_NETWORK_DISCONNECT" index="0"/>
  <image id="ID_TAB_LIBRARY"/>
 </bitmap>

 <bitmap path="MyIcons.bmp">
  <image id="ID_NETWORK_CONNECT" id1="ID_NETWORK_DISCONNECT"/>
  <image id="ID_TAB_LIBRARY"/>
 </bitmap>

In this example, ID_NETWORK_CONNECT and ID_NETWORK_DISCONNECT would both take on the first icon in the image. The second icon would be assigned to ID_TAB_LIBRARY.