Revert (MessageDialog and ConfirmDialog)

This commit is contained in:
Bertrand Songis
2019-12-02 11:40:29 +01:00
parent 436f5d3056
commit 177a4ddace
3 changed files with 0 additions and 73 deletions
-1
View File
@@ -32,7 +32,6 @@ set(LIBOPENUI_SRC
table.cpp
modal_window.cpp
dialog.cpp
message_dialog.cpp
)
if(SOFTWARE_KEYBOARD)
-38
View File
@@ -1,38 +0,0 @@
/*
* Copyright (C) OpenTX
*
* Source:
* https://github.com/opentx/libopenui
*
* This file is a part of libopenui library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
#include "message_dialog.h"
#include "static.h"
MessageDialog::MessageDialog(const char * title, const char * message):
Dialog(title, {50, 73, LCD_W - 100, LCD_H - 146})
{
new StaticText(this, {0, coord_t(height() - PAGE_LINE_HEIGHT) / 2, width(), PAGE_LINE_HEIGHT}, message, 0, CENTERED);
}
#if defined(HARDWARE_KEYS)
void MessageDialog::onEvent(event_t event)
{
TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString().c_str(), event);
if (event == EVT_KEY_BREAK(KEY_EXIT) || event == EVT_KEY_BREAK(KEY_ENTER)) {
deleteLater();
}
}
#endif
-34
View File
@@ -1,34 +0,0 @@
/*
* Copyright (C) OpenTX
*
* Source:
* https://github.com/opentx/libopenui
*
* This file is a part of libopenui library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
#ifndef _MESSAGE_DIALOG_H_
#define _MESSAGE_DIALOG_H_
#include "dialog.h"
class MessageDialog: public Dialog {
public:
MessageDialog(const char * title, const char * message);
#if defined(HARDWARE_KEYS)
void onEvent(event_t event) override;
#endif
};
#endif // _MESSAGE_DIALOG_H_