Renderer now knows how to render panels as grid/text based on how the panel is configured.
This commit is contained in:
parent
f79e7638c0
commit
7cb03594a3
5 changed files with 30 additions and 31 deletions
|
@ -21,6 +21,7 @@ struct Panel {
|
|||
int height;
|
||||
bool has_border = false;
|
||||
bool must_clear = true;
|
||||
bool grid = false;
|
||||
sf::Color default_bg = sf::Color(0,0,0);
|
||||
sf::Color border_color = sf::Color::Red;
|
||||
int border_px = UI_PANEL_BORDER_PX;
|
||||
|
@ -31,14 +32,15 @@ struct Panel {
|
|||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> $converter;
|
||||
std::wstring $screenout;
|
||||
|
||||
Panel(int width, int height, int x, int y, bool must_clear=true) :
|
||||
Panel(int width, int height, int x, int y, bool is_grid=false) :
|
||||
x(x),
|
||||
y(y),
|
||||
width(width),
|
||||
height(height),
|
||||
must_clear(must_clear),
|
||||
grid(is_grid),
|
||||
$screen(Screen(width, height))
|
||||
{
|
||||
must_clear = !is_grid;
|
||||
};
|
||||
|
||||
void resize(int width, int height);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue