Fix the crash of cocostudio ui lua test cases and add some deprecated functions of Widget