コード例 #1
0
    def checkIfEnabled(self):
        if Config.get("video", "shader_use"):
            if self.enabled:
                self.turnon = True
            else:
                self.set(os.path.join(Version.dataPath(), "shaders"))
        else:
            self.turnon = False

        if self.turnon:
            for i in self.shaders.keys():
                try:
                    value = Config.get("video", "shader_" + i)
                    if value != "None":
                        if value == "theme":
                            if isTrue(
                                    Config.get("theme",
                                               "shader_" + i).lower()):
                                value = i
                            else:
                                continue
                        self.assigned[i] = value
                except KeyError:
                    continue
            return True
        return False
コード例 #2
0
ファイル: Shader.py プロジェクト: Linkid/fofix
    def checkIfEnabled(self):
        if Config.get("video","shader_use"):
            if self.enabled:
                self.turnon = True
            else:
                self.set(os.path.join(Version.dataPath(), "shaders"))
        else:
            self.turnon = False

        if self.turnon:
            for i in self.shaders.keys():
                try:
                    value = Config.get("video","shader_"+i)
                    if value != "None":
                        if value == "theme":
                            if isTrue(Config.get("theme","shader_"+i).lower()):
                                value = i
                            else:
                                continue
                        self.assigned[i] = value
                except KeyError:
                    continue
            return True
        return False