Welcome, Guest
Please Login or Register.    Lost Password?

Where i can use the .N for frame selection?
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Where i can use the .N for frame selection?
#13851
Where i can use the .N for frame selection? 3 Years, 11 Months ago  
In <bitmap> the help guide says:
frames - The number of frames the image has. If defined the image is splitted into frames either vertically or horizontally (the larger dimension defines the split direction). You can refer to a frame by adding ".N" at the end of the element name (e.g. bitmap.months.4)
The question is where i can do this?

I have an 3 images with 4 frames (the classic 4 moon phases in 3 different styles) and i'm trying to do a category for each phase. This is for "New moon":
<appearance target="32" layer="0" priority="1" element="bitmap.icon.small.moon.%moon_style%.1" showalways="1" />
The log says:
0:00:00: [2:44:42.235] WARNING: The element cannot be found "bitmap.icon.small.moon.bw.1".
0:00:00: [2:44:42.235] CItemCalendar::DrawItem(): Unable to find the element "bitmap.icon.small.moon.bw.1"
0:00:01: [2:44:42.719] WARNING: The element cannot be found "bitmap.icon.moon.bw.1".

This is the element definition:
<bitmap id="bitmap.icon.moon.bw" file="images/icons/icon-moon-bw.png" frames="4" />
and %moon_style% is defined in an xml's addon file
<variable name="moon_style" default="bw" values="Black and White:bw;Dark:dark;Light:light" description="None." />

Is this possible or i'm trying to do something wrong (or not supported)?
Jorge_Luis
Platinum Boarder
Posts: 795
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#13855
Re: Where i can use the .N for frame selection? 3 Years, 11 Months ago  
That is not possible anymore. Previously you could refer the frames like that but I think this was changed when I refactored the code so that the images are not loaded into memory until they are actually used.
Rainy
Moderator
Posts: 6003
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#13862
Re: Where i can use the .N for frame selection? 3 Years, 11 Months ago  
Oh, well, i had to do it as the old way (e.g. one picture for each phase)

Now i have 2 different problems:
When i do e.g. Rainlendar_GetVariable("Shadow4", "", "Time_format") it says WARNING: Lua_GetVariable(): Some parameter is missing and i can't get the variable value. I need this variable to made the possibility to change the time format (as the event list window). And i have no window to use.

How can i show an event without color? What i'm saying is i need to show an icon beside the holiday icon on a yellow day (because holiday appearence), the same icon in pink for weekend and in white on a normal day. But the predefined color is blue, and if i set the appearence color to white, it shows white on weekend days.

(The underlying idea is to show the moon phases icons on the calendar, based on a Lua script using a category)
Jorge_Luis
Platinum Boarder
Posts: 795
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
Last Edit: 2010/12/05 19:55 By Jorge_Luis.
The administrator has disabled public write access.
 
#13885
Re:Where i can use the .N for frame selection? 3 Years, 10 Months ago  
Getting the global variables doesn't seem to be working with Rainlendar_GetVariable() like it should. I'll fix that.

The default event color can be ignored if you add ignoredefault="1" to the icon's appearance definition.
Rainy
Moderator
Posts: 6003
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#13891
Re:Where i can use the .N for frame selection? 3 Years, 10 Months ago  
This is an example of what i was trying to say:



The 16 should be yellow because is a Public Holiday.
The 12, 19 and 26 should be pink, because are weekend days.
The 3, 4 and 10 are ok in white, because these days doesn't have events.

This is the category XML:
Code:

    <category id="Moon - Full Moon">
      <appearance target="1" layer="0" priority="1" element="bitmap.numbers.white" align="CENTER" />
      <appearance target="1" layer="5" priority="-100" element="bitmap.icon.small.moon.%Moon_style%.fm" align="TOP-LEFT" showalways="1" offset="0, -2" />
      <appearance target="22" layer="0" priority="-100" element="bitmap.icon.moon.%Moon_style%.fm" showalways="1" offset="-2, -2" />
      <appearance target="8" layer="0" priority="-100" element="bitmap.icon.moon.%Moon_style%.fm" showalways="1" />
      <appearance target="32" layer="0" priority="-100" element="bitmap.icon.small.moon.%Moon_style%.fm" showalways="1" />
    </category>


I use priority="-100" to show the icon in the first place. If i remove the bitmap.numers.white line, the 16 is yellow, but the rest is blue (the default event color).

This isn't an easy thing, no?
Jorge_Luis
Platinum Boarder
Posts: 795
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#13895
Re:Where i can use the .N for frame selection? 3 Years, 10 Months ago  
Try how it looks like this:

Code:


 <category id="Moon - Full Moon"> 
      <appearance target="1" layer="5" priority="-100" element="bitmap.icon.small.moon.%Moon_style%.fm" align="TOP-LEFT" showalways="1" offset="0, -2" ignoredefault="1" /> 
      <appearance target="22" layer="0" priority="-100" element="bitmap.icon.moon.%Moon_style%.fm" showalways="1" offset="-2, -2" /> 
      <appearance target="8" layer="0" priority="-100" element="bitmap.icon.moon.%Moon_style%.fm" showalways="1" /> 
      <appearance target="32" layer="0" priority="-100" element="bitmap.icon.small.moon.%Moon_style%.fm" showalways="1" /> 
    </category> 

Rainy
Moderator
Posts: 6003
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
get the latest posts directly to your desktop