コード例 #1
0
def readHintSection(xmlCtx, section, flags):
    sectionInfo = sub_parsers.parseHint(xmlCtx, section)
    hint = chapter.ChainHint(sectionInfo['hintID'], sectionInfo['itemID'],
                             sectionInfo['text'], sectionInfo['hasBox'],
                             sectionInfo['arrow'], sectionInfo['padding'])
    hint.setActions(
        sub_parsers.parseActions(
            xmlCtx, _xml.getSubsection(xmlCtx, section, 'actions'), flags))
    return hint
コード例 #2
0
ファイル: __init__.py プロジェクト: webiumsk/WOT-0.9.12
    def parse(filePath, excludedHints):
        hints = HintsData()
        section = ResMgr.openSection(filePath)
        if section is None:
            _xml.raiseWrongXml(None, filePath, 'can not open or read')
        xmlCtx = (None, filePath)
        hints.setGuiFilePath(_xml.readString(xmlCtx, section, 'gui'))
        for _, subSec in _xml.getChildren(xmlCtx, section, 'hints'):
            hint = sub_parsers.parseHint(xmlCtx, subSec)
            if hint['hintID'] not in excludedHints:
                hints.addHint(hint)

        return hints
コード例 #3
0
ファイル: parsers__init__.py プロジェクト: Difrex/wotsdk
    def parse(filePath, excludedHints):
        hints = HintsData()
        section = ResMgr.openSection(filePath)
        if section is None:
            _xml.raiseWrongXml(None, filePath, 'can not open or read')
        xmlCtx = (None, filePath)
        hints.setGuiFilePath(_xml.readString(xmlCtx, section, 'gui'))
        for _, subSec in _xml.getChildren(xmlCtx, section, 'hints'):
            hint = sub_parsers.parseHint(xmlCtx, subSec)
            if hint['hintID'] not in excludedHints:
                hints.addHint(hint)

        return hints
コード例 #4
0
ファイル: chains.py プロジェクト: webiumsk/WOT-0.9.15.1
def readHintSection(xmlCtx, section, flags):
    sectionInfo = sub_parsers.parseHint(xmlCtx, section)
    hint = chapter.ChainHint(sectionInfo['hintID'], sectionInfo['itemID'], sectionInfo['text'], sectionInfo['hasBox'], sectionInfo['arrow'], sectionInfo['padding'])
    hint.setActions(sub_parsers.parseActions(xmlCtx, _xml.getSubsection(xmlCtx, section, 'actions'), flags))
    return hint