Hey everyone, I made a very simple multithreading example that you may want to look at when designing nevyns new shell. It has windows, and when you hit OK on the active window, it closes.
Controls:
analog and cross are the mouse
square prompt which window to close, up/down selects, cross confirms
triangle creates a new window in a random location
start exits
the numbers at the top right are:
FPS
number of windows
Alright, here's the download:
http://rapidshare.de/files/10133307/coroutines.rar.html
--
Heres the variables use:
Table window:
table .windows is the coroutines
table .x is the x coordinates of the windows in 'windows', respectivly
table .y same as .x, but the y coordinates
number .number of the window open (like when it says window #x)
number .active is the top window. (simply table.getn(window.windows))
function .new(function, windowx, windowy) creates a new window
function .close(windownumber) closes the window selected
Table mouse:
number .x the x coordinate of the mouse
number .y the y coordinate
image .cursor is the image of the cursor
function .control call after reading controls to blit cursor w/out screen.flip
Coroutines (Multithreading) example I made
Moderators: Shine, Insert_witty_name