Update tutorial.md

This commit is contained in:
Arthur Sonzogni
2019-01-19 00:20:29 +01:00
parent da5b4b5014
commit 5840966049
10 changed files with 104 additions and 51 deletions

View File

@@ -20,6 +20,9 @@ class CheckBox : public Component {
std::wstring checked = L"";
std::wstring unchecked = L"";
Decorator focused_style = inverted;
Decorator unfocused_style = nothing;
// State update callback.
std::function<void()> on_change = [](){};

View File

@@ -12,6 +12,7 @@ class ScreenInteractive : public Screen {
public:
static ScreenInteractive FixedSize(size_t dimx, size_t dimy);
static ScreenInteractive Fullscreen();
static ScreenInteractive FitComponent();
static ScreenInteractive TerminalOutput();
~ScreenInteractive();
@@ -23,9 +24,10 @@ class ScreenInteractive : public Screen {
bool quit_ = false;
enum class Dimension {
FitComponent,
Fixed,
TerminalOutput,
Fullscreen,
TerminalOutput,
};
Dimension dimension_ = Dimension::Fixed;
ScreenInteractive(size_t dimx, size_t dimy, Dimension dimension);

View File

@@ -50,6 +50,8 @@ class Screen {
// Fill with space.
void Clear();
void ApplyShader();
protected:
size_t dimx_;
size_t dimy_;