Refactored the ansi_parser into a class that can be reused between render calls.
This commit is contained in:
parent
e864e14eab
commit
fd8180bc61
6 changed files with 68 additions and 27 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <SFML/Graphics.hpp>
|
||||
#include "point.hpp"
|
||||
#include <codecvt>
|
||||
#include "ansi_parser.hpp"
|
||||
|
||||
using ftxui::Canvas, ftxui::Screen;
|
||||
|
||||
|
@ -41,6 +42,9 @@ struct SFMLRender {
|
|||
Screen& $screen;
|
||||
sf::Text $ui_text;
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> $converter;
|
||||
sf::Color $default_fg;
|
||||
sf::Color $default_bg;
|
||||
ANSIParser $ansi;
|
||||
|
||||
SFMLRender(Canvas &canvas, Screen &map_screen, Screen &screen);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue