Skinning.commandImages: Difference between revisions

From Shareaza Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
JUST RECOVERED, WHERE (piiiiiii....) IS THAT BOX??
JUST RECOVERED, WHERE (piiiiiii....) IS THAT BOX??


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



Revision as of 17:42, 17 August 2009

JUST RECOVERED, WHERE (piiiiiii....) 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

</a>

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:

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

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:

 <span class="re1"><bitmap</span> <span class="re0">path</span>=<span class="st0">"MyIcons.bmp"</span> <span class="re0">mask</span>=<span class="st0">"00FF00"</span><span class="re2">></span>
  <span class="re1"><image</span> <span class="re0">id</span>=<span class="st0">"ID_NETWORK_CONNECT"</span> <span class="re0">index</span>=<span class="st0">"0"</span><span class="re2">/></span>
  <span class="re1"><image</span> <span class="re0">id</span>=<span class="st0">"ID_NETWORK_DISCONNECT"</span> <span class="re0">index</span>=<span class="st0">"0"</span><span class="re2">/></span>
  <span class="re1"><image</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_LIBRARY"</span><span class="re2">/></span>
 <span class="re1"></bitmap<span class="re2">></span></span>

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.