Catch touch-end in MessageDialog

Resolves #72
This commit is contained in:
Raphael Coeffic
2021-05-24 19:22:19 +02:00
parent 88e62e1fcb
commit d83f8e12fa
2 changed files with 14 additions and 5 deletions
+13 -4
View File
@@ -20,11 +20,20 @@
#include "message_dialog.h"
#include "static.h"
MessageDialog::MessageDialog(Window * parent, const char * title, const char * message, const char * info):
Dialog(parent, title, {50, 73, LCD_W - 100, LCD_H - 146})
MessageDialog::MessageDialog(Window* parent, const char* title,
const char* message, const char* info) :
Dialog(parent, title, {50, 73, LCD_W - 100, LCD_H - 146})
{
messageWidget = new StaticText(this, {0, coord_t(height() - PAGE_LINE_HEIGHT) / 2, width(), PAGE_LINE_HEIGHT}, message, 0, CENTERED);
infoWidget = new StaticText(this, {0, 30 + coord_t(height() - PAGE_LINE_HEIGHT) / 2, width(), PAGE_LINE_HEIGHT}, info, 0, CENTERED);
messageWidget = new StaticText(
this,
{0, coord_t(height() - PAGE_LINE_HEIGHT) / 2, width(), PAGE_LINE_HEIGHT},
message, 0, CENTERED);
infoWidget = new StaticText(this,
{0, 30 + coord_t(height() - PAGE_LINE_HEIGHT) / 2,
width(), PAGE_LINE_HEIGHT},
info, 0, CENTERED);
setCloseWhenClickOutside(true);
}
#if defined(HARDWARE_KEYS)