Fix transparency

replace/791716c60fb6d6ae6b16c9ec1671ab91253cf2aa
Niccolò Izzo 2021-01-02 20:07:13 +01:00
rodzic 2fe6cd1cb6
commit 95e00c2eff
1 zmienionych plików z 18 dodań i 4 usunięć

Wyświetl plik

@ -695,7 +695,8 @@ bool _ui_drawMenuMacro() {
}
bool _ui_drawDarkOverlay() {
color_t alpha_grey = {0, 0, 0, 245};
// TODO: Make this 245 alpha and fix alpha frame swap
color_t alpha_grey = {0, 0, 0, 255};
point_t origin = {0, 0};
gfx_drawRect(origin, SCREEN_WIDTH, SCREEN_HEIGHT, alpha_grey, true);
return true;
@ -747,9 +748,10 @@ void ui_updateFSM(event_t event, bool *sync_rtx)
}
}
else if(msg.keys & KEY_ENTER)
{
// Open Menu
state.ui_screen = MENU_TOP;
<<<<<<< HEAD
}
else if(input_isNumberPressed(msg))
{
// Open Frequency input screen
@ -765,6 +767,12 @@ void ui_updateFSM(event_t event, bool *sync_rtx)
new_rx_frequency = _ui_freq_add_digit(new_rx_frequency,
input_position, input_number);
}
else if(msg.keys & KEY_MONI)
{
// Open Macro Menu
_ui_drawDarkOverlay();
state.ui_screen = MENU_MACRO;
}
break;
// VFO frequency input screen
case VFO_INPUT:
@ -928,12 +936,18 @@ void ui_updateFSM(event_t event, bool *sync_rtx)
// Reset menu selection
menu_selected = 0;
}
else if(msg.keys & KEY_MONI)
{
// Open Macro Menu
_ui_drawDarkOverlay();
state.ui_screen = MENU_MACRO;
}
break;
// Macro menu
case MENU_MACRO:
// Exit from this menu when monitor key is released
if(!(msg.keys & KEY_MONI))
state.ui_screen = MAIN_VFO;
state.ui_screen = VFO_MAIN;
break;
// Settings menu screen
case MENU_SETTINGS:
@ -1041,7 +1055,7 @@ void ui_updateGUI(state_t last_state)
break;
// Macro menu
case MENU_MACRO:
screen_update = _ui_drawMenuMacro();
_ui_drawMenuMacro();
break;
// Settings menu screen
case MENU_SETTINGS: