mirror of
https://github.com/love2d/love-android.git
synced 2026-08-20 04:31:26 +02:00
Updated LÖVE source to revision cff5bc8604bd
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user