Support for resized images in RichTextLabel

BBCode Tag:
[img=<width>x<height>]{path}[/img]
This commit is contained in:
PouleyKetchoupp
2019-10-16 12:00:15 +02:00
parent 26bbb26738
commit 9f8ffd4146
3 changed files with 66 additions and 9 deletions

View File

@ -148,6 +148,7 @@ private:
struct ItemImage : public Item {
Ref<Texture> image;
Size2 size;
ItemImage() { type = ITEM_IMAGE; }
};
@ -406,7 +407,7 @@ protected:
public:
String get_text();
void add_text(const String &p_text);
void add_image(const Ref<Texture> &p_image);
void add_image(const Ref<Texture> &p_image, const int p_width = 0, const int p_height = 0);
void add_newline();
bool remove_line(const int p_line);
void push_font(const Ref<Font> &p_font);