本文整理汇总了Python中BugDll.decode方法的典型用法代码示例。如果您正苦于以下问题:Python BugDll.decode方法的具体用法?Python BugDll.decode怎么用?Python BugDll.decode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BugDll
的用法示例。
在下文中一共展示了BugDll.decode方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: resolveDll
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
def resolveDll(self, element, dll):
dll = BugDll.decode(dll)
inherited = element.getState("dll")
if dll is None:
return inherited
if inherited is None:
return dll
if inherited > dll:
BugUtil.warn("BugConfig - element <%s>.dll attribute %s overrides newer inherited dll attribute %s" % (element.tag, dll, inherited))
return dll
示例2: handle
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
def handle(self, element, module, function, immediate, dll):
immediate = self.isTrue(immediate)
dll = BugDll.decode(dll)
if self.isDllOkay(element, dll):
func = BugUtil.getFunction(module, function, True, *element.args, **element.kwargs)
if immediate:
func()
else:
BugInit.addInit(module, func)
else:
BugUtil.info("BugConfig - ignoring <%s> %s.%s, requires dll version %s", element.tag, module, function, self.resolveDll(element, dll))
示例3: handle
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
def handle(self, element, how, module, function, toModule, asName, dll):
dll = BugDll.decode(dll)
if self.isDllOkay(element, dll):
BugUtil.extendFunction(module, function, toModule, asName, how)
else:
BugUtil.info(
"BugConfig - ignoring <%s> %s.%s, requires dll version %s",
element.tag,
module,
function,
self.resolveDll(element, dll),
)
示例4: __init__
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
def __init__(self, mod, id, andId=None, dll=None):
self.mod = mod
self.id = id
self.andId = andId
self.andOption = None
self.dll = BugDll.decode(dll)
if self.dll is not None and self.dll <= 0:
BugUtil.warn("BugOptions - %s has invalid dll value %r, ignoring", id, dll)
self.dll = None
self.enabled = True
if self.dll > 0:
if not BugDll.isVersion(self.dll):
self.enabled = False
示例5: handle
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
def handle(self, element, id, name, fromKey, offset, dll):
dll = BugDll.decode(dll)
if self.isDllOkay(element, dll):
if not fromKey:
if not self.lastSymbol:
raise BugUtil.ConfigError("<%s> %s requires an offset symbol" % (element.tag, id))
fromKey = self.lastSymbol
if offset is None:
offset = 1
else:
offset = int(offset)
self.lastSymbol = addOffsetSymbol(id, fromKey, offset, name)
else:
BugUtil.info("FontUtil - ignoring <%s> %s, requires dll version %s", element.tag, id, self.resolveDll(element, dll))
示例6: handle
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
def handle(self, element, name, type, default, module, handler, listener, log, dll):
dll = BugDll.decode(dll)
if self.isDllOkay(element, dll):
utils = element.getState("gameutils")
if utils:
func = BugUtil.bindFunction(utils, handler)
if listener:
listenerFunc = BugUtil.bindFunction(utils, listener)
elif not module:
raise BugUtil.ConfigError("Element <%s> requires attribute module or be enclosed in <gameutils> that defines a class", element.tag)
else:
func = BugUtil.lookupFunction(module, handler)
if listener:
listenerFunc = BugUtil.lookupFunction(module, listener)
createCallback(name, func, self.createValue(type, default), log)
if listener:
addNamedListener(name, listenerFunc, log)
else:
BugUtil.info("BugGameUtils - ignoring <%s> %s, requires dll version %s", element.tag, name, self.resolveDll(element, dll))
示例7: handle
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
def handle(self, element, keys, module, function, dll):
dll = BugDll.decode(dll)
if self.isDllOkay(element, dll):
CvEventInterface.getEventManager().addShortcutHandler(keys, BugUtil.getFunction(module, function, *element.args, **element.kwargs))
else:
BugUtil.info("InputUtil - ignoring <%s> %s, requires dll version %s", element.tag, keys, self.resolveDll(element, dll))