当前位置: 首页>>代码示例>>Python>>正文


Python TextManager.setFlashObject方法代码示例

本文整理汇总了Python中gui.Scaleform.framework.managers.TextManager.TextManager.setFlashObject方法的典型用法代码示例。如果您正苦于以下问题:Python TextManager.setFlashObject方法的具体用法?Python TextManager.setFlashObject怎么用?Python TextManager.setFlashObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gui.Scaleform.framework.managers.TextManager.TextManager的用法示例。


在下文中一共展示了TextManager.setFlashObject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: UtilsManager

# 需要导入模块: from gui.Scaleform.framework.managers.TextManager import TextManager [as 别名]
# 或者: from gui.Scaleform.framework.managers.TextManager.TextManager import setFlashObject [as 别名]
class UtilsManager(UtilsManagerMeta):

    def __init__(self):
        super(UtilsManager, self).__init__()
        self._textMgr = TextManager()

    def registerTextManager(self, flashObject):
        self._textMgr.setFlashObject(flashObject)

    def _populate(self):
        super(UtilsManager, self)._populate()
        settings = GUI_SETTINGS.imageCache
        self.as_setImageCacheSettingsS(settings['maxSize'], settings['minSize'])

    def destroy(self):
        self.__unregisterMrgs()
        super(UtilsManagerMeta, self).destroy()

    def __unregisterMrgs(self):
        self._textMgr.destroy()
        self._textMgr = None
        return

    @property
    def textManager(self):
        return self._textMgr

    def getGUINations(self):
        return GUI_NATIONS

    def getNationNames(self):
        return nations.NAMES

    def getNationIndices(self):
        return nations.INDICES

    def changeStringCasing(self, s, isUpper, _):
        return utils.changeStringCasing(str(s).decode('utf-8'), isUpper)

    @classmethod
    def getAbsoluteUrl(cls, value):
        return getAbsoluteUrl(value)

    @classmethod
    def getHtmlIconText(cls, properties):
        template = "<img src='{0}' width='{1}' height='{2}' vspace='{3}' hspace='{4}'/>"
        absoluteUrl = cls.getAbsoluteUrl(properties.imageAlias)
        return template.format(properties.imageAlias, properties.width, properties.height, properties.vSpace, properties.hSpace)

    def getFirstDayOfWeek(self):
        return BigWorld.wg_firstDayOfWeek() + 1

    def getWeekDayNames(self, full, isUpper, isLower):
        source = list(MENU.DATETIME_WEEKDAYS_FULL_ENUM if full else MENU.DATETIME_WEEKDAYS_SHORT_ENUM)
        result = []
        for day in calendar.Calendar(firstweekday=BigWorld.wg_firstDayOfWeek()).iterweekdays():
            name = i18n.makeString(source[day])
            if isUpper:
                name = self.changeStringCasing(name, True, None)
            elif isLower:
                name = self.changeStringCasing(name, False, None)
            result.append(name)

        return result

    def getMonthsNames(self, full, isUpper, isLower):
        source = list(MENU.DATETIME_MONTHS_FULL_ENUM if full else MENU.DATETIME_MONTHS_SHORT_ENUM)
        result = []
        for key in source:
            name = i18n.makeString(key)
            if isUpper:
                name = self.changeStringCasing(name, True, None)
            elif isLower:
                name = self.changeStringCasing(name, False, None)
            result.append(name)

        return result

    def _dispose(self):
        self._textMgr = None
        super(UtilsManager, self)._dispose()
        return

    def intToStringWithPrefixPatern(self, value, count, fill):
        return ('{0:' + str(fill) + '>' + str(count) + '}').format(value)

    def isTwelveHoursFormat(self):
        return getClientLanguage() == 'en'
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:90,代码来源:utilsmanager.py


注:本文中的gui.Scaleform.framework.managers.TextManager.TextManager.setFlashObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。