def __init__(self, util, next_page, previous_page, set_title, reset_title, go_to_page, play_track, bgr=None, bounding_box=None): """ Initializer :param util: utility object :param next_page: next page callback :param previous_page: previous page callback :param set_title: set title callback :param reset_title: reset title callback :param go_to_page: go to page callback :param play_track: play track callback :param bgr: menu background :param bounding_box: bounding box """ self.factory = Factory(util) self.util = util self.next_page = next_page self.previous_page = previous_page self.bb = bounding_box m = self.factory.create_track_menu_button MultiPageMenu.__init__(self, util, next_page, previous_page, set_title, reset_title, go_to_page, m, TRACK_ROWS, TRACK_COLUMNS, None, bgr, bounding_box) self.config = util.config self.play_track = play_track self.tracks = None
def __init__(self, util, next_page, previous_page, set_title, reset_title, go_to_page, callback, rows, columns, menu_button_layout, bounding_box=None): """ Initializer :param util: utility object :param next_page: next page callback :param previous_page: previous page callback :param set_title: set title callback :param reset_title: reset title callback :param go_to_page: go to page callback :param callback: :param rows: menu rows :param columns: menu columns :param menu_button_layout: button layout :param bounding_box: bounding box """ self.factory = Factory(util) self.util = util self.callback = callback self.config = self.util.config m = self.create_book_menu_button self.bounding_box = bounding_box self.menu_button_layout = menu_button_layout MultiPageMenu.__init__(self, util, next_page, previous_page, set_title, reset_title, go_to_page, m, rows, columns, menu_button_layout, None, bounding_box, align=ALIGN_CENTER) self.browsing_history = {} self.left_number_listeners = [] self.right_number_listeners = [] self.change_folder_listeners = [] self.play_file_listeners = [] self.playlist_size_listeners = [] self.menu_navigation_listeners = [] self.page_turned = False self.separator = os.sep self.selected_index = 0 self.empty_state = State()