Fixed touch handling with netloader msgbox. Swipe up can now be used to exit netloader. Added menuIsNetloaderActive().
This commit is contained in:
parent
784dbc3623
commit
8888bff85f
@ -83,6 +83,10 @@ void launchApplyThemeTask(menuEntry_s* arg) {
|
||||
computeFrontGradient(themeCurrent.frontWaveColor, 280);
|
||||
}
|
||||
|
||||
bool menuIsNetloaderActive(void) {
|
||||
return hbmenu_state == HBMENU_NETLOADER_ACTIVE;
|
||||
}
|
||||
|
||||
//Draws an RGB888 or RGBA8888 image.
|
||||
static void drawImage(int x, int y, int width, int height, const uint8_t *image, ImageMode mode) {
|
||||
int tmpx, tmpy;
|
||||
|
@ -110,6 +110,8 @@ char *menuGetRootBasePath(void);
|
||||
|
||||
void menuHandleAButton(void);
|
||||
|
||||
bool menuIsNetloaderActive(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -93,7 +93,9 @@ void handleTouch(menu_s* menu) {
|
||||
int x2 = touchInfo.prevTouch.px;
|
||||
int y2 = touchInfo.prevTouch.py;
|
||||
|
||||
if (menuIsMsgBoxOpen()) {
|
||||
bool netloader_active = menuIsNetloaderActive();
|
||||
|
||||
if (menuIsMsgBoxOpen() && !netloader_active) {
|
||||
MessageBox currMsgBox = menuGetCurrentMsgBox();
|
||||
int start_x = 1280 / 2 - currMsgBox.width / 2;
|
||||
int start_y = (720 / 2 - currMsgBox.height / 2) + (currMsgBox.height - 80);
|
||||
@ -103,7 +105,7 @@ void handleTouch(menu_s* menu) {
|
||||
if (x1 > start_x && x1 < end_x && y1 > start_y && y1 < end_y && touchInfo.isTap) {
|
||||
menuCloseMsgBox();
|
||||
}
|
||||
} else if (touchInfo.isTap) {
|
||||
} else if (touchInfo.isTap && !netloader_active) {
|
||||
// App Icons
|
||||
if (y1 > LISTING_START_Y && y1 < LISTING_END_Y) {
|
||||
handleTappingOnApp(menu, touchInfo.prevTouch.px);
|
||||
@ -138,4 +140,4 @@ void handleTouch(menu_s* menu) {
|
||||
|
||||
touchInfo.gestureInProgress = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user