Struct tcod::console::Root [] [src]

pub struct Root { /* fields omitted */ }

Methods

impl Root
[src]

Returns an instance of a RootInitializer object, which can be used to customize the initialization of the Root console. Note that only RootInitializer::init will return the actual Root console instance. For a full list of initialization options, see the RootInitializer documentation.

Examples

use tcod::console::Root;

let mut root = Root::initializer()
    .size(80, 20)
    .title("Example")
    .fullscreen(true)
    .init();

Returns with true when the Root console is in fullscreen mode.

Toggles between windowed and fullscreen mode.

This function changes the keyboard repeat times. The initial delay determines the number of milliseconds between the keypress and the time the keyboard repeat begins. The interval sets the time between the keyboard repeat events. With an initial delay of 0, the keyboard repeat feature is completely disabled.

Disables the keyboard repeat feature. Equivalent to set_keyboard_repeat with an initial delay of 0.

Returns true if the Root console is currently active.

Returns true if the Root console has focus.

Returns the current fade amount (previously set by set_fade).

Returns the current fade color (previously set by set_fade).

This function defines the fading parameters, allowing to easily fade the game screen to/from a color. Once they are defined, the fading parameters are valid for ever. You don't have to call setFade for each rendered frame (unless you change the fading parameters).

This function will wait for a keypress event from the user, returning the KeyState that represents the event. If flush is true, all pending keypresses are flushed from the keyboard buffer. If false, it returns the first element from it.

This function checks if the user pressed a key. It returns the KeyState representing the event if they have, or None if they have not.

Returns with true if the Root console has been closed.

Flushes the contents of the Root console onto the screen.

Sets the main window's title to the string specified in the argument.

Embeds libtcod credits in a console. Returns true when the credits screen is finished.

Trait Implementations

impl AsNative<TCOD_console_t> for Root
[src]

impl Console for Root
[src]

Returns the default text alignment for the Console instance. For all the possible text alignment options, see the documentation for TextAlignment. Read more

Sets the default text alignment for the console. For all the possible text alignment options, see the documentation for TextAlignment. Read more

Sets a key color that will be ignored when blitting the contents of this console onto an other (essentially a transparent background color). Read more

Returns the width of the console in characters.

Returns the height of the console in characters.

Return the console's default background color. This is used in several other methods, like: clear, put_char, etc. Read more

Sets the console's default background color. This is used in several other methods, like: clear, put_char, etc. Read more

Sets the console's default foreground color. This is used in several printing functions.

Returns the background color of the cell at the specified coordinates.

Returns the foreground color of the cell at the specified coordinates.

Returns the console's current background flag. For a detailed explanation of the possible values, see BackgroundFlag. Read more

Sets the console's current background flag. For a detailed explanation of the possible values, see BackgroundFlag. Read more

Returns the ASCII value of the cell located at x, y

Modifies the ASCII value of the cell located at x, y.

Changes the background color of the specified cell

Changes the foreground color of the specified cell

This function modifies every property of the given cell: Read more

Updates every propert of the given cell using explicit colors for the background and foreground. Read more

Clears the console with its default background color

Prints the text at the specified location. The position of the x and y coordinates depend on the TextAlignment set in the console: Read more

Prints the text at the specified location in a rectangular area with the dimensions: (width; height). If the text is longer than the width the newlines will be inserted. Read more

Prints the text at the specified location with an explicit BackgroundFlag and TextAlignment. Read more

Combines the functions of print_ex and print_rect

Compute the height of a wrapped text printed using print_rect or print_rect_ex.

Fill a rectangle with the default background colour. Read more

Draw a horizontal line. Read more

Draw a vertical line. Read more

Draw a window frame with an optional title. Read more