You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
496 B
25 lines
496 B
2 weeks ago
|
#include "panel.hpp"
|
||
|
|
||
|
void Panel::resize(int width, int height) {
|
||
|
$screen = Screen(width, height);
|
||
|
}
|
||
|
|
||
|
void Panel::set_renderer(std::function< Element()> render) {
|
||
|
$component = Renderer(render);
|
||
|
}
|
||
|
|
||
|
Screen &Panel::render() {
|
||
|
if($must_clear) $screen.Clear();
|
||
|
Render($screen, $component->Render());
|
||
|
return $screen;
|
||
|
}
|
||
|
|
||
|
std::wstring Panel::to_string() {
|
||
|
std::string screenout = $screen.ToString();
|
||
|
return $converter.from_bytes(screenout);
|
||
|
}
|
||
|
|
||
|
Screen &Panel::screen() {
|
||
|
return $screen;
|
||
|
}
|