BearLibTerminal

From RogueBasin
Revision as of 02:11, 8 March 2021 by Ancient (talk | contribs) (update latest version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
BearLibTerminal
Library project
Developer Cfyz
Released January 18 2014 (0.9.4)
Updated November 20 2017 (0.15.7)
Status Stable
Licensing MIT License
P. Language C, C++, Python, C# ,Lua, Pascal, Ruby
Platforms Windows, Linux, Mac OS X
Dependencies SDL, FreeType2, PicoPNG, NanoJPEG
Official site of BearLibTerminal


BearLibTerminal is a library that creates a terminal-like window facilitating flexible textual output and uncomplicated input processing.

BearLibTerminal focuses on graphics output. It does not include random number generators or path finding algorithms. Instead BearLibTerminal provides a lot of options for font/tileset configuration and tile-based output.

Features

  • Ease of Unicode usage.
  • Support for bitmap and vector (TrueType) fonts.
  • Extended output facilities: tile composition, alignment, offsets.
  • High performance (uses OpenGL).
  • Keyboard and mouse support.
  • Windows, Linux and OS X builds.
  • Bindings for several programming languages: ?/?++, C#, Lua, Pascal, Python, Ruby.

Examples

C/C++:

#include "BearLibTerminal.h"
  
int main()
{
    terminal_open();
  
    // Printing text
    terminal_print(1, 1, "Hello, world!");
    terminal_refresh();
  
    // Wait until user close the window
    while (terminal_read() != TK_CLOSE);
  
    terminal_close();
}

Python:

from bearlibterminal import terminal
 
terminal.open()
terminal.printf(1, 1, 'Hello, world!')
terminal.refresh()
 
while terminal.read() != terminal.TK_CLOSE:
    pass
 
terminal.close()

Related Links