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.
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. |
Returns an integer typed by the user.
/* Returns an integer typed by the user. */ VALUE rubyConsoleGetNum(VALUE self)
Returns a string typed by the user.
/* Returns a string typed by the user. */ VALUE rubyConsoleGets(VALUE self)
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.
/* 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.
/* call-seq: print(str) -> nil Adds text to the actual line. */ VALUE rubyConsolePrint(VALUE self, VALUE str)
Writes a line on the console.
/* call-seq: puts(str) Writes a line on the console. */ VALUE rubyConsolePuts(VALUE self, VALUE str)
Replaces the actual line.
/* call-seq: replace(str) Replaces the actual line. */ VALUE rubyConsoleReplace(VALUE self, VALUE str)
Switches the fixed state on/off.
/* Switches the fixed state on/off. */ VALUE rubyConsoleSwitchFixedMode(VALUE self)
Switches the scroll and fade effect on/off.
/* call-seq: switch_sfx Switches the scroll and fade effect on/off. */ VALUE rubyConsoleSwitchSFX(VALUE self)
Sets the Console’s text color.
/* call-seq: text_color=(color) Sets the Console's text color. */ VALUE rubyConsoleSetTextColor(VALUE self, VALUE color)