Latest updates
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ class Button : public FormField {
|
||||
|
||||
class TextButton : public Button {
|
||||
public:
|
||||
TextButton(Window * parent, const rect_t & rect, std::string text, std::function<uint8_t(void)> pressHandler=nullptr, uint8_t flags=BUTTON_BACKGROUND):
|
||||
TextButton(Window * parent, const rect_t & rect, std::string text, std::function<uint8_t(void)> pressHandler = nullptr, uint8_t flags = BUTTON_BACKGROUND):
|
||||
Button(parent, rect, pressHandler, flags),
|
||||
text(std::move(text))
|
||||
{
|
||||
|
||||
@@ -36,7 +36,6 @@ Choice::Choice(Window * parent, const rect_t & rect, const char * values, int16_
|
||||
void Choice::paint(BitmapBuffer * dc)
|
||||
{
|
||||
FormField::paint(dc);
|
||||
|
||||
theme->drawChoice(dc, this, textHandler ? textHandler(getValue()).c_str() : TEXT_AT_INDEX(values, getValue() - vmin).c_str());
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -89,7 +89,8 @@ class Choice : public ChoiceBase {
|
||||
std::function<bool(int)> isValueAvailable;
|
||||
std::function<std::string(int32_t)> textHandler;
|
||||
LcdFlags flags = 0;
|
||||
void openMenu();
|
||||
|
||||
virtual void openMenu();
|
||||
};
|
||||
|
||||
#endif // _CHOICE_H_
|
||||
|
||||
+2
-2
@@ -53,12 +53,12 @@ class FormField: public Window {
|
||||
return current;
|
||||
}
|
||||
|
||||
inline FormField * getPreviousField()
|
||||
virtual FormField * getPreviousField()
|
||||
{
|
||||
return previous;
|
||||
}
|
||||
|
||||
inline FormField * getNextField()
|
||||
virtual FormField * getNextField()
|
||||
{
|
||||
return next;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user