@@ -41,32 +41,33 @@ int main()
4141 rich_style.set_style (" gf" , { gf::Orange, gf::Azure });
4242 rich_style.set_style (" warn" , { gf::Black, gf::Yellow });
4343
44- gf::ConsoleBuffer console_buffer ({ 80 , 50 });
44+ gf::Console console ({ 80 , 50 });
4545
46- console_buffer .put_character ({ 40 , 25 }, ' @' , style);
47- console_buffer .put_character ({ 42 , 25 }, gf::ConsoleChar::WhiteSmilingFace, style);
46+ console .put_character ({ 40 , 25 }, ' @' , style);
47+ console .put_character ({ 42 , 25 }, gf::ConsoleChar::WhiteSmilingFace, style);
4848
49- console_buffer .print ({ 1 , 1 }, gf::ConsoleAlignment::Left, rich_style, " String with a <style=red>red</> word." );
49+ console .print ({ 1 , 1 }, gf::ConsoleAlignment::Left, rich_style, " String with a <style=red>red</> word." );
5050
51- console_buffer .print (console_buffer. cells .size () - 2 , gf::ConsoleAlignment::Right, rich_style, " Made with <style=gf>gf</>!" );
51+ console .print (console .size () - 2 , gf::ConsoleAlignment::Right, rich_style, " Made with <style=gf>gf</>!" );
5252
5353 const std::string_view text = " This is a simple but long text with <style=warn>multiple</> lines." ;
5454
55- console_buffer .print_area (rect ({ 2 , 5 }, { 16 , 5 }), gf::ConsoleAlignment::Left, rich_style, text);
56- console_buffer .print_area (rect ({ 2 , 15 }, { 16 , 5 }), gf::ConsoleAlignment::Center, rich_style, text);
57- console_buffer .print_area (rect ({ 2 , 25 }, { 16 , 5 }), gf::ConsoleAlignment::Right, rich_style, text);
55+ console .print_area (rect ({ 2 , 5 }, { 16 , 5 }), gf::ConsoleAlignment::Left, rich_style, text);
56+ console .print_area (rect ({ 2 , 15 }, { 16 , 5 }), gf::ConsoleAlignment::Center, rich_style, text);
57+ console .print_area (rect ({ 2 , 25 }, { 16 , 5 }), gf::ConsoleAlignment::Right, rich_style, text);
5858
59- console_buffer .clear (rect ({ 30 , 5 }, { 16 , 5 }), style);
60- console_buffer .draw_frame (rect ({ 30 , 5 }, { 16 , 5 }), style);
61- console_buffer .draw_frame (rect ({ 30 , 15 }, { 16 , 5 }), style, " Frame title" );
59+ console .clear (rect ({ 30 , 5 }, { 16 , 5 }), style);
60+ console .draw_frame (rect ({ 30 , 5 }, { 16 , 5 }), style);
61+ console .draw_frame (rect ({ 30 , 15 }, { 16 , 5 }), style, " Frame title" );
6262
63- gf::ConsoleEntity console_entity (&console_font, console_buffer, scene_manager.render_manager ());
63+ gf::ConsoleEntity console_entity (&console_font);
64+ console_entity.graphics ().update (console, scene_manager.render_manager ());
6465 console_entity.set_location ({ 1000 .0f , 1000 .0f });
6566 console_entity.set_origin ({ 0 .5f , 0 .5f });
6667
6768 gf::Scene scene;
6869 scene.set_world_center ({ 1000 .0f , 1000 .0f });
69- scene.set_world_size (console_buffer. cells .size () * console_font.character_size ());
70+ scene.set_world_size (console .size () * console_font.character_size ());
7071
7172 scene.add_world_entity (&console_entity);
7273
0 commit comments