#include <memory>
#include <string>
#include <vector>
std::string
title =
"(" + std::to_string(x) +
", " + std::to_string(y) +
")";
bgcolor(Color::HSV(x * 255 / 15, 255, y * 255 / 15));
};
std::vector<Elements> rows;
for (int i = 0; i < 15; i++) {
std::vector<Element> cols;
for (int j = 0; j < 15; j++) {
}
rows.push_back(cols);
}
return gridbox(rows);
};
float focus_x = 0.5f;
float focus_y = 0.5f;
auto slider_x = Slider("x", &focus_x, 0.f, 1.f, 0.01f);
auto slider_y = Slider("y", &focus_y, 0.f, 1.f, 0.01f);
auto renderer = Renderer(
Container::Vertical({
slider_x,
slider_y,
}),
[&] {
auto title =
"focusPositionRelative(" +
std::to_string(focus_x) + ", " +
std::to_string(focus_y) + ")";
separator(),
slider_x->Render(),
slider_y->Render(),
separator(),
make_grid() | focusPositionRelative(focus_x, focus_y) |
frame | flex,
}) |
border;
});
auto screen = ScreenInteractive::Fullscreen();
return 0;
}
Element make_box(int x, int y)
Element vbox(Elements children)
Un contenedor que muestra elementos verticalmente uno por uno.
return dimx size(HEIGHT, EQUAL, dimy)
El espacio de nombres ftxui:: de FTXUI.
std::shared_ptr< Node > Element