本文整理汇总了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'