|
July 8th, 2007, 22:58 Posted By: wraggster
News/release from YongoBongo:
7WiN v1.00
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:
Code:
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)
Window_Draw(win)
Draws the Window Object. Called before Window_Register(). eg. Window_Draw(WiNdOw)
Window_Register(win)
Registers the Window Object and handles dragging etc. eg. Window_Register(WiNdOw)
Window_Redraw(win)
Redraws the Window Object, usually used when changing window's width, height, label, etc. eg. Window_Redraw(WiNdOw)
Window_Draw(win)
Drags the Window Object.
Window_Alert(x,y,message)
Creates an Alert message in a window. eg. Window_Alert(0,0,"HI!")
Window_Get_ID(win)
Gets the numerical ID of a window. eg. var = Window_Get_ID(win)
Window_Show_Focused()
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)
Button_Draw(btn)
Draws the Button Object. Called before Button_Register(). eg. Button_Draw(Butt0n)
Button_Register(btn)
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_In_Window(btn)
Button_Register(), but windows are supported. Usually used when using a button in a window. eg. Button_Register_In_Window(Butt0n)
Button_Redraw(btn)
Redraws the Button Object, usually used when changing a button's size or label. eg. Button_Reraw(Butt0n)
Draw_Borders(image,w,h)
Draws borders around an image. This function is used to draw Window and Button object bordering.
Cursor()
Creates and handles the cursor. Used within the main loop of your application.
Cursor_Click(x,y,object)
Checks if the cursor clicks on something. eg. if Cursor_Click(0,0,Butt0n.button) then break end
Cursor_MouseOver(x,y,object)
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)
CheckBox_Draw(box)
Draws the CheckBox. eg. CheckBox_Draw(box)
CheckBox_Redraw(box)
Reraws the CheckBox. eg. CheckBox_Redraw(box)
CheckBox_Register(box)
Registers the CheckBox and handles clicks etc. eg. CheckBox_Register(box)
CheckBox_Register_In_Window(box, win)
Registers the CheckBox but has support for Windows. eg. CheckBox_Register_In_Window(box, Window)
CheckBox_Ticked(box)
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
|
|