libtcod
Loading...
Searching...
No Matches
TCOD_Console Struct Reference

A libtcod console containing a grid of tiles with {ch, fg, bg} information. More...

#include <console.h>

Public Attributes

int w
 Console width and height in tiles.
int h
TCOD_ConsoleTiletiles
 A contiguous array of console tiles.
TCOD_bkgnd_flag_t bkgnd_flag
 Default background operator for print & print_rect functions.
TCOD_alignment_t alignment
 Default alignment for print & print_rect functions.
TCOD_color_t fore
 Foreground (text) and background colors.
TCOD_color_t back
bool has_key_color
 True if a key color is being used.
TCOD_color_t key_color
 The current key color for this console.
int elements
 The total length of the tiles array.
void * userdata
 A userdata attribute which can be repurposed.
void(* on_delete )(struct TCOD_Console *self)
 Internal use.

Detailed Description

A libtcod console containing a grid of tiles with {ch, fg, bg} information.

In C++ this struct has several convience methods to make working with consoles easier. Note that all tile references are to TCOD_ConsoleTile structs and will include an alpha channel.

For C++ code examples see tcod::Console.

embed:rst:leading-asterisk 
.. versionadded:: 1.19

Member Data Documentation

◆ elements

int TCOD_Console::elements

The total length of the tiles array.

Same as w * h.

embed:rst:leading-asterisk 
.. versionadded:: 1.16

◆ userdata

void* TCOD_Console::userdata

A userdata attribute which can be repurposed.

embed:rst:leading-asterisk 
.. versionadded:: 1.16

The documentation for this struct was generated from the following file:
  • C:/Users/4b796/Projects/libtcod/src/libtcod/console.h