[Button] Add textFlags to constructor
This commit is contained in:
+4
-4
@@ -28,8 +28,8 @@ constexpr WindowFlags BUTTON_CHECKED_ON_FOCUS = FORM_FLAGS_LAST << 3u;
|
||||
class Button: public FormField
|
||||
{
|
||||
public:
|
||||
Button(FormGroup * parent, const rect_t & rect, std::function<uint8_t(void)> pressHandler = nullptr, WindowFlags windowFlags = 0):
|
||||
FormField(parent, rect, windowFlags),
|
||||
Button(FormGroup * parent, const rect_t & rect, std::function<uint8_t(void)> pressHandler = nullptr, WindowFlags windowFlags = 0, LcdFlags textFlags = 0):
|
||||
FormField(parent, rect, windowFlags, textFlags),
|
||||
pressHandler(std::move(pressHandler))
|
||||
{
|
||||
}
|
||||
@@ -87,8 +87,8 @@ class Button: public FormField
|
||||
class TextButton: public Button
|
||||
{
|
||||
public:
|
||||
TextButton(FormGroup * parent, const rect_t & rect, std::string text, std::function<uint8_t(void)> pressHandler = nullptr, WindowFlags windowFlags = BUTTON_BACKGROUND):
|
||||
Button(parent, rect, std::move(pressHandler), windowFlags | OPAQUE),
|
||||
TextButton(FormGroup * parent, const rect_t & rect, std::string text, std::function<uint8_t(void)> pressHandler = nullptr, WindowFlags windowFlags = BUTTON_BACKGROUND, LcdFlags textFlags = 0):
|
||||
Button(parent, rect, std::move(pressHandler), windowFlags | OPAQUE, textFlags),
|
||||
text(std::move(text))
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user