[Horus] Column names are back + A small description in the status bar ...
This commit is contained in:
@@ -91,7 +91,7 @@ bool menuModelFlightModesAll(evt_t event)
|
||||
}
|
||||
|
||||
if (sub<MAX_FLIGHT_MODES && posHorz>=0) {
|
||||
drawColumnHeader(STR_PHASES_HEADERS, posHorz);
|
||||
drawColumnHeader(STR_PHASES_HEADERS, NULL, posHorz);
|
||||
}
|
||||
|
||||
for (int i=0; i<NUM_BODY_LINES; i++) {
|
||||
|
||||
@@ -103,7 +103,7 @@ bool menuModelLimits(evt_t event)
|
||||
uint32_t sub = menuVerticalPosition;
|
||||
|
||||
if (sub<NUM_CHNOUT && menuHorizontalPosition>=0) {
|
||||
drawColumnHeader(STR_LIMITS_HEADERS, menuHorizontalPosition);
|
||||
drawColumnHeader(STR_LIMITS_HEADERS, NULL, menuHorizontalPosition);
|
||||
}
|
||||
|
||||
if (warningResult) {
|
||||
|
||||
@@ -84,7 +84,7 @@ bool menuModelLogicalSwitches(evt_t event)
|
||||
int horz = menuHorizontalPosition;
|
||||
|
||||
if (sub>= 0 && horz>=0) {
|
||||
drawColumnHeader(STR_CSW_HEADERS, horz);
|
||||
drawColumnHeader(STR_LSW_HEADERS, STR_LSW_DESCRIPTIONS, horz);
|
||||
}
|
||||
|
||||
if (horz<0 && event==EVT_KEY_LONG(KEY_ENTER) && !READ_ONLY()) {
|
||||
|
||||
@@ -21,9 +21,17 @@
|
||||
#include "opentx.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void drawColumnHeader(const char * const * headers, uint8_t index)
|
||||
void drawStatusText(const char * text)
|
||||
{
|
||||
// TODO ? displayHeader(headers[index]);
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, MENU_FOOTER_TOP, text, MENU_TITLE_COLOR); // TODO dedicated theme color
|
||||
}
|
||||
|
||||
void drawColumnHeader(const char * const * headers, const char * const * descriptions, uint8_t index)
|
||||
{
|
||||
lcdDrawText(LCD_W, MENU_TITLE_TOP + 2, headers[index], RIGHT | SMLSIZE | MENU_TITLE_COLOR);
|
||||
if (descriptions) {
|
||||
drawStatusText(descriptions[index]);
|
||||
}
|
||||
}
|
||||
|
||||
#include "alpha_stick_background.lbm"
|
||||
@@ -142,7 +150,7 @@ void drawMenuTemplate(const char * title, uint8_t icon, const uint8_t * icons, u
|
||||
lcdDrawSolidFilledRect(0, MENU_HEADER_HEIGHT, LCD_W, MENU_TITLE_TOP - MENU_HEADER_HEIGHT, TEXT_BGCOLOR);
|
||||
lcdDrawSolidFilledRect(0, MENU_TITLE_TOP, LCD_W, MENU_TITLE_HEIGHT, TITLE_BGCOLOR);
|
||||
if (title) {
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, MENU_TITLE_TOP+2, title, MENU_TITLE_COLOR);
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, MENU_TITLE_TOP+1, title, MENU_TITLE_COLOR);
|
||||
}
|
||||
if (icons) {
|
||||
for (int i=0; i<menuPageCount; i++) {
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _WIDGETS_H_
|
||||
#define _WIDGETS_H_
|
||||
#ifndef _WIDGETS_H_
|
||||
#define _WIDGETS_H_
|
||||
|
||||
#include "opentx.h"
|
||||
#include <stdio.h>
|
||||
@@ -39,8 +39,8 @@
|
||||
#define OPTION_SLIDER_NUMBER_BUTTON 0x100
|
||||
#define OPTION_SLIDER_SQUARE_BUTTON 0x200
|
||||
|
||||
|
||||
void drawColumnHeader(const char * const * headers, uint8_t index);
|
||||
void drawStatusText(const char * text);
|
||||
void drawColumnHeader(const char * const * headers, const char * const * descriptions, uint8_t index);
|
||||
void drawTopbarDatetime();
|
||||
void drawStick(coord_t x, coord_t y, int16_t xval, int16_t yval);
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ void menuModelLogicalSwitches(uint8_t event)
|
||||
horzpos_t horz = menuHorizontalPosition;
|
||||
|
||||
if (horz>=0) {
|
||||
drawColumnHeader(STR_CSW_HEADERS, horz);
|
||||
drawColumnHeader(STR_LSW_HEADERS, horz);
|
||||
}
|
||||
|
||||
if (horz<0 && event==EVT_KEY_LONG(KEY_ENTER) && !READ_ONLY()) {
|
||||
|
||||
Reference in New Issue
Block a user