Longtime legislator Hui quits politics