aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorroy <[email protected]>2026-06-29 21:32:00 +0300
committerroy <[email protected]>2026-06-29 21:32:00 +0300
commit0fdb0405b6567aed4cd00637f79410ceeafd2e3b (patch)
tree816301b144f5fa95d52b44d343524ebf6710c026 /README.md
parent9bde54a7c3922c2e325748b8e5591a00bf439980 (diff)
Added background color options. Added README.md.
Diffstat (limited to 'README.md')
-rw-r--r--README.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1b5a10e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,29 @@
+# Introduction
+
+This is a small C++ library with small methods to change the behaviour and colors of the terminal.
+
+# Usage
+
+Import normally with:
+
+
+```#include "terminal-game-utils.hpp"```
+```
+```
+
+And use tgu:: to refer to the methods/enum in the library.
+
+## API:
+
+Enum GameKey - Arrow keys, space, escape, A-Z.
+GetKeyPress() - Only works if raw mode is enabled. Retrieves the next key pressed, trying to parse the bytes to one of the options available in GameKey.
+Enable/DisableRawMode() - Enable/disable raw mode (take input by bytes, without waiting for a newline/enter).
+Enter/LeaveGameBuffer() - Enable a temporary buffer for drawing the game.
+TextGreen/Red/Blue - Change the text/foreground to one of 3 colors.
+TextRGB(int r, int g, int b) - Change the text/foreground to any RGB color.
+BGGreen/Red/Blue - Change the background to one of 3 colors.
+BGRGB(int r, int g, int b) - Change the background to any RGB color.
+TerminalColorReset - Resets foreground AND background to defaults.
+MoveCursor(int row, int col) - Moves cursor to a specific row and column.
+
+Feel free to use this anywhere at all.