Posted By: wraggster
New from glynndor:
My first library for lua- UPDATED
Background:
I have been wanting to do some librarys in lua for a while now, however had no good ideas, (except one that I am still toying with). Then a couple of days ago I had two, ssLib and one other (staying secret). So I worked hard today- completely rewriting the whole library four times, until I reached this. But what is this?
Well, ssLib is something that I think will benefit many applications, it allows you to add a screensaver with one line of code. Sadly though, it is still incomplete, and I was not sure whether or not I should release it. It currently contains only two options, scrolling and teleporting text. Scrolling text scrolls text backward and forward and up and down the screen, you can choose your message and the speed and the colour and soon to be some other factors also. Teleporting text has the text jump from one place on the screen to another, you can customise it in similar ways to scrolling text.
What is currently wrong with ssLib? Well, at the moment there is one massive bug- setting a delay. Because I cant as of yet find a suitable way to make a delay until the screensaver comes on without affecting your app. This means you will have to make one yourself and then call the saver. Oh well, we can live with that.
Usage:
before the main bit of your script, (the while true do bit), type:
Code:
dofile("ssLib.lua")then, when you want the scrolling screensaver to appear type this:
Code:
ssscroll(size, colour, speed, message)
when you want the teleporting one to appear type
Code:
sstele(size, colour, speed, message)If you are confused see the example!
Type rainbow as your colour for the rainbow effect
Then, when no buttons are pressed it will exit back to your app!
To do:
lots including:
Add more screensavers, any ideas? I thought star field and that bouncing text one, put any other suggestions here.
Add flashing (rainbow type) colours - DONE
Add size customisability - DONE!
ADD DELAY!!!
lots more, 99% of which I have forgotten.
So, there ya go!
Enjoy, Alex!
Download and Give Feedback via Comments
via glynndor