Since version 2.1.1, Discodune supports skinning.
A built-in skin, called 'default', is packaged into discodune.jar.
Other skins must be stored in the 'skins' subfolder of the folder containing discodune.jar.
Discodune folder should look like :
- discodune.jar
- discodune.MusicFolderCoverGetter.properties
- discodune.MusicFormats.properties
- discodune.properties
- skins
- skin1
- skin2
- ...
A skin is a folder. The name of the skin is the name of this folder.
A skin folder may contain the following files :
- musiclibrary.background_addons.properties
- musiclibrary.background.png
- musiclibrary.dune_folder.txt
- musiclibrary.icon.png
- artist.background_addons.properties
- artist.background.png
- artist.dune_folder.txt
- artist.icon.png
- record.dune_folder.txt
- record.icon.png
- musicformat.background_addons.properties
- musicformat.background.png
- musicformat.dune_folder.txt
If some files are ommitted, the one from the default skin is used.
The files follow the naming pattern :
{level}.{file_type}
where level is one of discodune levels :
- musiclibrary
- artist
- record
- musicformat
and file_type represents the function of the file :
- background.png : the background image (size: 1920x1080)
- background_addons.properties : description of some objects to draw on the background (titles, images)
- dune_folder.txt : a template of the dunefolder to use.
- icon.png : the icon.
Dune folder templates files use the same format as the Dune dune_folder.txt files, but contain tokens that are replaced by discodune on runtime.
These tokens depends on the target level.
| token | description |
|---|---|
| {BACKGROUND_PATH} | the path of the generated background image |
| {ICON_PATH} | the path of the icon |
| {SYSTEM_FILES_FILTER} | the system files filter |
In the musicformat dune_folder.txt file, discodune generates virtual items for each track.
In the corresponding template, there is a section used to build these virtual items.
This section is contained inside the {ITEM_TEMPLATE[]} pattern.
Background addons files are used to paint some objects (text / images) over the background image.
The background_addons files contain the properties of the objects in the following format :
objectname_propertykey=value
The object names to use are :
| level | object name | description |
|---|---|---|
| musiclibrary | title | title of the library |
| artist | title | name of the artist |
| musicformat | title_artist | artist name |
| musicformat | title_record | record name |
| musicformat | cover_image | the cover image of the record |
The property keys are :
| key | description |
|---|---|
| box | the position and size of the object in the format : left,top,width,height |
| font | font to use to draw the text (in java format) |
| halign | horizontal alignment. Can be : center, left, right |
| valign | vertical alignment. Can be : middle, top, bottom |
| fitmode | fit text or image to box ? Can be : fit_to_box or none |
| fontcolor | color of the text (in html hexadecimal format like FFFFFF for white) |
| bordercolor | color of the border (in html hexadecimal format like FFFFFF for white) |
| borderwidth | width of the border if any (0=no border) |