libtcoddocumentation

2.1.5. Communicate with the window manager

Changing the window title

This function dynamically changes the title of the game window.
Note that the window title is not visible while in fullscreen.

static void TCODConsole::setWindowTitle(const char *title)

void TCOD_console_set_window_title(const char *title)

console_set_window_title(title)

ParameterDescription
titleNew title of the game window

Handling "close window" events

When you start the program, this returns false. Once a "close window" event has been sent by the window manager, it will allways return true. You're supposed to exit cleanly the game.

static bool TCODConsole::isWindowClosed()

bool TCOD_console_is_window_closed()

console_is_window_closed()

Check if the mouse cursor is inside the game window

Returns true if the mouse cursor is inside the game window area and the game window is the active application.

static bool TCODConsole::hasMouseFocus()

bool TCOD_console_has_mouse_focus()

console_has_mouse_focus()

Check if the game application is active

Returns false if the game window is not the active window or is iconified.

static bool TCODConsole::isActive()

bool TCOD_console_is_active()

console_is_active()