7WiN Windowing System by Yongobongo
Version 1.00 
NeoFlash Summer Coding Comp 2007

---------
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)

	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

	none()
The 'dummy' replacement function if a function is not specified for a Window process.

---------
To-do List
---------
- Improve the way Windows are focused.
- Add a tab bar to minimize/maximize windows.
- Add close and minimize buttons to windows.
- Improve button mouseover effects.

---------
FAQ
---------
Q. I'm still confused, WTF how do i use this :(
A. Look at the 'sample.lua' source, each thing is commented so you should be able to understand it.

Q. WTF did you make this theres already millions of Windowing systems?!
A. I was making a shell and it sucked (bad) so i wanted to learn how to make a good windowing system myself. I plan to make a shell using this later.

Q. Which luaplayers does it run on?
A. I have tested it on LuaPlayer 0.16-0.20. It will work with any mods of these versions too.

Q. I'm making an application with this. Which luaplayer should i bundle?
A. It runs best on LuaPlayer 0.16 because it has more free RAM, so 0.16 :)

Q. If i use this in an app i release, do i have to credit you?
A. Just say thanks in your readme :)

Q. I found a bug/way to improve the code. How do i contact you?
A. Please PM me on QJ if you find a bug or have an improvement of the code :)

Q. I made a mod for this, can i release it?
A. Of course, just make sure you give proper credit :).

---------
Installing
---------
Download LuaPlayer 0.16*: http://dl.qj.net/LuaPlayer-0.16-for-PSP-Firmware-1.0-Gaming-Consoles-PSP-Homebrew-Games/pg/12/fid/691/catid/194
*This will work with other LuaPlayer versions, however i recommend LuaPlayer 0.16 or LuaPlayer 0.16 Cools' mod 4 for best results.

Copy the 'luaplayer' and 'luaplayer%' folders to ms0:/PSP/GAME or if you have OE/SE firmwares, ms0:/PSP/GAME150.
Copy the '7WiN' folder to .. luaplayer directory .. /Applications. Replace '.. luaplayer directory ..' with whatever luaplayer version you used.

Run LuaPlayer from the XMB.
Lowser should appear on the screen (a file browser program for LUA).
Choose the '7WiN' folder and press circle. 
Press circle on 'sample.lua' and 7WiN should launch.

Now you can test out the example!

Press Cross with your cursor over a window's title bar to change focus to the window and start the window's process. This also allows the window to be dragged.
Move your cursor with the Analog stick.
In the Pong game press Up and Down to move your bat, or triangle to reset the game.

---------
About
---------
Copyright 2007 Yongobongo
Made for NeoFlash Comp, Summer 2007.
http://yongobongo.recoding.net/

::

If you like this library/app, vote for it in Neo Comp Summer '07!

---------
NOTICE
---------
I release this library/application under a Creative Commons license.
This means it may be distributed freely and modifications may be released, as long as proper credits are given.