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