コード例 #1
0
 def finalize(self, dbArgs={}):
     if not self.isDirty():
         return
     r, g, b = self.getColorScheme().getArrowColor()
     a = self.getColorScheme().getAlpha()
     self.scArrow.setColorScale(r, g, b, a)
     if self.menu is not None:
         self.menu.setPos(self.getMenuOffset())
     if self.isActive():
         r, g, b = self.getColorScheme().getMenuHolderActiveColor()
         a = self.getColorScheme().getAlpha()
         frameColor = (r, g, b, a)
     else:
         frameColor = SCMenuHolder.DefaultFrameColor
     args = {
         'image': self.scArrow,
         'image_pos': (self.width - 0.5, 0, -self.height * 0.5),
         'frameColor': frameColor
     }
     args.update(dbArgs)
     SCElement.finalize(self, dbArgs=args)
コード例 #2
0
 def finalize(self, dbArgs={}):
     if not self.isDirty():
         return
     args = {}
     if self.hasLinkedEmote():
         self.lastEmoteIconColor = self.getEmoteIconColor()
         self.emotionIcon.setColorScale(*self.lastEmoteIconColor)
         args.update({
             'image': self.emotionIcon,
             'image_pos': (self.width - 0.6, 0, -self.height * 0.5)
         })
     if self.isDisabled():
         args.update({
             'rolloverColor': (0, 0, 0, 0),
             'pressedColor': (0, 0, 0, 0),
             'rolloverSound':
             None,
             'clickSound':
             None,
             'text_fg':
             self.getColorScheme().getTextDisabledColor() + (1, )
         })
     args.update(dbArgs)
     SCElement.finalize(self, dbArgs=args)