properly resize according to game container and auto hide UI