def apply(self, componentScript): VisualState.apply(self, componentScript) if hasattr(componentScript, 'sliderBackground'): componentScript.sliderBackground.textureName = self.backgroundTextureName if self.thumbTextureMapping: applyMapping(componentScript.sliderBackground, self.backgroundTextureMappingType, self.backgroundTextureMapping) componentScript.sliderBackground.colour = self.backgroundColour if hasattr(componentScript, 'sliderThumb'): componentScript.sliderThumb.textureName = self.thumbTextureName if self.thumbTextureMapping: applyMapping(componentScript.sliderThumb, self.thumbTextureMappingType, self.thumbTextureMapping) componentScript.sliderThumb.colour = self.thumbColour
def apply(self, componentScript): VisualState.apply(self, componentScript) if getattr(componentScript, 'buttonLabel', None) is not None and self.textStyle: TextStyles.setStyle(componentScript.buttonLabel, self.textStyle) if hasattr(componentScript, 'buttonIcon'): componentScript.buttonIcon.textureName = self.iconTextureName if self.iconTextureMapping: Utils.applyMapping(componentScript.buttonIcon, self.iconTextureMappingType, self.iconTextureMapping) componentScript.buttonIcon.colour = self.iconColour if self.iconMaterialFX != '': componentScript.buttonIcon.materialFX = self.iconMaterialFX else: componentScript.buttonIcon.materialFX = 'BLEND' return