17 std::vector<std::string> entries;
20 for (
int i = 0; i < 100; ++i) {
21 entries.push_back(std::to_string(i));
28 screen.Loop(renderer);
static ScreenInteractive FitComponent()
static MenuOption Horizontal()
水平選單的標準選項。 這對於實現一個標籤頁列很有用。
Component Menu(MenuOption options)
文字列表。選定的元素會被聚焦。
Component Renderer(Component child, std::function< Element()>)
回傳一個新的元件,類似於 |child|,但使用 |render| 作為 Component::Render() 事件。
Element frame(Element)
允許元素顯示在「虛擬」區域內。其大小可以大於其容器。在這種情況下,只會顯示較小的一部分。視圖可滾動以使聚焦元素可見。