ytjh's ui logic, just only one, maybe some ui can use it.