game: fix signed/unsigned comparison warning
ui: little optimization