Can do better rendering of individual components and 'panels' but it's not too clean right now.
This commit is contained in:
parent
7b5c84b5f7
commit
baaf56d4de
2 changed files with 3 additions and 4 deletions
1
gui.cpp
1
gui.cpp
|
@ -209,7 +209,6 @@ void GUI::render_scene() {
|
||||||
Render($status_screen, $status_ui->Render());
|
Render($status_screen, $status_ui->Render());
|
||||||
$renderer.draw_text_ui($status_screen, 0, 0);
|
$renderer.draw_text_ui($status_screen, 0, 0);
|
||||||
|
|
||||||
$map_screen.Clear();
|
|
||||||
Render($map_screen, $map_view->Render());
|
Render($map_screen, $map_view->Render());
|
||||||
$renderer.draw_screen($map_screen);
|
$renderer.draw_screen($map_screen);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ SFMLRender::SFMLRender() :
|
||||||
$ui_text.setPosition(0,0);
|
$ui_text.setPosition(0,0);
|
||||||
$ui_text.setCharacterSize(UI_FONT_SIZE);
|
$ui_text.setCharacterSize(UI_FONT_SIZE);
|
||||||
$ui_text.setFillColor(color(Value::LIGHT_MID));
|
$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;
|
$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) {
|
void SFMLRender::draw_text_ui(Screen &screen, float x, float y) {
|
||||||
sf::RectangleShape backing(
|
sf::RectangleShape backing(
|
||||||
sf::Vector2f($ui_bounds.width * screen.dimx() * 1.4,
|
sf::Vector2f($ui_bounds.width * screen.dimx(),
|
||||||
$ui_bounds.height * screen.dimy() * 1.6));
|
$ui_bounds.height * screen.dimy()));
|
||||||
|
|
||||||
backing.setFillColor(sf::Color(0, 0, 0));
|
backing.setFillColor(sf::Color(0, 0, 0));
|
||||||
backing.setPosition(x, y);
|
backing.setPosition(x, y);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue