CODE
if Input.repeat?(Input.dir4) or Input.trigger?(:L) or Input.trigger?(:R)
window.refresh
end
I've used
Input.repeat?, which is what the system uses for scrolling though selectable windows, but you can also use
Input.trigger? which only activated when you start pressing the buttons.
But otherwise the code that the windows use to check if selected item has moved is
CODE
#--------------------------------------------------------------------------
# * Cursor Movement Processing
#--------------------------------------------------------------------------
def process_cursor_move
return unless cursor_movable?
last_index = @index
cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
cursor_right(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
cursor_left (Input.trigger?(:LEFT)) if Input.repeat?(:LEFT)
cursor_pagedown if !handle?(:pagedown) && Input.trigger?(:R)
cursor_pageup if !handle?(:pageup) && Input.trigger?(:L)
Sound.play_cursor if @index != last_index
end