From 9d7f8a21f9a1b842c63ef1f4e3d5fe276e80824b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 14 Mar 2018 10:21:50 +0100 Subject: [PATCH] CComponentsIconForm: add member to add any number of identical icons --- src/gui/components/cc_frm_icons.cpp | 10 ++++++++++ src/gui/components/cc_frm_icons.h | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_icons.cpp b/src/gui/components/cc_frm_icons.cpp index f0ae5b90d..24a38323e 100644 --- a/src/gui/components/cc_frm_icons.cpp +++ b/src/gui/components/cc_frm_icons.cpp @@ -93,6 +93,16 @@ void CComponentsIconForm::addIcon(std::vector icon_name) addIcon(icon_name[i]); } +void CComponentsIconForm::addIcons(const std::string& icon_name, const size_t& count) +{ + if (count == 0){ + dprintf(DEBUG_ &v_icon_names, + const std::vector &v_icon_names = std::vector(), CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t color_frame = COL_FRAME_PLUS_0, @@ -54,6 +54,7 @@ class CComponentsIconForm : public CComponentsFrmChain void addIcon(const std::string& icon_name); void addIcon(std::vector icon_name); + void addIcons(const std::string& icon_name, const size_t& count = 1); void removeIcons(){v_icons.clear();}; void insertIcon(const uint& icon_id, const std::string& icon_name); void removeIcon(const uint& icon_id);