diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index c76b7adf7..8954d29d8 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -197,6 +197,32 @@ void CComponentsFooter::setButtonLabels(const struct button_label * const conten setButtonLabels((button_label_l*)content, label_count, chain_width, label_width); } +void CComponentsFooter::setButtonLabels(const vectorv_content, const int& chain_width, const int& label_width) +{ + size_t label_count = v_content.size(); + button_label_l buttons[label_count]; + + for (size_t i= 0; i< label_count; i++){ + buttons[i].button = v_content[i].button; + buttons[i].locale = v_content[i].locale; + } + + setButtonLabels(buttons, label_count, chain_width, label_width); +} + +void CComponentsFooter::setButtonLabels(const vectorv_content, const int& chain_width, const int& label_width) +{ + size_t label_count = v_content.size(); + button_label_s buttons[label_count]; + + for (size_t i= 0; i< label_count; i++){ + buttons[i].button = v_content[i].button; + buttons[i].text = v_content[i].text; + } + + setButtonLabels(buttons, label_count, chain_width, label_width); +} + void CComponentsFooter::setButtonLabel(const char *button_icon, const std::string& text, const int& chain_width, const int& label_width) { button_label_s button[1]; diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index 748879470..a37471745 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -80,7 +80,11 @@ class CComponentsFooter : public CComponentsHeader void setButtonLabels(const struct button_label_s * const content, const size_t& label_count, const int& chain_width = 0, const int& label_width = 0); ///add button labels with locale label type as content, count as size_t, chain_width as int, label width as int void setButtonLabels(const struct button_label_l * const content, const size_t& label_count, const int& chain_width = 0, const int& label_width = 0); - + ///add button labels with locale label type as content, parameter 1 as vector, chain_width as int, label width as int + void setButtonLabels(const std::vectorv_content, const int& chain_width, const int& label_width); + ///add button labels with string label type as content, parameter 1 as vector, chain_width as int, label width as int + void setButtonLabels(const std::vectorv_content, const int& chain_width, const int& label_width); + ///add button labels with old label type, count as size_t, chain_width as int, label width as int ///NOTE: for compatibility with older button handler find in gui/widget/buttons.h void setButtonLabels(const struct button_label * const content, const size_t& label_count, const int& chain_width = 0, const int& label_width = 0);