Slightly modified button-selection algorithm, now chooses next button more accurately when pressing up, down, right or left