< index
< 2. Console emulator
< 2.2 Drawing on the root console

=====================================
Modifying the background color of a cell
=====================================

C++ : void TCODConsole::setBack(int x, int y, const TCODColor &col, TCOD_bkgnd_flag_t flag = TCOD_BKGND_SET)
C   : void TCOD_console_set_back(TCOD_console_t con,int x, int y, TCOD_color_t col, TCOD_bkgnd_flag_t flag)
Py  : console_set_back(con, x,  y, col, flag)

This function modifies the background color of a cell, leaving other properties (foreground color and ASCII code) unchanged.
ParameterDescription
conIn the C version, the offscreen console handler or NULL for the root console.
x,yCoordinates of the cell in the console.
0 <= x < console width
0 <= y < console height
colThe background color to use. You can use color constants.
flagThis flag defines how the cell's background color is modified. See TCOD_bkgnd_flag_t.
insert a comment