From e45ea4abfbf1e0d193c4dc4204edcdd496ffc21e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 26 Feb 2016 14:55:38 +0100 Subject: [PATCH] CComponentsText: add extended setColorAll() methode into text class Doeas the same like setColorAll() of CCDraw but additional for text color --- src/gui/components/cc_item_text.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/components/cc_item_text.h b/src/gui/components/cc_item_text.h index 5bf297212..48450de61 100644 --- a/src/gui/components/cc_item_text.h +++ b/src/gui/components/cc_item_text.h @@ -132,6 +132,13 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox virtual inline void setTextFont(Font* font_text){ct_font = font_text;}; ///set text color virtual void setTextColor(const fb_pixel_t& color_text); + ///set all basic framebuffer element colors at once + ///Note: Possible color values are defined in "gui/color.h" and "gui/customcolor.h" + virtual void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0, fb_pixel_t color_text = COL_MENUCONTENT_TEXT) + { + CCDraw::setColorAll(color_frame, color_body, color_shadow); + setTextColor(color_text); + }; ///get text color virtual inline fb_pixel_t getTextColor(){return ct_col_text;}; ///set text alignment, also see textbox.h for possible alignment modes