18 using namespace ftxui;
19 auto screen = ScreenInteractive::FitComponent();
22 int custom_loop_count = 0;
28 text(
"這演示了使用自定義 ftxui::Loop。它 "),
29 text(
"以每秒 100 次迭代的速度運行。FTXUI 事件 "),
30 text(
"每次迭代處理一次,並根據需要渲染新幀 "),
33 text(
"ftxui event count: " + std::to_string(event_count)),
34 text(
"ftxui frame count: " + std::to_string(frame_count)),
35 text(
"Custom loop count: " + std::to_string(custom_loop_count)),
47 while (!loop.HasQuitted()) {
50 std::this_thread::sleep_for(std::chrono::milliseconds(10));