It would be

var button_pos;
if (video_mode == 7) button_pos = 400;
if (video_mode == 8) button_pos = 500;

The resolution feature was planed, but to fuzzy to implement. I'll maybe implement it later.