#include <functional>
#include <memory>
#include <string>
#include <vector>
int main(int argc, const char* argv[]) {
std::vector<std::string> left_menu_entries = {
"0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%",
};
std::vector<std::string> right_menu_entries = {
"0%", "1%", "2%", "3%", "4%", "5%", "6%", "7%", "8%", "9%", "10%",
};
menu_option.on_enter = screen.ExitLoopClosure();
int left_menu_selected = 0;
int right_menu_selected = 0;
Menu(&left_menu_entries, &left_menu_selected, &menu_option);
Menu(&right_menu_entries, &right_menu_selected, &menu_option);
left_menu_,
right_menu_,
});
auto renderer =
Renderer(container, [&] {
int sum = left_menu_selected * 10 + right_menu_selected;
left_menu_->Render(),
}),
right_menu_->Render(),
}),
}),
}),
}),
}),
}) |
});
screen.Loop(renderer);
}