if (!_enabled) exit; if (!_input_enabled) exit; _confirm_buffer--; _cancel_buffer--; if (button1_p()) { if (_confirm_buffer <= 0) { reset_buffer(); confirm(); } } else if (button2_p()) { if (_cancel_buffer <= 0) { reset_buffer(); cancel(); } } if (array_length(_options) == 0) exit; _scroll_buffer--; if (_scroll_buffer > 0) exit; if (right_p()) { snd_play(snd_menumove); _options_index = scr_wrap(_options_index + 1, 0, array_length(_options) - 1); reset_buffer(); } else if (left_p()) { snd_play(snd_menumove); _options_index = scr_wrap(_options_index - 1, 0, array_length(_options) - 1); reset_buffer(); } if (_flag < 0) exit; if (_options_index != scr_flag_get(_flag)) global.flag[_flag] = _options_index;