Module Console
In: Console.cpp

This module contains functions used when drawing text and getting text from a keyboard.

Some files are required to use it. You can see them in the samples using that module.

Methods

exit   get_num   gets   init   is_button?   print   puts   replace   switch_fixed   switch_sfx   text_color=   wait_key  

Constants

FULL = FULL   Loads the library with its keyboard.
LITE = LITE   Loads the library without its keyboard.
PRESSED = PRESSED   State for a key which is held.
JUST_PRESSED = JUST_PRESSED   State for a key which has been pressed.
JUST_RELEASED = JUST_RELEASED   State for a key which has been released.
STILL_PRESSED = STILL_PRESSED   State for a key which is still pressed.
ANY_KEY = 0   This code can be given to wait untill any key is pressed.

Public Class methods

Exits from the Console, with a fading effect.

[Source]

/*
  call-seq: exit

  Exits from the Console, with a fading effect.
*/
VALUE rubyConsoleExit(VALUE self) 

Returns an integer typed by the user.

[Source]

/*
  Returns an integer typed by the user.
*/
VALUE rubyConsoleGetNum(VALUE self) 

Returns a string typed by the user.

[Source]

/*
  Returns a string typed by the user.
*/
VALUE rubyConsoleGets(VALUE self) 

Inits Console, either in FULL or LITE mode. Use FULL if you want to use the keyboard.

[Source]

/*
  call-seq: init(mode)

  Inits Console, either in FULL or LITE mode.
  Use FULL if you want to use the keyboard.
*/
VALUE rubyConsoleInit(VALUE self, VALUE mode) 

Returns whether the button button (either a constant in +Joyau::Pad+ or ANY_KEY) is at state, where state is a constant defined in Console.

[Source]

/*
  call-seq: is_button?(button, state) -> true or false

  Returns whether the button <em>button</em> (either a constant in +Joyau::Pad+
  or ANY_KEY) is at <em>state</em>, where +state+ is a constant defined in 
  +Console+.
*/
VALUE rubyConsoleIsButton(VALUE self, VALUE button, VALUE state) 

Adds text to the actual line.

[Source]

/*
  call-seq: print(str) -> nil

  Adds text to the actual line.
*/
VALUE rubyConsolePrint(VALUE self, VALUE str) 

Writes a line on the console.

[Source]

/*
  call-seq: puts(str)

  Writes a line on the console.
*/
VALUE rubyConsolePuts(VALUE self, VALUE str) 

Replaces the actual line.

[Source]

/*
  call-seq: replace(str)

  Replaces the actual line.
*/
VALUE rubyConsoleReplace(VALUE self, VALUE str) 

Switches the fixed state on/off.

[Source]

/*
  Switches the fixed state on/off.
*/
VALUE rubyConsoleSwitchFixedMode(VALUE self) 

Switches the scroll and fade effect on/off.

[Source]

/*
  call-seq: switch_sfx

  Switches the scroll and fade effect on/off.
*/
VALUE rubyConsoleSwitchSFX(VALUE self) 

Sets the Console’s text color.

[Source]

/*
  call-seq: text_color=(color)

  Sets the Console's text color.
*/
VALUE rubyConsoleSetTextColor(VALUE self, VALUE color) 

Waits that the user presses button, and then prints something on the screen.

[Source]

/*
  call-seq: wait_key(button, str)

  Waits that the user presses button, and then prints something on the screen.
*/
VALUE rubyConsoleWaitKey(VALUE self, VALUE button, VALUE str) 

[Validate]