def setPreviewText(self): self.tilePreviewSave.set_text( datafiles.getTilesetPath("tiles.png", True)) self.parallaxPreviewSave.set_text( datafiles.getParallaxPath("parallax.png", True)) self.tilePreviewLoad.set_text(datafiles.getTilesetPath("tiles.png")) self.parallaxPreviewLoad.set_text( datafiles.getParallaxPath("parallax.png"))
def setPreviewText(self): self.tilePreviewSave.set_text(datafiles.getTilesetPath("tiles.png", True)) self.parallaxPreviewSave.set_text(datafiles.getParallaxPath( "parallax.png", True)) self.tilePreviewLoad.set_text(datafiles.getTilesetPath("tiles.png")) self.parallaxPreviewLoad.set_text(datafiles.getParallaxPath( "parallax.png"))
def writeImages(self, images): for index, fileName in enumerate(images): self.__dictionary["images"].append({ "index": index, "fileName": datafiles.getTilesetPath(fileName, True) })
def __readImage(self, image): if "index" in image: if type(image["index"]) == int: index = image["index"] else: raise MapLoadException("Map indicies must be integers") else: raise MapLoadException("No index specified for image") if "fileName" in image: if type(image["fileName"]) == str or type(image["fileName"]) == unicode: fileName = datafiles.getTilesetPath(image["fileName"]) else: raise MapLoadException("The file name for an image must be a string") else: raise MapLoadException("No file name specified for image") self.map.addImage(fileName, index)
def __readImage(self, image): if "index" in image: if type(image["index"]) == int: index = image["index"] else: raise MapLoadException("Map indicies must be integers") else: raise MapLoadException("No index specified for image") if "fileName" in image: if type(image["fileName"]) == str or type( image["fileName"]) == unicode: fileName = datafiles.getTilesetPath(image["fileName"]) else: raise MapLoadException( "The file name for an image must be a string") else: raise MapLoadException("No file name specified for image") self.map.addImage(fileName, index)
def writeImages(self, images): for index, fileName in enumerate(images): self.__dictionary["images"].append({"index": index, "fileName": datafiles.getTilesetPath(fileName, True)})