Console¶
Note
These docs are incomplete. Several functions and features are better documented by the older 1.6.4 docs which you can find here.
tcod::Console¶
TCOD_Console¶
Initializing the console¶
Creating the game window¶
Using a custom bitmap font¶
Using custom characters mapping¶
Fullscreen mode¶
Communicate with the window manager¶
libtcod’s Credits¶
Drawing on the console¶
Basic drawing functions¶
Drawing functions (C++)¶
Background effect flags¶
String printing alignment¶
Reading the content of the console¶
Screen fading functions¶
ASCII constants¶
Printing to the console¶
Printing functions using UTF-8¶
Printing functions using UTF-8 (C++)¶
Printing functions using 8-bit encodings (deprecated)¶
Note
These functions use EASCII encoded strings which are not compatible with Unicode. They are deprecated for this reason.
Printing functions using wchar_t (deprecated)¶
Note
These functions say they are UTF, however they will behave as UCS2 or UCS4 depending on the platform. They are deprecated for this reason.
Flushing the root console¶
Handling user input¶
Blocking user input¶
Non blocking user input¶
Keyboard event structure¶
Key codes¶
Mouse event structure¶
Events from SDL2¶
Using off-screen consoles¶
Creating and deleting off-screen consoles¶
Creating an off-screen console from any .asc/.apf/.xp file¶
Loading an offscreen console from a .asc file¶
Loading an offscreen console from a .apf file¶
Saving a console to a .asc file¶
Saving a console to a .apf file¶
Working with REXPaint .xp files¶
REXPaint gives special treatment to tiles with a magic pink {255, 0, 255}
background color. You can processes this effect manually or by setting
TCOD_console_set_key_color to TCOD_fuchsia.
- libtcodpy.console_from_xp(filename)¶
- libtcodpy.console_load_xp(con, filename)¶
-
bool TCODConsole::loadXp(const char *filename)¶
- libtcodpy.console_save_xp(con, filename, compress_level=-1)¶
-
bool TCODConsole::saveXp(const char *filename, int compress_level)¶
- libtcodpy.console_list_from_xp(filename)¶
- libtcodpy.console_list_save_xp(console_list, filename, compress_level)¶