Rendering with color is working now but still has problems with enabling/resetting the default colors.

This commit is contained in:
Zed A. Shaw 2024-11-02 06:02:13 -04:00
parent a36b187879
commit e864e14eab
8 changed files with 57 additions and 45 deletions

View file

@ -38,8 +38,12 @@ using namespace fmt;
}
action color24b { }
action is_fg { target = color; }
action is_bg { target = bgcolor; }
action is_fg {
target = color;
}
action is_bg {
target = bgcolor;
}
action out {
write(bgcolor, color, fc);
@ -87,7 +91,7 @@ bool parse_ansi(std::wstring_view codes, sf::Color default_fg, sf::Color default
const wchar_t *eof = pe;
sf::Color bgcolor(default_bg);
sf::Color color(default_fg);
sf::Color &target = bgcolor;
sf::Color &target = color;
%% write init;
%% write exec;