def on_top_button_changed(self, state):
    if (state == 'pressed'):
        print('pressed')
        self.current_selected_index += 1
        if (self.current_selected_index >= len(self.current_dir_files)):
            self.current_selected_index = 0
        if (self.current_selected_index >= 7):
            self.current_offset = (self.current_selected_index - 6)
        else:
            self.current_offset = 0
        print('current_selected=', self.current_selected_index, 'current_offset=', self.current_offset)
        self.is_dirty = True
def on_top_button_changed(self, state):
    if (state == 'pressed'):
        print('pressed')
        self.current_selected_index += 1
        if (self.current_selected_index >= len(self.current_dir_files)):
            self.current_selected_index = 0
        if (self.current_selected_index >= 7):
            self.current_offset = (self.current_selected_index - 6)
        else:
            self.current_offset = 0
        print('current_selected=', self.current_selected_index, 'current_offset=', self.current_offset)
        self.is_dirty = True