Add color option for img bbcode tag in RichTextLabel to tint images
This commit is contained in:
parent
3ecdc27f49
commit
7b7d4ef079
3 changed files with 164 additions and 154 deletions
|
|
@ -149,6 +149,7 @@ private:
|
|||
struct ItemImage : public Item {
|
||||
Ref<Texture2D> image;
|
||||
Size2 size;
|
||||
Color color;
|
||||
ItemImage() { type = ITEM_IMAGE; }
|
||||
};
|
||||
|
||||
|
|
@ -381,6 +382,8 @@ private:
|
|||
bool _find_by_type(Item *p_item, ItemType p_type);
|
||||
void _fetch_item_fx_stack(Item *p_item, Vector<ItemFX *> &r_stack);
|
||||
|
||||
static Color _get_color_from_string(const String &p_color_str, const Color &p_default_color);
|
||||
|
||||
void _update_scroll();
|
||||
void _update_fx(ItemFrame *p_frame, float p_delta_time);
|
||||
void _scroll_changed(double);
|
||||
|
|
@ -406,7 +409,7 @@ protected:
|
|||
public:
|
||||
String get_text();
|
||||
void add_text(const String &p_text);
|
||||
void add_image(const Ref<Texture2D> &p_image, const int p_width = 0, const int p_height = 0);
|
||||
void add_image(const Ref<Texture2D> &p_image, const int p_width = 0, const int p_height = 0, const Color &p_color = Color(1.0, 1.0, 1.0));
|
||||
void add_newline();
|
||||
bool remove_line(const int p_line);
|
||||
void push_font(const Ref<Font> &p_font);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue