-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWaitScreen.cpp
More file actions
36 lines (30 loc) · 1.11 KB
/
WaitScreen.cpp
File metadata and controls
36 lines (30 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <Arduino.h>
#include "WaitScreen.h"
#include "ScreenObjects.h"
//----------------------------------------------
// Constructor
//----------------------------------------------
WaitScreen::WaitScreen() {}
//----------------------------------------------
// Initialize the instance
//----------------------------------------------
void WaitScreen::InitializeUI()
{
id = SCR_WAIT_ID;
caption = "WAIT";
AddBitmap(UI_WAIT_BMP, (display->tft.width() - 36) / 2, (display->tft.height() - 36) / 2, 36, 36, COLOR_NAVBAR_WARNING, BMP_WAIT);
AddPushButton(UI_WAIT_CANCEL, (display->tft.width() - 80) / 2, ((display->tft.height() - 36) / 2) + 60, 80, 40, COLOR_BTN_NORMAL, COLOR_BTN_PRESSED, "Cancel");
}
//----------------------------------------------------------------------------------------------------
// Hadle screen clicks
//----------------------------------------------------------------------------------------------------
ScreenParams* WaitScreen::ClickHandler(uint8_t objId)
{
Screen::ClickHandler(objId);
switch (objId)
{
case UI_WAIT_CANCEL:
return GotoScreen(SCR_MENU_ID);
}
return NULL;
}