def create_new_menu_items_group(self): """ Create a new group for menu items to be contained in Override if you need special placement for the menu items. :return: None """ # contains the selectable elements of the menu self.menu_items = VisualSpriteList(parent=self.calc_menu_items_rect) self.menu_items.columns = self.columns # generally just for the cursor arrow self.menu_sprites = RelativeGroup(parent=self.menu_items)
def startup(self, *items, **kwargs): self.rect = self.rect.copy() # do not remove! self.__dict__.update(kwargs) # used to position the menu/state self._anchors = dict() # holds sprites representing menu items self.menu_items = VisualSpriteList(parent=self.calc_menu_items_rect) self.menu_items.columns = self.columns if self.shrink_to_items: self.menu_items.expand = False # generally just for the cursor arrow self.menu_sprites = RelativeGroup(parent=self.menu_items) self.selected_index = 0 # Used to track which menu item is selected self.state = "closed" # closed, opening, normal, closing self.set_font() # load default font self.load_graphics() # load default graphics self.reload_sounds() # load default sounds