|
|
|
@ -42,7 +42,7 @@ SFMLRender::SFMLRender() : |
|
|
|
|
$ui_text.setPosition(0,0); |
|
|
|
|
$ui_text.setCharacterSize(UI_FONT_SIZE); |
|
|
|
|
$ui_text.setFillColor(color(Value::LIGHT_MID)); |
|
|
|
|
sf::Glyph glyph = $font.getGlyph(L'H', UI_FONT_SIZE, false); |
|
|
|
|
sf::Glyph glyph = $font.getGlyph(L'█', UI_FONT_SIZE, false); |
|
|
|
|
$ui_bounds = glyph.bounds; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -143,8 +143,8 @@ void SFMLRender::render_text(std::string &text, float x, float y) { |
|
|
|
|
|
|
|
|
|
void SFMLRender::draw_text_ui(Screen &screen, float x, float y) { |
|
|
|
|
sf::RectangleShape backing( |
|
|
|
|
sf::Vector2f($ui_bounds.width * screen.dimx() * 1.4, |
|
|
|
|
$ui_bounds.height * screen.dimy() * 1.6)); |
|
|
|
|
sf::Vector2f($ui_bounds.width * screen.dimx(), |
|
|
|
|
$ui_bounds.height * screen.dimy())); |
|
|
|
|
|
|
|
|
|
backing.setFillColor(sf::Color(0, 0, 0)); |
|
|
|
|
backing.setPosition(x, y); |
|
|
|
|