All Functions Modules Pages
screen

Functions

NIL screen.print (NUMBER x, NUMBER y, STRING txt)
 Prints text on the screen ( default values ). More...
 
NIL screen.print (FONT fnt, NUMBER x, NUMBER y, STRING txt)
 Prints text on the screen ( custom font ). More...
 
NIL screen.print (NUMBER x, NUMBER y, STRING txt, NUMBER size)
 Prints text on the screen ( custom size ). More...
 
NIL screen.print (FONT fnt, NUMBER x, NUMBER y, STRING txt, NUMBER size)
 Prints text on the screen ( custom font and size ). More...
 
NIL screen.print (NUMBER x, NUMBER y, STRING txt, NUMBER size, COLOR face)
 Prints text on the screen (custom size and color, default font). More...
 
NIL screen.print (FONT fnt, NUMBER x, NUMBER y, STRING txt, NUMBER size, COLOR face)
 Prints text on the screen (custom font, size and color). More...
 
NIL screen.print (NUMBER x, NUMBER y, STRING txt, NUMBER size, COLOR face, COLOR shadow)
 Prints text on the screen (default font, size, colors). More...
 
NIL screen.print (FONT fnt, NUMBER x, NUMBER y, STRING txt, NUMBER size, COLOR face, COLOR shadow)
 Prints text on the screen (custom font, size and color). More...
 
NIL screen.print (NUMBER x, NUMBER y, STRING txt, NUMBER size, COLOR face, COLOR shadow, NUMBER align)
 Prints text on the screen (default font, size, colors, and custom alignment). More...
 
NIL screen.print (NUMBER x, NUMBER y, STRING txt, NUMBER size, COLOR face, COLOR shadow, NUMBER align, NUMBER w)
 Prints text on the screen (font, size, colors, and custom alignment). More...
 
NIL screen.print (FONT fnt, NUMBER x, NUMBER y, STRING txt, NUMBER size, COLOR face, COLOR shadow, NUMBER align)
 Prints text on the screen (font, size, colors, and custom alignment). More...
 
NIL screen.clip (NUMBER x, NUMBER y, NUMBER r)
 Limiting the drawing area (circle). More...
 
NIL screen.clip (NUMBER x, NUMBER y, NUMBER w, NUMBER h)
 Limiting the drawing area. More...
 
NIL screen.clip ()
 Removes the limitation of the drawing area. More...
 
NUMBER screen.textwidth (STRING txt)
 Gets the text width in pixels (using the default values). More...
 
NUMBER screen.textwidth (STRING txt, NUMBER size)
 Gets the text width in pixels (using the default font, and custom text size). More...
 
NUMBER screen.textwidth (FONT fnt, STRING txt)
 Gets the text width in pixels (using custom font, and 0.7 as text size). More...
 
NUMBER screen.textwidth (FONT fnt, STRING txt, NUMBER size)
 Gets the text width in pixels (using custom font and text size). More...
 
NUMBER screen.textheight ()
 Gets the text height in pixels (using the default values). More...
 
NUMBER screen.textheight (NUMBER size)
 Gets the text height in pixels (using the default font, and custom text size). More...
 
NUMBER screen.textheight (FONT fnt)
 Gets the text height in pixels (using custom font). More...
 
NUMBER screen.textheight (FONT fnt, NUMBER size)
 Gets the text height in pixels (using custom font and text size). More...
 
NIL screen.clear (COLOR bkg)
 Clears the screen with the specified color. More...
 
IMAGE screen.toimage ()
 Makes an image with the screen content. More...
 
IMAGE screen.buffertoimage ()
 Makes an image with the draw buffer content. More...
 
NIL screen.shot (STRING path)
 Takes a screenshot and save it in the specified folder with Toma una captura de pantalla, y la guarda en la ruta y con el nombre especificados. More...
 
NUMBER screen.fps ()
 Computes the screen frames per second (fps). More...
 
NUMBER screen.frame ()
 Returns the actual frame shown by the console. More...
 
NIL screen.waitvblankstart ()
 Wait for the vertical screen refresh to begin. More...
 
NUMBER screen.brightness ()
 Gets the screen brightness. More...
 
NIL screen.brightness (NUMBER bright)
 Sets the screen brightness. More...
 
NIL screen.flip ()
 Refresh the screen. Any modifications made to it (display pictures, drawn shapes or text) will not be visible until this function is called . More...
 

Detailed Description

Screen managing.

Function Documentation

NIL screen.print ( NUMBER  x,
NUMBER  y,
STRING  txt 
)

Prints text on the screen ( default values ).

Parameters
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
Note
The default values are: size 0.7, color white, without shadow and left alingment.
Returns
Nada.
NIL screen.print ( FONT  fnt,
NUMBER  x,
NUMBER  y,
STRING  txt 
)

Prints text on the screen ( custom font ).

Parameters
fntA font previously loaded.
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
Returns
Nothing.
NIL screen.print ( NUMBER  x,
NUMBER  y,
STRING  txt,
NUMBER  size 
)

Prints text on the screen ( custom size ).

Parameters
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
sizeSize of the text. There is no restriction, but are preferable sizes close to 1.
Returns
Nothing.
NIL screen.print ( FONT  fnt,
NUMBER  x,
NUMBER  y,
STRING  txt,
NUMBER  size 
)

Prints text on the screen ( custom font and size ).

Parameters
fntA font previously loaded.
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
sizeSize of the text. There is no restriction, but are preferable sizes close to 1.
Returns
Nothing.
NIL screen.print ( NUMBER  x,
NUMBER  y,
STRING  txt,
NUMBER  size,
COLOR  face 
)

Prints text on the screen (custom size and color, default font).

Parameters
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
sizeSize of the text. There is no restriction, but are preferable sizes close to 1.
faceText color.
Returns
Nothing.
NIL screen.print ( FONT  fnt,
NUMBER  x,
NUMBER  y,
STRING  txt,
NUMBER  size,
COLOR  face 
)

Prints text on the screen (custom font, size and color).

Parameters
fntA font previously loaded.
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
sizeSize of the text. There is no restriction, but are preferable sizes close to 1.
faceText color
Returns
Nothing.
NIL screen.print ( NUMBER  x,
NUMBER  y,
STRING  txt,
NUMBER  size,
COLOR  face,
COLOR  shadow 
)

Prints text on the screen (default font, size, colors).

Parameters
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
sizeSize of the text. There is no restriction, but are preferable sizes close to 1.
faceText color
shadowShadow color.
Returns
Nothing.
NIL screen.print ( FONT  fnt,
NUMBER  x,
NUMBER  y,
STRING  txt,
NUMBER  size,
COLOR  face,
COLOR  shadow 
)

Prints text on the screen (custom font, size and color).

Parameters
fntA font previously loaded.
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
sizeSize of the text. There is no restriction, but are preferable sizes close to 1.
faceText color
shadowShadow color.
Returns
Nothing.
NIL screen.print ( NUMBER  x,
NUMBER  y,
STRING  txt,
NUMBER  size,
COLOR  face,
COLOR  shadow,
NUMBER  align 
)

Prints text on the screen (default font, size, colors, and custom alignment).

Parameters
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
sizeSize of the text. There is no restriction, but are preferable sizes close to 1.
faceText color
shadowShadow color.
alignAlignment of text, one of the following constants:
  • __ALEFT Left.
  • __ACENTER Centred.
  • __ARIGHT Right.
  • __AFULL Full justify text.
Returns
Nothing.
NIL screen.print ( NUMBER  x,
NUMBER  y,
STRING  txt,
NUMBER  size,
COLOR  face,
COLOR  shadow,
NUMBER  align,
NUMBER  w 
)

Prints text on the screen (font, size, colors, and custom alignment).

Parameters
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
sizeSize of the text. There is no restriction, but are preferable sizes close to 1.
faceText color
shadowShadow color.
alignAlignment of text, one of the following constants:
  • __ALEFT Left.
  • __ACENTER Centred.
  • __ARIGHT Right.
  • __AFULL Full justify text.
  • __SLEFT Left.
  • __SRIGHT Rigth
  • __STHROUGH Left (Through).
  • __SSEESAW Left-Right.
wWidth in pixels.
Returns
Nothing.
NIL screen.print ( FONT  fnt,
NUMBER  x,
NUMBER  y,
STRING  txt,
NUMBER  size,
COLOR  face,
COLOR  shadow,
NUMBER  align 
)

Prints text on the screen (font, size, colors, and custom alignment).

Parameters
fntA font previously loaded.
xX coordinate where the text is printed.
yY coordinate where the text is printed.
txtText to print.
sizeSize of the text. There is no restriction, but are preferable sizes close to 1.
faceText color
shadowShadow color.
alignAlignment of text, one of the following constants:
  • __ALEFT Left.
  • __ACENTER Centred.
  • __ARIGHT Right.
  • __AFULL Full justify text.
Returns
Nothing.
NIL screen.clip ( NUMBER  x,
NUMBER  y,
NUMBER  r 
)

Limiting the drawing area (circle).

Parameters
xCoordinate X of the top left corner.
yCoordinate Y of the top left corner.
rRadius.
Returns
Nothing.
NIL screen.clip ( NUMBER  x,
NUMBER  y,
NUMBER  w,
NUMBER  h 
)

Limiting the drawing area.

Parameters
xCoordinate X of the top left corner.
yCoordinate Y of the top left corner.
wWidth.
hHeight.
Returns
Nothing.
NIL screen.clip ( )

Removes the limitation of the drawing area.

Returns
Nothing.
NUMBER screen.textwidth ( STRING  txt)

Gets the text width in pixels (using the default values).

Parameters
txtText to get its width.
Returns
The text width in pixels.
NUMBER screen.textwidth ( STRING  txt,
NUMBER  size 
)

Gets the text width in pixels (using the default font, and custom text size).

Parameters
txtText to get its width.
sizeText size.
Returns
The text width in pixels.
NUMBER screen.textwidth ( FONT  fnt,
STRING  txt 
)

Gets the text width in pixels (using custom font, and 0.7 as text size).

Parameters
fntA loaded font.
txtText to get its width.
Returns
The text width in pixels.
NUMBER screen.textwidth ( FONT  fnt,
STRING  txt,
NUMBER  size 
)

Gets the text width in pixels (using custom font and text size).

Parameters
fntA loaded font.
txtText to get its width.
sizeText size.
Returns
The text width in pixels.
NUMBER screen.textheight ( )

Gets the text height in pixels (using the default values).

Returns
The text height in pixels.
NUMBER screen.textheight ( NUMBER  size)

Gets the text height in pixels (using the default font, and custom text size).

Parameters
sizeText size.
Returns
The text height in pixels.
NUMBER screen.textheight ( FONT  fnt)

Gets the text height in pixels (using custom font).

Parameters
fntA loaded font.
Returns
The text height in pixels.
NUMBER screen.textheight ( FONT  fnt,
NUMBER  size 
)

Gets the text height in pixels (using custom font and text size).

Parameters
fntA loaded font.
sizeText size.
Returns
The text height in pixels.
NIL screen.clear ( COLOR  bkg)

Clears the screen with the specified color.

Parameters
bkgColor to use.
Note
This function should not be used unless the intention is to paint the entire screen of a different color other than black (it does it automatically with screen.flip() ).
Returns
Nothing.
IMAGE screen.toimage ( )

Makes an image with the screen content.

Returns
An image object, ready to use.
IMAGE screen.buffertoimage ( )

Makes an image with the draw buffer content.

Returns
An image object, ready to use.
NIL screen.shot ( STRING  path)

Takes a screenshot and save it in the specified folder with Toma una captura de pantalla, y la guarda en la ruta y con el nombre especificados.

Parameters
pathPath and name where the screenshot will be saved (only PNG format).
Returns
Nothing.
NUMBER screen.fps ( )

Computes the screen frames per second (fps).

Returns
The actual framerate.
NUMBER screen.frame ( )

Returns the actual frame shown by the console.

Returns
The actual FPS (Frames per second) calculation, from 0 - 60.
NIL screen.waitvblankstart ( )

Wait for the vertical screen refresh to begin.

Returns
Nothing.
NUMBER screen.brightness ( )

Gets the screen brightness.

Returns
The actual screen brightness.
NIL screen.brightness ( NUMBER  bright)

Sets the screen brightness.

Parameters
brightThe new value for the screen brightness (range 21-65536, 0 turns off the screen).
Returns
Nothing.
NIL screen.flip ( )

Refresh the screen. Any modifications made to it (display pictures, drawn shapes or text) will not be visible until this function is called .

Returns
Nothing.