本文整理汇总了Python中menu.Menu.singlelist方法的典型用法代码示例。如果您正苦于以下问题:Python Menu.singlelist方法的具体用法?Python Menu.singlelist怎么用?Python Menu.singlelist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类menu.Menu
的用法示例。
在下文中一共展示了Menu.singlelist方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: selectgender
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import singlelist [as 别名]
def selectgender(self, screen):
"""Allows the player to select a gender for their character."""
bg = pygame.image.load(self.display.BG_FULL).convert()
screen.blit(bg, (0, 0))
menu = Menu()
gender = ["Female", "Male"]
self.chardata["Gender"] = menu.singlelist(gender, 2, 2,screen)
示例2: selectmoralcode
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import singlelist [as 别名]
def selectmoralcode(self, screen):
"""Checks ability scores and allows player to select from
available archetype based on primary ability.
--Page 14--
"""
bg = pygame.image.load(self.display.BG_FULL).convert()
screen.blit(bg, (0, 0))
menu = Menu()
self.chardata["Moral Code"] = menu.singlelist(self.gamedata.MORAL_CODES,
2, 2, screen)
示例3: selectspecies
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import singlelist [as 别名]
def selectspecies(self, screen):
"""Allows the player to select a species for their character.
This deviates somewhat from the rule set, as this would be
selected as a 'specialty'. As it is here, this will 'cost' the
player their specialty, thus only humans will get to select a
specialty to begin with.
"""
bg = pygame.image.load(self.display.BG_FULL).convert()
screen.blit(bg, (0, 0))
menu = Menu()
self.chardata["Species"] = menu.singlelist(self.gamedata.SPECIES_NAMES,
2, 2, screen)
示例4: selectarchetype
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import singlelist [as 别名]
def selectarchetype(self, screen):
"""Checks ability scores and allows player to select from
available archetype based on primary ability.
--Page 14--
"""
bg = pygame.image.load(self.display.BG_FULL).convert()
screen.blit(bg, (0, 0))
choices = []
# Checks character ability scores against archetype prime
# ability and appends to the available list if prime is 9 or
# greater for that archetype
for archetype in self.gamedata.ARCH:
prime = self.gamedata.ARCH_ATTRIBUTES[archetype][0]
if self.chardata[prime][0] > 8:
choices.append(archetype)
menu = Menu()
self.chardata["Archetype"] = menu.singlelist(choices, 2, 2, screen)
if self.chardata["Archetype"] == "Thief":
self.chardata["Thief Skill Points"] = 12