Esempio n. 1
0
 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"))
Esempio n. 2
0
	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"))
Esempio n. 3
0
 def writeImages(self, images):
     for index, fileName in enumerate(images):
         self.__dictionary["images"].append({
             "index":
             index,
             "fileName":
             datafiles.getTilesetPath(fileName, True)
         })
Esempio n. 4
0
	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)
Esempio n. 5
0
    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)
Esempio n. 6
0
	def writeImages(self, images):
		for index, fileName in enumerate(images):
			self.__dictionary["images"].append({"index": index,
				"fileName": datafiles.getTilesetPath(fileName, True)})