From 5d140845ee72d5ec51fc5e9cf56b1728825bd614 Mon Sep 17 00:00:00 2001 From: Stephan Roslen Date: Fri, 16 Oct 2020 18:37:52 +0200 Subject: [PATCH] Fix indices for screen code example and create call (#53) PixelAt(10,10) was outside of the Screen and there is no c'tor for Dimensions but a static Create method. --- doc/mainpage.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/mainpage.md b/doc/mainpage.md index 36e174c..672fda1 100644 --- a/doc/mainpage.md +++ b/doc/mainpage.md @@ -90,12 +90,13 @@ The screen can be printed as a string using ftxui::Screen::ToString(). ~~~cpp #include + #include int main(void) { using namespace ftxui; - auto screen = Screen(Dimension::Fixed(32), Dimension::Fixed(10)); + auto screen = Screen::Create(Dimension::Fixed(32), Dimension::Fixed(10)); - auto& pixel = screen.PixelAt(10,10); + auto& pixel = screen.PixelAt(9,9); pixel.character = U'A'; pixel.bold = true; pixel.foreground_color = Color::Blue;