Moved menuItems from ui.h to ui.c
This commit is contained in:
parent
2251354288
commit
7273c084ca
|
|
@ -42,15 +42,6 @@ enum uiScreen
|
||||||
MENU_SETTINGS
|
MENU_SETTINGS
|
||||||
};
|
};
|
||||||
|
|
||||||
const char menuItems[MENU_NUM][MENU_LEN] = {
|
|
||||||
"Zone",
|
|
||||||
"Channels",
|
|
||||||
"Contacts",
|
|
||||||
"Messages",
|
|
||||||
"GPS",
|
|
||||||
"Settings"
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function initialises the User Interface, starting the
|
* This function initialises the User Interface, starting the
|
||||||
* Finite State Machine describing the user interaction.
|
* Finite State Machine describing the user interaction.
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,17 @@
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <hwconfig.h>
|
#include <hwconfig.h>
|
||||||
|
|
||||||
|
const char *menuItems[MENU_NUM] =
|
||||||
|
{
|
||||||
|
"Zone",
|
||||||
|
"Channels",
|
||||||
|
"Contacts",
|
||||||
|
"Messages",
|
||||||
|
"GPS",
|
||||||
|
"Settings"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef struct layout_t
|
typedef struct layout_t
|
||||||
{
|
{
|
||||||
uint16_t top_h;
|
uint16_t top_h;
|
||||||
|
|
@ -291,7 +302,7 @@ bool _ui_drawMenuTop()
|
||||||
char entry_buf[MENU_LEN] = "";
|
char entry_buf[MENU_LEN] = "";
|
||||||
for(int item=0; (item < MENU_NUM) && (pos.y < SCREEN_HEIGHT); item++)
|
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,
|
gfx_print(pos, entry_buf, layout.line1_font,
|
||||||
TEXT_ALIGN_LEFT, color_white);
|
TEXT_ALIGN_LEFT, color_white);
|
||||||
pos.y += layout.line1_h;
|
pos.y += layout.line1_h;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue