Rendering with color is working now but still has problems with enabling/resetting the default colors.
This commit is contained in:
parent
a36b187879
commit
e864e14eab
8 changed files with 57 additions and 45 deletions
|
@ -59,7 +59,7 @@ bool SFMLRender::resize_map(int new_size) {
|
|||
if(MIN_FONT_SIZE < new_size && new_size < MAX_FONT_SIZE) {
|
||||
$sprites.clear(); // need to reset the sprites for the new size
|
||||
$map_font_size = new_size;
|
||||
$base_glyph = $font.getGlyph(L'█', $map_font_size, false);
|
||||
$base_glyph = $font.getGlyph(BG_TILE, $map_font_size, false);
|
||||
$line_spacing = $font.getLineSpacing($map_font_size);
|
||||
return true;
|
||||
} else {
|
||||
|
@ -85,7 +85,7 @@ void SFMLRender::draw_screen(bool clear, float map_off_x, float map_off_y) {
|
|||
float y = 0.0f;
|
||||
float x = GAME_MAP_POS;
|
||||
// make a copy so we don't modify the cached one
|
||||
auto bg_sprite = get_text_sprite(L'█');
|
||||
auto bg_sprite = get_text_sprite(BG_TILE);
|
||||
auto bg_bounds = bg_sprite.getLocalBounds();
|
||||
sf::Color def_fg(color(Value::MID));
|
||||
sf::Color def_bg(color(Value::BLACK));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue