@Override
    public void render(GuiGraphics graphics, int mouseX, int mouseY, float partialFrame) {
        super.render(graphics, mouseX, mouseY, partialFrame);

        RenderSystem.enableDepthTest(); // Nodes render out of order, so depth test is needed

        // Render semi-transparent grey background
        int x = getScreenFrame().x();
        int y = getScreenFrame().y();
        graphics.fillGradient(x, y, x + getScreenFrame().width(), y + getScreenFrame().height(), -1072689136, -804253680);

        // Call frame update function on all nodes
        Point mousePoint = new Point(mouseX, mouseY);
        operateOnSubtree(mousePoint, (n, p, c) -> {
            n.frameUpdate(p, partialFrame);
            return false;
        }, false);

        // Draw the UI
        drawBackForSubtree(graphics, mousePoint, partialFrame);
        drawFrontForSubtree(graphics, mousePoint, partialFrame);
    }
Base Screen class that implements the UI Node system. This is for UIs that do not have containers.
core/src/main/java/mrtjp/projectred/redui/RedUIScreen.java