From 2e786b475a78bc029cbca525c444e4211e000664 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Wed, 13 May 2020 09:26:15 +0200 Subject: [PATCH] Roller new constructor --- radio/src/thirdparty/libopenui/src/roller.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/radio/src/thirdparty/libopenui/src/roller.h b/radio/src/thirdparty/libopenui/src/roller.h index 61dcf4c0c..9d66a2f78 100644 --- a/radio/src/thirdparty/libopenui/src/roller.h +++ b/radio/src/thirdparty/libopenui/src/roller.h @@ -33,6 +33,17 @@ class Roller: public Choice { public: Roller(FormGroup * parent, const rect_t & rect, const char * label, const char * const * values, int16_t vmin, int16_t vmax, std::function getValue, std::function setValue = nullptr, WindowFlags windowFlags = ROLLER_SEPARATION_LINES): Choice(parent, rect, values, vmin, vmax, std::move(getValue), std::move(setValue), windowFlags | NO_SCROLLBAR) + { + init(label); + } + + Roller(FormGroup * parent, const rect_t & rect, const char * label, std::vector values, int16_t vmin, int16_t vmax, std::function getValue, std::function setValue = nullptr, WindowFlags windowFlags = ROLLER_SEPARATION_LINES): + Choice(parent, rect, std::move(values), vmin, vmax, std::move(getValue), std::move(setValue), windowFlags | NO_SCROLLBAR) + { + init(label); + } + + void init(const char * label) { if (label) { // the label is another window, could be changed, but is it needed? @@ -46,7 +57,6 @@ class Roller: public Choice { lastScrollPositionY = scrollPositionY; } - #if defined(DEBUG_WINDOWS) std::string getName() const override {