Welcome, Guest
Please Login or Register.    Lost Password?

[Closed] Skin Question
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: [Closed] Skin Question
#16778
[Closed] Skin Question 2 Years, 1 Month ago  
am makeing/porting a skin that use a png file for every number ,like for hours > there is a png for every hour and for seconds there is a png also for every second like 01 ,02 , 03 ,etc...

the problem is i dont know how to make Rainlendar or what code should i write to read different png according to every sec/min/hr that the system reads ,anoob was generous enough to help me with the last skin i was porting but this skin is just a whole different story.

+if anyone knows a simple code for the weather to be added to the skin that would be just GREAAAAAAT.

ANY help would be much appreciated.

Update: 6/3

*why when i write a letter after or b4 X=100 or Y=100 it reset to 0 in both direction ?
*why the thin fonts donít work ?
*how to convert skin from ini to xml ,the 1st topic dont help in anyway for the newpies ?
nem0
Senior Boarder
Posts: 49
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Birthday: 10/28
Last Edit: 2012/03/11 03:36 By nem0.
The administrator has disabled public write access.
Dont Let UR Dreams be Just .... A DREAMS.
DA
 
#16781
Re:Skin Question 2 Years, 1 Month ago  
Add in elements.xml (I will suppose that minute and second images are the same):
Code:

<bitmap id="bitmap.hour.0" file="images/hour_0.png" />
<bitmap id="bitmap.hour.1" file="images/hour_1.png" />
...
<bitmap id="bitmap.hour.11" file="images/hour_11.png" />
<bitmap id="bitmap.minsec.0" file="images/minsec_0.png" />
<bitmap id="bitmap.minsec.1" file="images/minsec_1.png" />
...
<bitmap id="bitmap.minsec.59" file="images/minsec_59.png" />


Then, in a lua script do:
Code:

--for 12 hours system. The numbers doesn't have trailing zeroes (5 instead of 05)
hourNow = tonumber(os.date("%I"))
minNow = tonumber(os.date("%M"))
secNow = tonumber(os.date("%S"))
Rainlendar_SetItemValue(window, "MyPortedSkin.hour", "element", "bitmap.hour." .. hourNow)
Rainlendar_SetItemValue(window, "MyPortedSkin.min", "element", "bitmap.minsec." .. minNow)
Rainlendar_SetItemValue(window, "MyPortedSkin.sec", "element", "bitmap.minsec." .. secNow)



You need to have in the window xml something like:
Code:

<image id="MyPortedSkin.hour" element="bitmap.hour.0" ... />
<image id="MyPortedSkin.min" element="bitmap.minsec.0" ... />
<image id="MyPortedSkin.sec" element="bitmap.minsec.0" ... />




About weather, there's no a simple code because you need to connect to a site, download the file, parse the file (the worst part) and display it on screen.
Jorge_Luis
Platinum Boarder
Posts: 780
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
Last Edit: 2012/03/04 07:43 By Jorge_Luis.Reason: Trailing zeroes
The administrator has disabled public write access.
 
#16782
Re:Skin Question 2 Years, 1 Month ago  
Jorge_Luis wrote:
Add in elements.xml (I will suppose that minute and second images are the same):
Code:

<bitmap id="bitmap.hour.0" file="images/hour_0.png" />
<bitmap id="bitmap.hour.1" file="images/hour_1.png" />
...
<bitmap id="bitmap.hour.11" file="images/hour_11.png" />
<bitmap id="bitmap.minsec.0" file="images/minsec_0.png" />
<bitmap id="bitmap.minsec.1" file="images/minsec_1.png" />
...
<bitmap id="bitmap.minsec.59" file="images/minsec_59.png" />


..........................

About weather, there's no a simple code because you need to connect to a site, download the file, parse the file (the worst part) and display it on screen.


WOOOOOOOOW ,u mean i need to write every png to its number ,cant i just write it like in Rainmeter where u have somthing like Substitute ???

and about the weather ,its okey ,i can live without it ,its a lame thing anyway.

btw ,could u please write this code or the simpler code in ini not xml ,its easier to understand this way ,btw what would be the reason if the png is just showing half of its size even when i write W=500 it sill shows the half only ??? ,thanx again for ur time and help.
nem0
Senior Boarder
Posts: 49
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Birthday: 10/28
Last Edit: 2012/03/04 23:54 By nem0.
The administrator has disabled public write access.
Dont Let UR Dreams be Just .... A DREAMS.
DA
 
#16785
Re:Skin Question 2 Years, 1 Month ago  
I'm not sure what effect you want, so try this first:
Code:


[Rainlendar]

;setting height and width(its a way for workaround)
[Year]
YearEnable=1
YearX=220
YearY=500

; setting Hours
[Time1]
Window=0
X=0
Y=0
Rasterizer=BITMAP
BitmapName=digitshours.png
Digits=2
Align=0
Format=%I

; setting Minutes
[Time2]
Window=0
X=0
Y=130
Rasterizer=BITMAP
BitmapName=digitsminutes.png
Digits=2
Align=0
Format=%M

; setting Second
[Time3]
Window=0
X=0
Y=260
Rasterizer=BITMAP
BitmapName=digitshours.png
Digits=2
Align=0
Format=%S



what would be the reason if the png is just showing half of its size even when i write W=500 it sill shows the half only ???Can you posted(or attach) the whole ini ? i would check it.
anoob
Platinum Boarder
Posts: 476
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
#16786
Re:Skin Question 2 Years, 1 Month ago  
I don't know about ini because I started using Rainlendar with version 2.
But from the original question, there is 1 png for hour and 1 png for seconds or 12 png for hours and 60 png for seconds?
Jorge_Luis
Platinum Boarder
Posts: 780
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.
 
#16788
Re:Skin Question 2 Years, 1 Month ago  
anoob wrote:
what would be the reason if the png is just showing half of its size even when i write W=500 it sill shows the half only ???Can you posted(or attach) the whole ini ? i would check it.

i know that code already but it didnt work ,anyway here is the skin with both the ini ,see if u can fix the other skin too please .
nem0
Senior Boarder
Posts: 49
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Birthday: 10/28
Last Edit: 2012/03/06 07:10 By nem0.
The administrator has disabled public write access.
Dont Let UR Dreams be Just .... A DREAMS.
DA
 
Go to topPage: 123
get the latest posts directly to your desktop