Node.applyAll

Apply all of the given node parameters on this node.

This can be used to activate node parameters after the node has been constructed, or inside of a node constructor.

Note: Due to language limitations, this function has to be called with the dot operator, like this.applyAll().

class Node
void
applyAll
(
this This
Parameters...
)
(
Parameters params
)

Parameters

params Parameters

Node parameters to activate.

Examples

Applying parameters from inside of a node constructor.

class MyNode : Node {

    this() {
        this.applyAll(
            .layout!"fill",
        );
    }

    override void resizeImpl(Vector2) { }
    override void drawImpl(Rectangle, Rectangle) { }

}

auto myNode = new MyNode;
assert(myNode.layout == .layout!"fill");

Meta