create text apps and games easily
#include "otto-tui.h" // import the library
int main(){
Canvas canvas = new_canvas(); // Canvas structure (this is what you draw graphics to)
Ezi ezi = new_ezi(); // EZ-Input structure or "Ezi"
int run = 1; // flag to determine when to stop
while(run){ // loop until stopped
printf("\033[2J"); // clear the screen
render_canvas(&canvas); // render the canvas
get_keypress_ezi(&ezi); // wait for key input
if(ezi.key == "escape"){ // check if key is the escape key
run = 0; // kill the loop
}
}
destroy_ezi(); // free the ezi for fun
}
char chbool invert
- return-type:
Glyph - parameters:
char chbool invert
- usage:
Glyph my_glyph = new_glyph('A', false)
Glyph glyphs[500][500]int wint h
- return-type:
Canvas - parameters:
- NONE
- usage:
Canvas my_canvas = new_canvas()
- return-type:
void - parameters:
Canvas* canvaschar chbool invertint xint y
- return-type:
void - parameters:
Canvas* canvaschar* stringbool invertint xint y
- return-type:
void - parameters:
Canvas* canvaschar chbool invertint line
- return-type:
void - parameters:
Canvas* canvaschar chbool invert
- return-type:
void - parameters:
Canvas* canvas