diff options
Diffstat (limited to 'scene/gui/rich_text_label.h')
-rw-r--r-- | scene/gui/rich_text_label.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 019edf5d45..4cec435568 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -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); |