not need display menu on keyboard input (so add really full screen keyboard)

move size definitions to header
pull/4/head
DiSlord 6 years ago
parent 6833ea601a
commit 588c69442f

@ -321,7 +321,7 @@ extern uint16_t _grid_y;
#define MENU_FORM_WIDTH 256 #define MENU_FORM_WIDTH 256
// Num Input height at bottom // Num Input height at bottom
#define NUM_INPUT_HEIGHT 30 #define NUM_INPUT_HEIGHT 32
extern int16_t area_width; extern int16_t area_width;
extern int16_t area_height; extern int16_t area_height;
@ -346,6 +346,20 @@ extern const uint16_t numfont16x22[];
#define NUM_FONT_GET_WIDTH 16 #define NUM_FONT_GET_WIDTH 16
#define NUM_FONT_GET_HEIGHT 22 #define NUM_FONT_GET_HEIGHT 22
#if 1
#define KP_WIDTH ((LCD_WIDTH) / 4)// numeric keypad button width
#define KP_HEIGHT ((LCD_HEIGHT - NUM_INPUT_HEIGHT) / 4) // numeric keypad button height
// Key x, y position (0 - 15) on screen
#define KP_GET_X(posx) ((posx) * KP_WIDTH) // numeric keypad left
#define KP_GET_Y(posy) ((posy) * KP_HEIGHT) // numeric keypad top
#else
#define KP_WIDTH (LCD_HEIGHT/5)
#define KP_HEIGHT (LCD_HEIGHT/5)
// Key x, y position (0 - 15) on screen
#define KP_GET_X(posx) ((posx)*KP_WIDTH + (LCD_WIDTH-MENU_BUTTON_WIDTH-5-KP_WIDTH*4))
#define KP_GET_Y(posy) ((posy)*KP_HEIGHT + 12 )
#endif
#define S_DELTA "\004" #define S_DELTA "\004"
#define S_DEGREE "\037" #define S_DEGREE "\037"
#define S_SARROW "\030" #define S_SARROW "\030"

14
ui.c

@ -1277,20 +1277,6 @@ menu_invoke(int item)
} }
} }
#if 1
#define KP_WIDTH ((LCD_WIDTH - MENU_BUTTON_WIDTH) / 4)// numeric keypad button width
#define KP_HEIGHT ((LCD_HEIGHT - NUM_INPUT_HEIGHT) / 4) // numeric keypad button height
// Key x, y position (0 - 15) on screen
#define KP_GET_X(posx) ((posx) * KP_WIDTH) // numeric keypad left
#define KP_GET_Y(posy) ((posy) * KP_HEIGHT) // numeric keypad top
#else
#define KP_WIDTH (LCD_HEIGHT/5)
#define KP_HEIGHT (LCD_HEIGHT/5)
// Key x, y position (0 - 15) on screen
#define KP_GET_X(posx) ((posx)*KP_WIDTH + (LCD_WIDTH-MENU_BUTTON_WIDTH-5-KP_WIDTH*4))
#define KP_GET_Y(posy) ((posy)*KP_HEIGHT + 12 )
#endif
#ifdef __VNA__ #ifdef __VNA__
// Key names // Key names
#define KP_0 0 #define KP_0 0

Loading…
Cancel
Save

Powered by TurnKey Linux.