Esempio n. 1
0
 def addedToWorld(self, world):
     """Added the banner to the world"""
     super(AchievementStatus, self).addedToWorld(world)
     G = self.G
     #
     # Create the widgets
     bg = serge.actor.Actor("banner", "background")
     bg.visual = serge.blocks.visualblocks.Rectangle(G("banner-size"), G("banner-backcolour"))
     bg.setLayerName(self.background_layer)
     self.mountActor(bg, (0, 0))
     #
     self.name = name = serge.blocks.actors.StringText(
         "banner",
         "banner-name",
         "Name",
         colour=G("banner-font-colour"),
         font_size=G("banner-name-size"),
         font_name=G("banner-font-name"),
         justify="left",
     )
     name.setLayerName(self.foreground_layer)
     self.mountActor(name, G("banner-name-position"))
     #
     self.description = description = serge.blocks.actors.StringText(
         "banner",
         "banner-description",
         "Description of the achievement as it\nis written down.",
         colour=G("banner-font-colour"),
         font_size=G("banner-description-size"),
         font_name=G("banner-font-name"),
         justify="left",
     )
     description.setLayerName(self.foreground_layer)
     self.mountActor(description, G("banner-description-position"))
     #
     self.graphic = graphic = serge.actor.Actor("banner", "banner-graphic")
     graphic.setSpriteName("achievement")
     graphic.setLayerName(self.foreground_layer)
     graphic.visual.setCell(1)
     self.mountActor(graphic, G("banner-graphic-position"))
     #
     self.time = time = serge.blocks.actors.StringText(
         "banner",
         "banner-time",
         "Time achieved",
         colour=G("time-colour"),
         font_size=G("time-size"),
         font_name=G("banner-font-name"),
         justify="left",
     )
     time.setLayerName(self.foreground_layer)
     self.mountActor(time, G("time-position"))
     #
     self.updateAchievement()
Esempio n. 2
0
 def addedToWorld(self, world):
     """Added the banner to the world"""
     super(AchievementStatus, self).addedToWorld(world)
     G = self.G
     #
     # Create the widgets
     bg = serge.actor.Actor('banner', 'background')
     bg.visual = serge.blocks.visualblocks.Rectangle(
         G('banner-size'), G('banner-backcolour'))
     bg.setLayerName(self.background_layer)
     self.mountActor(bg, (0, 0))
     #
     self.name = name = serge.blocks.actors.StringText(
         'banner',
         'banner-name',
         'Name',
         colour=G('banner-font-colour'),
         font_size=G('banner-name-size'),
         font_name=G('banner-font-name'),
         justify='left')
     name.setLayerName(self.foreground_layer)
     self.mountActor(name, G('banner-name-position'))
     #
     self.description = description = serge.blocks.actors.StringText(
         'banner',
         'banner-description',
         'Description of the achievement as it\nis written down.',
         colour=G('banner-font-colour'),
         font_size=G('banner-description-size'),
         font_name=G('banner-font-name'),
         justify='left')
     description.setLayerName(self.foreground_layer)
     self.mountActor(description, G('banner-description-position'))
     #
     self.graphic = graphic = serge.actor.Actor('banner', 'banner-graphic')
     graphic.setSpriteName('achievement')
     graphic.setLayerName(self.foreground_layer)
     graphic.visual.setCell(1)
     self.mountActor(graphic, G('banner-graphic-position'))
     #
     self.time = time = serge.blocks.actors.StringText(
         'banner',
         'banner-time',
         'Time achieved',
         colour=G('time-colour'),
         font_size=G('time-size'),
         font_name=G('banner-font-name'),
         justify='left')
     time.setLayerName(self.foreground_layer)
     self.mountActor(time, G('time-position'))
     #
     self.updateAchievement()
Esempio n. 3
0
 def addedToWorld(self, world):
     """Added the banner to the world"""
     super(AchievementStatus, self).addedToWorld(world)
     G = self.G
     #
     # Create the widgets
     bg = serge.actor.Actor('banner', 'background')
     bg.visual = serge.blocks.visualblocks.Rectangle(
         G('banner-size'), G('banner-backcolour'))
     bg.setLayerName(self.background_layer)
     self.mountActor(bg, (0, 0))
     #
     self.name = name = serge.blocks.actors.StringText(
         'banner',
         'banner-name',
         'Name',
         colour=G('banner-font-colour'),
         font_size=G('banner-name-size'),
         font_name=G('banner-font-name'),
         justify='left')
     name.setLayerName(self.foreground_layer)
     self.mountActor(name, G('banner-name-position'))
     #
     self.description = description = serge.blocks.actors.StringText(
         'banner',
         'banner-description',
         'Description of the achievement as it\nis written down.',
         colour=G('banner-font-colour'),
         font_size=G('banner-description-size'),
         font_name=G('banner-font-name'),
         justify='left')
     description.setLayerName(self.foreground_layer)
     self.mountActor(description, G('banner-description-position'))
     #
     self.graphic = graphic = serge.actor.Actor('banner', 'banner-graphic')
     graphic.setSpriteName('achievement')
     graphic.setLayerName(self.foreground_layer)
     graphic.visual.setCell(1)
     self.mountActor(graphic, G('banner-graphic-position'))
     #
     self.time = time = serge.blocks.actors.StringText(
         'banner',
         'banner-time',
         'Time achieved',
         colour=G('time-colour'),
         font_size=G('time-size'),
         font_name=G('banner-font-name'),
         justify='left')
     time.setLayerName(self.foreground_layer)
     self.mountActor(time, G('time-position'))
     #
     self.updateAchievement()