Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand example / test #3

Closed
karnkaul opened this issue Jun 12, 2022 · 4 comments
Closed

Expand example / test #3

karnkaul opened this issue Jun 12, 2022 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@karnkaul
Copy link
Member

Showcase all features:

  1. All styles
  2. RGB
  3. format_to

File issues for any bugs discovered.

@karnkaul karnkaul added the good first issue Good for newcomers label Jun 12, 2022
@scopophobic
Copy link

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 :)

@karnkaul
Copy link
Member Author

karnkaul commented Jun 12, 2022

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.

@scopophobic
Copy link

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 :)

@karnkaul
Copy link
Member Author

karnkaul commented Jun 12, 2022

@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.

@flyingsl0ths flyingsl0ths self-assigned this Jun 15, 2022
flyingsl0ths pushed a commit that referenced this issue Jun 15, 2022
@karnkaul karnkaul mentioned this issue Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants