Latest updates

This commit is contained in:
Bertrand Songis
2019-10-16 08:18:36 +02:00
parent bf430e8b56
commit 843f2466b5
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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))
{
-1
View File
@@ -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
View File
@@ -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
View File
@@ -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;
}