[ Back ]
Here you'll find some things that just didn't fit anywhere else.
procedure set window x, y, w, h[, full_screen[, scale_factor]]
procedure set redraw value
procedure wait ms
procedure wait keydown
procedure wait mousebutton
procedure randomize seed
procedure shellexecute operation$, file$, path$, parameters$, waitForProcess
Place window at x, y and set its width and height to w and h. If full_screen is set to true, the window will have no borders and be stretched to cover the entire screen (that is, the screen mode is not actually changed as in previous NaaLaa versions). If scale_factor is set to a value greater than 1, the window and all the graphics will be scaled by that value. Mouse input coordinates are automatically scaled. For, example, if you'd like a 320x240 window scaled by 2, you'd write:
set window 0, 0, 320, 240, false, 2
By default every operation that draws something to the primary image (the back buffer) will cause the entire image to be copied to the window. By setting value to false the primary image will only be copied when redraw is called.
Copy the primary image to the window.
Sleep for ms milliseconds. Note that the window can only take care of its messages during a sleep period. If the keydown, mousex, mousey or mousebutton functions are used within a loop, the loop must contain a wait call. 0 is a valid value for ms.
Wait for any key to be pressed.
Wait for any mouse button to be pressed.
Return true if window is in fullscreen mode.
Return true if the window has got focus.
Return the current time in milliseconds.
Return a random number between 0 and n - 1.
Send a new seed value to be used next time rnd is called. A normal thing is to use:
in the beginning of your program. But you can of course also force a certain random number sequence by passing an integer constant.
If any arguments have been passed to your program when it starts, this array contains these arguments. The first argument (args) is always the path to and filename of your program.
Note that the args array can also be used to pass arguments between program units.
Execute an external program/file. If waitForProcess is true, the program will wait for the new process to finish. Example for opening a webpage:
shellexecute "open", "http://www.naalaa.com", "", "", false
[ Back ]