cpp-gamedev/forest

Expand example / test

karnkaul opened this issue · 4 comments

Showcase all features:

  1. All styles
  2. RGB
  3. format_to

File issues for any bugs discovered.

I'm a newbie to open source, I really want to start contributing... it would be great if you could tell me what exactly are you looking for. please guide me if you can :)

Hey @scopophobic, glad you'd like to contribute! As of now the library supports the following styles:

b (bold)
i (italic)
u (underline)
dim
blink
invert
strike
reset
clear

And foreground colour via rgb=RGB (where R, G, B => [0, 5]), though this syntax will probably change after exposing background colours too.

Update: background RGB has been integrated via background=RGB / bg=RGB, foreground syntax currently remains the same.

The library also exposes several functions apart from print, like format: which returns a string, and format_to: which writes to an existing char buffer, and returns the next iterator to write to, making it possible to build multi-pass strings at runtime.

The goal of this issue is to demonstrate all these features in the example.

Thanks, @karnkaul this helps but I'm finding problem with CMake. I have never used CMake, I'm only familiar with C++ so it would be great if you could point to me some resources.
Thanks :)

@scopophobic I'd recommend going through Mastering CMake. For this Issue all you need is to do is use CMake to generate a project that you can then build/run/debug/etc: eg on Windows use the Visual Studio generator, on MacOS the Xcode generator, etc. Open CMake GUI, set the "source files" path to the repo root, the "build files" path to a subdir like build, click Configure, pick the generator, click Generate, and then open the project and code as usual.

Edit: make sure you select forest-example as the Startup Project / active scheme / debug target / etc.