A bit of cleanup and testing of the panel, then some optimization to avoid re-rendering and multiple wchar converts.

This commit is contained in:
Zed A. Shaw 2024-11-12 08:06:09 -05:00
parent 6e848004c4
commit 7d3605f58b
5 changed files with 41 additions and 16 deletions

View file

@ -55,8 +55,8 @@ struct SFMLRender {
sf::Color color(Value val);
sf::Sprite &get_text_sprite(wchar_t tile);
bool resize_map(int new_size, Point &view_port);
void render_text(std::wstring &text, float x, float y);
void draw_text_ui(Panel &panel);
void render_text(const std::wstring &text, float x, float y);
void draw_text_ui(Panel &panel, bool with_border=false);
void draw_screen(Panel &panel, float map_off_x=0.0f, float map_off_y=0.0f);
bool poll_event(sf::Event &event) {