Roller new constructor
This commit is contained in:
+11
-1
@@ -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<int16_t()> getValue, std::function<void(int16_t)> 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<std::string> values, int16_t vmin, int16_t vmax, std::function<int16_t()> getValue, std::function<void(int16_t)> 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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user