Every node should have an id. That id can be used to search for a specific node in the scene graph.
It could also be used in the future for features like loading guis from xml files.
Expected Code
Node node = new ...;
node.setId("custom-id");
// Add the node to the scene graph.
// Then it can be found, e.g. in another node's click event:
otherNode.setOnClick(context -> {
context.getScene().findNode("custom-id");
// Or maybe even:
context.findNode("custom-id");
});
Description
Every node should have an id. That id can be used to search for a specific node in the scene graph.
It could also be used in the future for features like loading guis from xml files.
Expected Code