dom96 / nimbox

Fork of https://notabug.org/vktec/nimbox
30 stars 4 forks source link

256 Color Support #2

Closed jonathanabennett closed 6 years ago

jonathanabennett commented 6 years ago

The code in nimbox/termbox.nim suggests that Nimbox supports 256 color. In addition, there is an OutputMode enum called out256 which suggests 256 color support.

But neither of the print functions in nimbox.nim support 256 colors. 1 requires no color, the other requires colors selected from the Color enum.

We should write a version of the print function which accepts 256 or which uses the color module for colors.

jonathanabennett commented 6 years ago

As with the other issue I opened, I have written a patch in a separate branch which should fix this. But I don't actually this this patch is complete. My current code doesn't ensure that 256 colors is enabled and doesn't ensure that the supplied int is under 255. I've only been coding in Nim for a week, so I'm not 100% sure of the best way to do those things. But if you can help me figure out how to submit a pull request, maybe my code will at least give you a starting place for a real solution.