Moved menuItems from ui.h to ui.c

replace/5ba52c7a01b95d5015cd6b0eda636f508d377a44
Silvano Seva 2020-12-06 21:45:10 +01:00 zatwierdzone przez Federico Amedeo Izzo
rodzic 2251354288
commit 7273c084ca
2 zmienionych plików z 12 dodań i 10 usunięć

Wyświetl plik

@ -42,15 +42,6 @@ enum uiScreen
MENU_SETTINGS
};
const char menuItems[MENU_NUM][MENU_LEN] = {
"Zone",
"Channels",
"Contacts",
"Messages",
"GPS",
"Settings"
};
/**
* This function initialises the User Interface, starting the
* Finite State Machine describing the user interaction.

Wyświetl plik

@ -72,6 +72,17 @@
#include <platform.h>
#include <hwconfig.h>
const char *menuItems[MENU_NUM] =
{
"Zone",
"Channels",
"Contacts",
"Messages",
"GPS",
"Settings"
};
typedef struct layout_t
{
uint16_t top_h;
@ -291,7 +302,7 @@ bool _ui_drawMenuTop()
char entry_buf[MENU_LEN] = "";
for(int item=0; (item < MENU_NUM) && (pos.y < SCREEN_HEIGHT); item++)
{
snprintf(entry_buf, sizeof(entry_buf), "%s", menuItems[item][0]);
snprintf(entry_buf, sizeof(entry_buf), "%s", menuItems[item]);
gfx_print(pos, entry_buf, layout.line1_font,
TEXT_ALIGN_LEFT, color_white);
pos.y += layout.line1_h;