Rainy hasn’t documented the skinning of RL2 yet, so I thought I would start with explaining some general aspects of it relating to the Shadow skin.
Skins are saved to a compressed file zip file renamed with a .r2skin extension. One can develop their skins in a new folder under the skinning directory.
At the root of the zip file is a file called skin.xml; this is the heart of the skin. While I do believe you can put all your xml code here, what Rainy does is put his code for specific windows in their own file (calendar, events list, todo list). These are put in the xml directory then referenced to in skin.xml using an include element.
Skin.xml: The fist part is <info> which is what is displayed when the person clicks on the skin from the options menu (the details panel), very self explanatory. Next is the variables. Each window can have its own set of variable that can be changed from the advanced options. Here are the attributes I know of:
Variable element Attributes:[quote]
name: The variable, what ever is entered here is then referenced to in other xml by using %name_value%. Note that the underscore is used instead of spaces. The name is also what is used when the user goes into the advanced skin settings.
default: The starting value for the variable.
window: Which window is the variable associated with.
description: Along with ‘name’ this is what will show up in the details panel when the skin is selected.
[/quote]
images/: Not much to say here, a bunch of images that are used with the skin. Elements.xml handles referencing the images.
xml/elements.xml: I won’t go into much detail but I’ll break it down by element.
Some common attributes are:
id: Used for referencing the element elsewhere, can be whatever you want.
file: Usually the location of an image.
Elements:[quote]
bitmapfont: a way to use images as a font. I really don’t know how to work this one out so someone else might pitch in if they find out.
bitmap: Creates a reference to an image you can use elsewhere.
font: A way to describe a font that can be referenced by the ‘id’ given.
[/quote]
This is probably the best part of elements.xml. Specifying the appearance to a category is done in the <categories> element. A new category appearance is created with <category id=””> where the ‘id’ is the name of the category used in the calendar.
Appearance:[quote]
target: This attribute specifies what ‘window’ is the target. I will give a list of what I know the numbers reference to in my next quote.
layer: Think of each category as though it had a level at which it reside and the user is looking at it top down. If one category is at “1” and another is at “2” then the category at 1 would fall behind 2.
priority: I can’t really say to much on this, the higher the number the higher its priority. I don’t really know how different it is from layer or the best way to use the two, but I’m sure there is a good use.
element: Reference to an element specified above. Use the elements ‘id.’
color: Used with fonts this uses red, green, blue, transparency(255: opaque). Actually I really don’t know so please take this with a grain of salt and maybe have some stake with it.
align: Alignment. I don’t know all the values for this, I tried TOP_RIGH,T but it gave me the same this as TOP_LEFT. I’ve also seen CENTER.
[/quote]
Target:[quote]
1: The Calendar.
2: Events List.
6: Todo List
8: Alarm.
16: Tooltip.
[/quote]
Add the numbers together to obtain multiple windows.
scripts/ Rainy isn’t actually using the scripts in this directory, he has commented out the code that imported them in elements.xml. These scripts can be found in the Rainlendar application directory. I have been told that scripting as it should be has not be implemented yet, he has only got it to the point that the old skin can be supported. I am looking forward to exploring this.
I’m done for now. I will need to update to the latest skin, as this was written during the beta stage. I may later explain each “window” xml file, and the more I’m bugged for explanations the more likely I will write one.