@Override
    protected void init() {
        super.init();

        screenFrame = new Rect(Point.ZERO, new Size(width, height));

        Point framePos = new Point((screenFrame.width() - frame.width()) / 2, (screenFrame.height() - frame.height()) / 2);
        frame = new Rect(framePos, frame.size);
    }
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