Now have a nice panel to hold all the UI panels we'll use later.

This commit is contained in:
Zed A. Shaw 2024-11-11 12:23:40 -05:00
parent baaf56d4de
commit 9bc9c9007f
12 changed files with 123 additions and 83 deletions

View file

@ -9,6 +9,7 @@
#include "point.hpp"
#include <codecvt>
#include "ansi_parser.hpp"
#include "panel.hpp"
using ftxui::Canvas, ftxui::Screen;
@ -54,9 +55,9 @@ 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::string &text, float x, float y);
void draw_text_ui(Screen &screen, float x, float y);
void draw_screen(Screen &screen, float map_off_x=0.0f, float map_off_y=0.0f);
void render_text(std::wstring &text, float x, float y);
void draw_text_ui(Panel &panel);
void draw_screen(Panel &panel, float map_off_x=0.0f, float map_off_y=0.0f);
bool poll_event(sf::Event &event) {
return $window.pollEvent(event);