Exemplo n.º 1
0
 def ApplyAttributes(self, attributes):
     Sprite.ApplyAttributes(self, attributes)
     self.originalColor = (self.color.r, self.color.g, self.color.b,
                           self.color.a)
     self.originalSize = (self.width, self.height)
     self.originalPosition = (self.left, self.top)
     self.hoverColor = attributes.get('hoverColor', self.color)
 def ApplyAttributes(self, attributes):
     Sprite.ApplyAttributes(self, attributes)
     loopParams = attributes.get('loopParams', self.default_loopParams)
     if loopParams:
         direction, time = loopParams
         uicore.animations.MorphScalar(self,
                                       'rotation',
                                       0.0,
                                       -direction * 2 * pi,
                                       duration=time / 1000.0,
                                       curveType=uiconst.ANIM_LINEAR,
                                       loops=uiconst.ANIM_REPEAT)
Exemplo n.º 3
0
 def ApplyAttributes(self, attributes):
     self.icons = attributes.get('icons', self.default_icons)
     attributes.icon = self.icons[0]
     Sprite.ApplyAttributes(self, attributes)
     icon = attributes.get('icon', self.default_icon)
     if icon:
         ignoreSize = attributes.get('ignoreSize', self.default_ignoreSize)
         self.LoadIcon(icon, ignoreSize=ignoreSize)
     onClick = attributes.get('OnClick', None)
     if onClick:
         self.OnClick = onClick
     self.steps = len(self.icons)
     self.step = 0
     self.play = 0
     self.playing = 0
Exemplo n.º 4
0
 def ApplyAttributes(self, attributes):
     Sprite.ApplyAttributes(self, attributes)
     self.idleIcon = None
     self.mouseoverIcon = None
     self.mousedownIcon = None
     self.whileMouseDownFuncTasklet = None
     self.expandOnLeft = attributes.get('expandonleft',
                                        self.default_expandonleft)
     self.ClickFunc = attributes.get('onclick', self.default_onclick)
     self.ClickFuncArgs = attributes.get('onclickargs',
                                         self.default_onclickargs)
     self.GetMenu = attributes.get('getmenu', self.default_getmenu)
     self.WhileMouseDownFunc = attributes.get(
         'whilemousedownFunc', self.default_whilemousedownFunc)
     self.SetMouseDownIcon(attributes.get('mousedownIcon',
                                          self.default_mousedownIcon),
                           update=False)
     self.SetMouseOverIcon(attributes.get('mouseoverIcon',
                                          self.default_mouseoverIcon),
                           update=False)
     self.SetMouseIdleIcon(attributes.get('idleIcon',
                                          self.default_idleIcon))
Exemplo n.º 5
0
 def ApplyAttributes(self, attributes):
     Sprite.ApplyAttributes(self, attributes)
     self.textureSecondary.useTransform = True
     self.textureSecondary.rotation = 0.0
     self._lastValue = None
Exemplo n.º 6
0
 def ApplyAttributes(self, attributes):
     Sprite.ApplyAttributes(self, attributes)
     ColorThemeMixin.ApplyAttributes(self, attributes)
Exemplo n.º 7
0
 def ApplyAttributes(self, attributes):
     Sprite.ApplyAttributes(self, attributes)
     self.controller = attributes.controller
Exemplo n.º 8
0
 def ApplyAttributes(self, attributes):
     Sprite.ApplyAttributes(self, attributes)
     self.industryGroupID = attributes.industryGroupID
     self.texturePath = industryUIConst.ICON_BY_INDUSTRYGROUP[
         self.industryGroupID]
Exemplo n.º 9
0
 def ApplyAttributes(self, attributes):
     Sprite.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     if uicore.uilib.blurredBackBufferAtlas:
         self.texture.atlasTexture = uicore.uilib.blurredBackBufferAtlas
     trinity.device.RegisterResource(self)
Exemplo n.º 10
0
 def ApplyAttributes(self, attributes):
     Sprite.ApplyAttributes(self, attributes)
     UIColorMixin.ApplyAttributes(self, attributes)