mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 18:48:11 +08:00 
			
		
		
		
	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.
This commit is contained in:
		| @@ -90,12 +90,13 @@ The screen can be printed as a string using ftxui::Screen::ToString(). | ||||
|  | ||||
| ~~~cpp | ||||
|   #include <ftxui/screen/screen.hpp> | ||||
|   #include <iostream> | ||||
|  | ||||
|   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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stephan Roslen
					Stephan Roslen