SDL Terminal is a library that adds a color terminal with pseudo-ansi support to any SDL application.
The usage of the library is demonstrated via the following simple example code:
/* Terminal creation and settings */
SDL_Terminal *terminal = SDL_CreateTerminal ();
SDL_TerminalSetFont (terminal, "./VeraMono.ttf", 12);
SDL_TerminalSetSize (terminal, 80, 24);
SDL_TerminalSetPosition (terminal, 10, 10);
/* Print a new line of text on terminal */
SDL_TerminalPrint (terminal, "Hello !");
/* Blit terminal onto current video surface */
SDL_TerminalBlit (terminal);
/* Catch terminal event and get user input */
switch (event.type) {
case SDL_TERMINALEVENT:
printf ("User input: %sn", (char *) event.user.data2);
The SDL Terminal package comes with various examples that demonstrate using terminals in 2D or 3D modes. Additionally, an example explains how to emulate a python console using the SDL Terminal.
Overall, SDL Terminal is an excellent library that is incredibly useful when dealing with SDL-based applications. With its simple interface and comprehensive documentation, SDL Terminal is the perfect tool for anyone looking to create user-friendly SDL applications.
Version 1.1.3: N/A