From: Alexis Laferrière Date: Sat, 12 Dec 2015 02:17:53 +0000 (-0500) Subject: contrib/inkscape_tools: update support for gamnit X-Git-Tag: v0.8~36^2~19 X-Git-Url: http://nitlanguage.org contrib/inkscape_tools: update support for gamnit Signed-off-by: Alexis Laferrière --- diff --git a/contrib/inkscape_tools/src/svg_to_png_and_nit.nit b/contrib/inkscape_tools/src/svg_to_png_and_nit.nit index abd0912..d762c11 100644 --- a/contrib/inkscape_tools/src/svg_to_png_and_nit.nit +++ b/contrib/inkscape_tools/src/svg_to_png_and_nit.nit @@ -191,14 +191,14 @@ class GamnitImageSetSrc # Attributes of the class var attributes = new Array[String] - attributes.add "\tprivate var main_image = new Texture(\"images/{document.drawing_name}.png\")\n" + attributes.add "\tprivate var root_texture = new Texture(\"images/{document.drawing_name}.png\")\n" # Add single images to Nit source file for image in single_images do # Adapt coordinates to new top left and scale var coordinates = document.coordinates(image) - attributes.add "\tvar {image.name}: Texture = main_image.subtexture({coordinates})\n" + attributes.add "\tvar {image.name}: Texture = root_texture.subtexture({coordinates})\n" end # Add array of images too @@ -224,7 +224,7 @@ class GamnitImageSetSrc add """ # File generated by svg_to_png_and_nit, do not modify, redef instead -import gamnit::display +import gamnit::textures class {{{document.nit_class_name}}}