Skip to content

Azakme199/printer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C++ Linux Windows 10

printer

A simple library for printing rich coloured texts on console terminal.
Designed with Cross-platform in mind

Targets tested :

  • Windows 10 21H1
  • Ubuntu 20.04.1 LTS

Usage

Inculde in your C++ program by

#include "printer.hpp"

Then call the functions as you see fit

Example :

//test.cpp
#include <stdio.h>
#include "printer.hpp"
int main()
{
	
	printerClearScreen();	
	
	puts("\n\n");
	printerSlowPrint("Its too cold here...z.z..z.z.zz\n");
	printerPrintText("I need to go to my room fast\n", _text_foreground_white, _text_background_red);
	printerPrintText("Maybe a coffee will do\n", _text_foreground_red, _text_background_white);
	printerPrintText("COFFEEE...\n", _text_foreground_red, _text_background_default,_text_style_underline);
	
	puts("\n\n\n\n");
	
 return 0;
}

Output :

image

Building

For Windows,
I used Visual Studio

For Ubuntu,
You will need to link the .cpp file during build

g++ printer.cpp test.cpp -o test

Credits

TutorialsPoint: https://www.tutorialspoint.com/how-to-output-colored-text-to-a-linux-terminal
Badges : https://github.com/Ileriayo/markdown-badges

Feel free to use/edit these files as you like it.

About

Just a simple cross-platform library for color and slow printing on consoles

Resources

Stars

Watchers

Forks

Languages