ArthurSonzogni / FTXUI

:computer: C++ Functional Terminal User Interface. :heart:
MIT License
6.73k stars 401 forks source link

Downloaded a new version of this lib and nothing works anymore #181

Closed DavidLazarescu closed 3 years ago

DavidLazarescu commented 3 years ago

After updating the version of this lib, i get around 50 errors in my projects on lines like:

ftxui::MenuBase::From(menu)->focused_style = ftxui::bgcolor(ftxui::Color::Blue);

Also the parameter for button borders gives me errors, is there any way to fix this? Thanks in Advance

ArthurSonzogni commented 3 years ago

Version 0.7 introduce a breaking change allowing new features to be added in a forward compatible way. We are sorry about that.

Class like MenuBase, InputBase, ... aren't available anymore.

Instead, options can be provided.

auto option = MenuOptions();
option.xxx = yyy;
auto menu = Menu(&entries, &selected_entry, option)

See example: https://arthursonzogni.github.io/FTXUI/examples_2component_2menu_style_8cpp-example.html#_a1