Merge: Nitsmell : Adding new code smells and print console updated
[nit.git] / lib / gamnit / font.nit
index df46590..c6f48df 100644 (file)
@@ -15,7 +15,7 @@
 # Abstract font drawing services, implemented by `bmfont` and `tileset`
 module font
 
-import flat
+import gamnit::flat_core
 
 # Abstract font, drawn by a `TextSprites`
 abstract class Font
@@ -124,6 +124,24 @@ class TextSprites
        # Otherwise, lines are cut before overflowing.
        var wrap = true is optional, writable
 
+       # Scale applied to all sprites and spacing
+       #
+       # Defaults to 1.0.
+       var scale = 1.0 is optional, writable
+
+       # Links in the currently displayed text
+       #
+       # Links are declared in a Markdown-like format:
+       #
+       # * `[my link]` creates a link with the name `my link`.
+       # * `[pretty name](internal name)` creates a link with the
+       #   name `internal_name` while showing the text `pretty name`.
+       #
+       # This `Map` lists the sprites composing each link.
+       # These sprites can be modified as desired by the clients,
+       # by changing their tints or anything else.
+       var links = new Map[String, Array[Sprite]] is lazy
+
        # Width of the currently displayed text
        var width = 0.0