July 8th, 2007, 22:58 Posted By: wraggster
News/release from YongoBongo:
PSP Lua Windowing System by Yongobongo
Here is my entry for NeoFlash Summer Compo 2007, it is a LUA Windowing System that supports Multi-Tasking and is fast and easy to use.
I know there have been a few windowing systems written in lua released lately, but i was planning to release a shell i was working on for the Neo compo, except to be honest it sucked
So I made this windowing library
I plan to work on it some more and release a shell using this hopefully before the end of Neo compo
Here is it's current functions:
Window_New(x, y, w, h, label, icon, func)
Creates a new Window Object. eg. WiNdOw = Window_New(0, 0, 100, 150, "Test", Image.load("winicon.jpg"), test)
Draws the Window Object. Called before Window_Register(). eg. Window_Draw(WiNdOw)
Registers the Window Object and handles dragging etc. eg. Window_Register(WiNdOw)
Redraws the Window Object, usually used when changing window's width, height, label, etc. eg. Window_Redraw(WiNdOw)
Drags the Window Object.
Creates an Alert message in a window. eg. Window_Alert(0,0,"HI!")
Gets the numerical ID of a window. eg. var = Window_Get_ID(win)
Shows the Window Object on focus. Must be called within the main loop AFTER all other window object rendering. (note: you must specify 'OnFocus' string before a loop as a Window you want to start as focused)
Button_New(where, w, h, x, y, label, action)
Creates a new Button Object. eg. Butt0n = Button_New(screen,100,150,0,0,"Test",test)
Draws the Button Object. Called before Button_Register(). eg. Button_Draw(Butt0n)
Registers the Button Object and handles clicks, mouseovers etc. eg. Button_Register(Butt0n)
*NOTE: btn.overEffect decides whether the button uses mouse-over effects. This slows down your application a little bit if set to true, but allows mouseover effects. By default, it is set to false.
Button_Register(), but windows are supported. Usually used when using a button in a window. eg. Button_Register_In_Window(Butt0n)
Redraws the Button Object, usually used when changing a button's size or label. eg. Button_Reraw(Butt0n)
Draws borders around an image. This function is used to draw Window and Button object bordering.
Creates and handles the cursor. Used within the main loop of your application.
Checks if the cursor clicks on something. eg. if Cursor_Click(0,0,Butt0n.button) then break end
Checks if the cursor is on something. eg. if Cursor_MouseOver(0,0,Butt0n.button)
CheckBox_New(where, x, y)
Creates a new CheckBox Object. eg. n00b = CheckBox_New(WindowsXP.content, 10, 10)
Draws the CheckBox. eg. CheckBox_Draw(box)
Reraws the CheckBox. eg. CheckBox_Redraw(box)
Registers the CheckBox and handles clicks etc. eg. CheckBox_Register(box)
Registers the CheckBox but has support for Windows. eg. CheckBox_Register_In_Window(box, Window)
Returns True or False (boolean). eg. if CheckBox_Ticked(checkb0x) then break end
I have included a sample desktop environment for it with the app, so you can try it and so it will help you learn how to use the library.
The sample has a Pong game, a music player demo, a pretty bad paint app and a test window with buttons in it that.. do stuff
Also, this runs best on LuaPlayer 0.16
Hope you enjoy this program and library and hope you find it useful!
Download and Give Feedback Via Comments
For more information and downloads, click here!
There are 4 comments - Join In and Discuss Here