Difference between revisions of "BearLibTerminal"

From RogueBasin
Jump to navigation Jump to search
m
m (update latest version)
Line 2: Line 2:
|developer = Cfyz
|developer = Cfyz
|released = January 18 2014 (0.9.4)
|released = January 18 2014 (0.9.4)
|updated = Sep 06 2016 (0.14.8)
|updated = Mar 12 2017 (0.15.2)
|dependencies = [[SDL]], [[FreeType2]], [[PicoPNG]], [[NanoJPEG]]
|dependencies = [[SDL]], [[FreeType2]], [[PicoPNG]], [[NanoJPEG]]
|status = Stable
|status = Stable

Revision as of 18:05, 18 June 2017

BearLibTerminal
Library project
Developer Cfyz
Released January 18 2014 (0.9.4)
Updated Mar 12 2017 (0.15.2)
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