def __init__(self): MenuItem.__init__(self) # if app.name == "fs-uae-arcade": self.title = gettext("FS-UAE Arcade") # else: # self.title = gettext("Game Center") self.path_title = self.title
def activate(self, menu): print("YearMenuItem.activate") menu = create_item_menu(gettext("Select Year")) # for year in GameList().get().get_years(): # FIXME: GET YEARS FROM # FILTERED GAME LIST # item = YearItem(year) # menu.append(item) return menu
def __init__(self): super().__init__() # if app.name == "fs-uae-arcade": self.title = gettext("FS-UAE Arcade") # else: # self.title = gettext("Game Center") self.path_title = self.title self.enabled = False
def activate(self, menu): print("LetterMenuItem.activate") new_menu = create_item_menu(gettext("Select First Letter")) menu_path = self.create_menu_path(menu) new_menu.update_path(menu_path) for letter in "#ABCDEFGHIJKLMNOPQRSTUVWXYZ": item = LetterItem(letter) new_menu.append(item) return new_menu
def activate(self, menu): print("KeywordMenuItem.activate") new_menu = create_item_menu(gettext("Select Keyword")) menu_path = self.create_menu_path(menu) new_menu.update_path(menu_path) category_filters = list(self.generate_category_filters(menu_path)) def check(cat): for flt in category_filters: if not flt(cat): return False return True # for keyword in GameList().get().get_keywords(): # item = KeywordItem(keyword) # if check(item): # new_menu.append(item) return new_menu
def activate(self, menu): print("ListMenuItem.activate") new_menu = create_item_menu(gettext("Select List")) menu_path = self.create_menu_path(menu) new_menu.update_path(menu_path) # Database.cursor.execute("SELECT DISTINCT platform FROM Game " # "ORDER BY platform") # items = [] # for row in Database.cursor: # item = PlatformItem(row[0]) # items.append((item.sort_title, item)) # for sort_title, item in sorted(items): # new_menu.append(item) for title, path in get_game_lists(): item = ListItem(title, path) new_menu.append(item) return new_menu
def activate(self, menu): print("ListMenuItem.activate") new_menu = create_item_menu(gettext("Select List")) menu_path = self.create_menu_path(menu) new_menu.update_path(menu_path) # Database.cursor.execute("SELECT DISTINCT platform FROM Game " # "ORDER BY platform") # items = [] # for row in Database.cursor: # item = PlatformItem(row[0]) # items.append((item.sort_title, item)) # for sort_title, item in sorted(items): # new_menu.append(item) for title, path in ListItem.get_game_lists(): item = ListItem(title, path) new_menu.append(item) return new_menu
def activate(self, menu): print("PlatformMenuItem.activate") new_menu = create_item_menu(gettext("Select Platform")) menu_path = self.create_menu_path(menu) new_menu.update_path(menu_path) with Database.instance() as database: cursor = database.cursor() cursor.execute( "SELECT DISTINCT platform FROM game WHERE have >= 3 " "ORDER BY platform") items = [] for row in cursor: if not row[0]: continue item = PlatformItem(row[0]) items.append((item.sort_title, item)) for sort_title, item in sorted(items): new_menu.append(item) return new_menu
def __init__(self): MenuItem.__init__(self) self.title = gettext("Shuffle") self.path_title = "Shuffle"
def __init__(self): AutoExpandItem.__init__(self) self.title = gettext("All") self.path_title = "All Games"
def __init__(self): super().__init__() self.title = gettext("FS-UAE Arcade") self.path_title = self.title self.enabled = False
def __init__(self): MenuItem.__init__(self) self.title = gettext("Keyword") self.path_title_active = "Choose Keyword"
def __init__(self): MenuItem.__init__(self) self.title = gettext("Letter") self.path_title_active = "Choose Letter"
def __init__(self): MenuItem.__init__(self) self.title = gettext("Add") self.path_title = self.title
def __init__(self): MenuItem.__init__(self) self.title = gettext("Platform") self.path_title_active = "Choose Platform"
def __init__(self): MenuItem.__init__(self) self.title = gettext("Year") self.path_title_active = "Choose Year"
def __init__(self): MenuItem.__init__(self) self.title = gettext("No Last Played")
def __init__(self): super().__init__() self.title = gettext("Add") self.path_title = self.title