Time function

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Squall333
Posts: 91
Joined: Thu Apr 28, 2005 5:32 am

Time function

Post by Squall333 »

This might sound wierd but how do i get the spaces out from between the hours the colon and the minutes and also i need the time to show up on top of a screen:blit

EDIT: also is there an easy way to do something like if the two pictures intersect then turn on picture
like if you wanted to highlight something and you have a regular picture and that picture highlighted in a color then you say when the cursor and the picture interect turn on the highlighted picture

any help is greatly appreciated
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

I don't understand your questions, can you write it in more understandable English? Perhaps the clock example from http://www.luaplayer.org/gallery/ helps you.
Squall333
Posts: 91
Joined: Thu Apr 28, 2005 5:32 am

Post by Squall333 »

Ill explain this as best as i can the time is like this 4 : 23 i want it like 4:23 but it the clock example the numbers are on a blank background i cant get my numbers to show up above my own background
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

Take a look at http://www.lua.org/manual/5.0/manual.html#5.7 and then at the description of strftime, for example at Microsoft and you should be able to build the correct format string.

For writing on top of your background use a tutorial at http://www.luaplayer.org/tutorial/ , perhaps the animation with the smiley and write the time instead of blitting the smiley on top of the background.
Squall333
Posts: 91
Joined: Thu Apr 28, 2005 5:32 am

Post by Squall333 »

i understand that when bliting it shows the most recent on top but how about a screen:print on top of a screen:blit is it the same?
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

I'm sorry, the documentation is not as good as it could be, so you can't know the result, but did you considered to just try what I wrote?
Squall333
Posts: 91
Joined: Thu Apr 28, 2005 5:32 am

Post by Squall333 »

Im not as concerned about the format of the time as i am about it actually being visable
Post Reply