Updated LÖVE source to revision cff5bc8604bd

This commit is contained in:
Martin Felis
2015-12-09 22:19:41 +01:00
parent 8f5ee4a05e
commit 66685a2ade
248 changed files with 11591 additions and 9219 deletions
+9 -9
View File
@@ -38,15 +38,15 @@ class Text : public Drawable
{
public:
Text(Font *font, const std::string &text = "");
Text(Font *font, const std::vector<Font::ColoredString> &text = {});
virtual ~Text();
void set(const std::string &text);
void set(const std::string &text, float wrap, Font::AlignMode align);
void set(const std::vector<Font::ColoredString> &text);
void set(const std::vector<Font::ColoredString> &text, float wrap, Font::AlignMode align);
void set();
void add(const std::string &text, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
void addf(const std::string &text, float wrap, Font::AlignMode align, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
int add(const std::vector<Font::ColoredString> &text, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
int addf(const std::vector<Font::ColoredString> &text, float wrap, Font::AlignMode align, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
void clear();
// Implements Drawable.
@@ -58,20 +58,21 @@ public:
/**
* Gets the width of the currently set text.
**/
int getWidth() const;
int getWidth(int index = 0) const;
/**
* Gets the height of the currently set text.
**/
int getHeight() const;
int getHeight(int index = 0) const;
private:
struct TextData
{
std::string text;
Font::ColoredCodepoints codepoints;
float wrap;
Font::AlignMode align;
Font::TextInfo text_info;
bool use_matrix;
bool append_vertices;
Matrix3 matrix;
@@ -87,7 +88,6 @@ private:
std::vector<Font::DrawCommand> draw_commands;
std::vector<TextData> text_data;
Font::TextInfo text_info;
size_t vert_offset;