mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Fix format. Try compile on Windows.
This commit is contained in:
@@ -10,7 +10,7 @@ Node::Node(std::vector<std::unique_ptr<Node>> children)
|
||||
Node::~Node() {}
|
||||
|
||||
void Node::ComputeRequirement() {
|
||||
for(auto& child : children)
|
||||
for (auto& child : children)
|
||||
child->ComputeRequirement();
|
||||
}
|
||||
|
||||
@@ -19,20 +19,20 @@ void Node::SetBox(Box box) {
|
||||
}
|
||||
|
||||
void Node::Render(Screen& screen) {
|
||||
for(auto& child : children)
|
||||
for (auto& child : children)
|
||||
child->Render(screen);
|
||||
}
|
||||
|
||||
void Render(Screen& screen, Node* node) {
|
||||
// Step 1: Find what dimension this elements wants to be.
|
||||
node->ComputeRequirement();
|
||||
|
||||
|
||||
Box box;
|
||||
box.x_min = 0;
|
||||
box.y_min = 0;
|
||||
box.x_max = screen.dimx() - 1;
|
||||
box.y_max = screen.dimy() - 1;
|
||||
|
||||
|
||||
// Step 2: Assign a dimension to the element.
|
||||
node->SetBox(box);
|
||||
screen.stencil = box;
|
||||
|
Reference in New Issue
Block a user