Fixed tab characters (‘\t’) in text to be drawn properly with love.graphics.print.

This commit is contained in:
Alex Szpakowski
2014-01-15 23:38:39 -04:00
parent 9b9671f5ee
commit dc35db1c7b
3 changed files with 33 additions and 6 deletions
+7 -2
View File
@@ -202,14 +202,19 @@ private:
FontType type;
Texture::Filter filter;
int textureX, textureY;
int rowHeight;
bool useSpacesAsTab;
static const int NUM_TEXTURE_SIZES = 7;
static const int TEXTURE_WIDTHS[NUM_TEXTURE_SIZES];
static const int TEXTURE_HEIGHTS[NUM_TEXTURE_SIZES];
static const int TEXTURE_PADDING = 1;
int textureX, textureY;
int rowHeight;
// This will be used if the Rasterizer doesn't have a tab character itself.
static const int SPACES_PER_TAB = 4;
}; // Font