Menus can now have a title and a Cancel button
This commit is contained in:
@@ -152,7 +152,7 @@ configure_file(${COMPANION_SRC_DIRECTORY}/translations.qrc.in ${TRANSLATIONS_QRC
|
|||||||
|
|
||||||
### Add optional "translations" target for updating .ts files
|
### Add optional "translations" target for updating .ts files
|
||||||
if(QT_LUPDATE_EXECUTABLE)
|
if(QT_LUPDATE_EXECUTABLE)
|
||||||
add_custom_target(translations
|
add_custom_target(companion_translations
|
||||||
WORKING_DIRECTORY ${COMPANION_SRC_DIRECTORY}
|
WORKING_DIRECTORY ${COMPANION_SRC_DIRECTORY}
|
||||||
COMMAND ${QT_LUPDATE_EXECUTABLE} ${CMAKE_SOURCE_DIR} -no-obsolete -ts ${companion_TS}
|
COMMAND ${QT_LUPDATE_EXECUTABLE} ${CMAKE_SOURCE_DIR} -no-obsolete -ts ${companion_TS}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -199,8 +199,8 @@ void drawValueOrGVar(BitmapBuffer * dc, coord_t x, coord_t y, gvar_t value, gvar
|
|||||||
|
|
||||||
void drawSleepBitmap()
|
void drawSleepBitmap()
|
||||||
{
|
{
|
||||||
lcd->setOffset(0, 0);
|
lcdNextLayer();
|
||||||
lcd->clearClippingRect();
|
lcd->reset();
|
||||||
lcd->clear();
|
lcd->clear();
|
||||||
|
|
||||||
const BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(static_cast<ThemeBase *>(theme)->getFilePath("sleep.bmp"));
|
const BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(static_cast<ThemeBase *>(theme)->getFilePath("sleep.bmp"));
|
||||||
@@ -218,28 +218,24 @@ void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char
|
|||||||
if (totalDuration == 0)
|
if (totalDuration == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
static uint32_t lastDuration = 0xffffffff;
|
|
||||||
static const BitmapBuffer * shutdown = BitmapBuffer::loadBitmap(static_cast<ThemeBase *>(theme)->getFilePath("shutdown.bmp"));
|
static const BitmapBuffer * shutdown = BitmapBuffer::loadBitmap(static_cast<ThemeBase *>(theme)->getFilePath("shutdown.bmp"));
|
||||||
|
|
||||||
|
lcdNextLayer();
|
||||||
|
lcd->reset();
|
||||||
|
|
||||||
if (shutdown) {
|
if (shutdown) {
|
||||||
if (duration < lastDuration) {
|
static_cast<ThemeBase *>(theme)->drawBackground(lcd);
|
||||||
static_cast<ThemeBase *>(theme)->drawBackground(lcd);
|
lcd->drawBitmap((LCD_W - shutdown->width()) / 2, (LCD_H - shutdown->height()) / 2, shutdown);
|
||||||
lcd->drawBitmap((LCD_W-shutdown->width())/2, (LCD_H-shutdown->height())/2, shutdown);
|
int quarter = duration / (totalDuration / 5);
|
||||||
lcdStoreBackupBuffer();
|
if (quarter >= 1) lcd->drawBitmapPattern(LCD_W/2, (LCD_H-SHUTDOWN_CIRCLE_DIAMETER)/2, LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, 0, SHUTDOWN_CIRCLE_DIAMETER/2);
|
||||||
}
|
if (quarter >= 2) lcd->drawBitmapPattern(LCD_W/2, LCD_H/2, LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, SHUTDOWN_CIRCLE_DIAMETER/2, SHUTDOWN_CIRCLE_DIAMETER/2);
|
||||||
else {
|
if (quarter >= 3) lcd->drawBitmapPattern((LCD_W-SHUTDOWN_CIRCLE_DIAMETER)/2, LCD_H/2, LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, SHUTDOWN_CIRCLE_DIAMETER, SHUTDOWN_CIRCLE_DIAMETER/2);
|
||||||
lcdRestoreBackupBuffer();
|
if (quarter >= 4) lcd->drawBitmapPattern((LCD_W-SHUTDOWN_CIRCLE_DIAMETER)/2, (LCD_H-SHUTDOWN_CIRCLE_DIAMETER)/2, LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, SHUTDOWN_CIRCLE_DIAMETER*3/2, SHUTDOWN_CIRCLE_DIAMETER/2);
|
||||||
int quarter = duration / (totalDuration / 5);
|
|
||||||
if (quarter >= 1) lcd->drawBitmapPattern(LCD_W/2, (LCD_H-SHUTDOWN_CIRCLE_DIAMETER)/2, LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, 0, SHUTDOWN_CIRCLE_DIAMETER/2);
|
|
||||||
if (quarter >= 2) lcd->drawBitmapPattern(LCD_W/2, LCD_H/2, LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, SHUTDOWN_CIRCLE_DIAMETER/2, SHUTDOWN_CIRCLE_DIAMETER/2);
|
|
||||||
if (quarter >= 3) lcd->drawBitmapPattern((LCD_W-SHUTDOWN_CIRCLE_DIAMETER)/2, LCD_H/2, LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, SHUTDOWN_CIRCLE_DIAMETER, SHUTDOWN_CIRCLE_DIAMETER/2);
|
|
||||||
if (quarter >= 4) lcd->drawBitmapPattern((LCD_W-SHUTDOWN_CIRCLE_DIAMETER)/2, (LCD_H-SHUTDOWN_CIRCLE_DIAMETER)/2, LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, SHUTDOWN_CIRCLE_DIAMETER*3/2, SHUTDOWN_CIRCLE_DIAMETER/2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
lcd->clear();
|
lcd->clear();
|
||||||
int quarter = duration / (totalDuration / 5);
|
int quarter = duration / (totalDuration / 5);
|
||||||
for (int i=1; i<=4; i++) {
|
for (int i = 1; i <= 4; i++) {
|
||||||
if (quarter >= i) {
|
if (quarter >= i) {
|
||||||
lcd->drawSolidFilledRect(LCD_W / 2 - 70 + 24 * i, LCD_H / 2 - 10, 20, 20, DEFAULT_BGCOLOR);
|
lcd->drawSolidFilledRect(LCD_W / 2 - 70 + 24 * i, LCD_H / 2 - 10, 20, 20, DEFAULT_BGCOLOR);
|
||||||
}
|
}
|
||||||
@@ -247,7 +243,6 @@ void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char
|
|||||||
}
|
}
|
||||||
|
|
||||||
lcdRefresh();
|
lcdRefresh();
|
||||||
lastDuration = duration;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawCurveRef(BitmapBuffer * dc, coord_t x, coord_t y, const CurveRef & curve, LcdFlags flags)
|
void drawCurveRef(BitmapBuffer * dc, coord_t x, coord_t y, const CurveRef & curve, LcdFlags flags)
|
||||||
@@ -335,33 +330,33 @@ void drawDate(BitmapBuffer * dc, coord_t x, coord_t y, TelemetryItem & telemetry
|
|||||||
if (att & FONT(XL)) {
|
if (att & FONT(XL)) {
|
||||||
x -= 42;
|
x -= 42;
|
||||||
att &= ~FONT_MASK;
|
att &= ~FONT_MASK;
|
||||||
dc->drawNumber(x, y, telemetryItem.datetime.day, att|LEADING0|LEFT, 2);
|
x = dc->drawNumber(x, y, telemetryItem.datetime.day, att|LEADING0|LEFT, 2);
|
||||||
dc->drawText(lcdNextPos-1, y, "-", att);
|
x = dc->drawText(x - 1, y, "-", att);
|
||||||
dc->drawNumber(lcdNextPos-1, y, telemetryItem.datetime.month, att|LEFT, 2);
|
x = dc->drawNumber(x - 1, y, telemetryItem.datetime.month, att|LEFT, 2);
|
||||||
dc->drawText(lcdNextPos-1, y, "-", att);
|
x = dc->drawText(x - 1, y, "-", att);
|
||||||
dc->drawNumber(lcdNextPos-1, y, telemetryItem.datetime.year-2000, att|LEFT);
|
x = dc->drawNumber(x - 1, y, telemetryItem.datetime.year-2000, att|LEFT);
|
||||||
y += FH;
|
y += FH;
|
||||||
dc->drawNumber(x, y, telemetryItem.datetime.hour, att|LEADING0|LEFT, 2);
|
/* TODO dc->drawNumber(x, y, telemetryItem.datetime.hour, att|LEADING0|LEFT, 2);
|
||||||
dc->drawText(lcdNextPos, y, ":", att);
|
dc->drawText(lcdNextPos, y, ":", att);
|
||||||
dc->drawNumber(lcdNextPos, y, telemetryItem.datetime.min, att|LEADING0|LEFT, 2);
|
dc->drawNumber(lcdNextPos, y, telemetryItem.datetime.min, att|LEADING0|LEFT, 2);
|
||||||
dc->drawText(lcdNextPos, y, ":", att);
|
dc->drawText(lcdNextPos, y, ":", att);
|
||||||
dc->drawNumber(lcdNextPos, y, telemetryItem.datetime.sec, att|LEADING0|LEFT, 2);
|
dc->drawNumber(lcdNextPos, y, telemetryItem.datetime.sec, att|LEADING0|LEFT, 2); */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dc->drawNumber(x, y, telemetryItem.datetime.day, att|LEADING0|LEFT, 2);
|
x = dc->drawNumber(x, y, telemetryItem.datetime.day, att|LEADING0|LEFT, 2);
|
||||||
dc->drawText(lcdNextPos-1, y, "-", att);
|
x = dc->drawText(x - 1, y, "-", att);
|
||||||
dc->drawNumber(lcdNextPos, y, telemetryItem.datetime.month, att|LEFT, 2);
|
x = dc->drawNumber(x, y, telemetryItem.datetime.month, att|LEFT, 2);
|
||||||
dc->drawText(lcdNextPos-1, y, "-", att);
|
x = dc->drawText(x - 1, y, "-", att);
|
||||||
dc->drawNumber(lcdNextPos, y, telemetryItem.datetime.year-2000, att|LEFT);
|
x = dc->drawNumber(x, y, telemetryItem.datetime.year-2000, att|LEFT);
|
||||||
dc->drawNumber(lcdNextPos+11, y, telemetryItem.datetime.hour, att|LEADING0|LEFT, 2);
|
x = dc->drawNumber(x + 11, y, telemetryItem.datetime.hour, att|LEADING0|LEFT, 2);
|
||||||
dc->drawText(lcdNextPos, y, ":", att);
|
x = dc->drawText(x, y, ":", att);
|
||||||
dc->drawNumber(lcdNextPos, y, telemetryItem.datetime.min, att|LEADING0|LEFT, 2);
|
x = dc->drawNumber(x, y, telemetryItem.datetime.min, att|LEADING0|LEFT, 2);
|
||||||
dc->drawText(lcdNextPos, y, ":", att);
|
x = dc->drawText(x, y, ":", att);
|
||||||
dc->drawNumber(lcdNextPos, y, telemetryItem.datetime.sec, att|LEADING0|LEFT, 2);
|
dc->drawNumber(x, y, telemetryItem.datetime.sec, att|LEADING0|LEFT, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawGPSCoord(BitmapBuffer * dc, coord_t x, coord_t y, int32_t value, const char * direction, LcdFlags flags, bool seconds=true)
|
coord_t drawGPSCoord(BitmapBuffer * dc, coord_t x, coord_t y, int32_t value, const char * direction, LcdFlags flags, bool seconds=true)
|
||||||
{
|
{
|
||||||
char s[32];
|
char s[32];
|
||||||
uint32_t absvalue = abs(value);
|
uint32_t absvalue = abs(value);
|
||||||
@@ -391,6 +386,7 @@ void drawGPSCoord(BitmapBuffer * dc, coord_t x, coord_t y, int32_t value, const
|
|||||||
*tmp++ = direction[value>=0 ? 0 : 1];
|
*tmp++ = direction[value>=0 ? 0 : 1];
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
dc->drawText(x, y, s, flags);
|
dc->drawText(x, y, s, flags);
|
||||||
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawGPSPosition(BitmapBuffer * dc, coord_t x, coord_t y, int32_t longitude, int32_t latitude, LcdFlags flags)
|
void drawGPSPosition(BitmapBuffer * dc, coord_t x, coord_t y, int32_t longitude, int32_t latitude, LcdFlags flags)
|
||||||
@@ -400,8 +396,8 @@ void drawGPSPosition(BitmapBuffer * dc, coord_t x, coord_t y, int32_t longitude,
|
|||||||
drawGPSCoord(dc, x, y + FH, longitude, "EW", flags, true);
|
drawGPSCoord(dc, x, y + FH, longitude, "EW", flags, true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
drawGPSCoord(dc, x, y, latitude, "NS", flags, false);
|
x = drawGPSCoord(dc, x, y, latitude, "NS", flags, false);
|
||||||
drawGPSCoord(dc, lcdNextPos+5, y, longitude, "EW", flags, false);
|
drawGPSCoord(dc, x + 5, y, longitude, "EW", flags, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,15 +18,12 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "lcd.h"
|
||||||
#include "strhelpers.h"
|
|
||||||
|
|
||||||
#if defined(SIMU)
|
#if defined(SIMU)
|
||||||
pixel_t displayBuf[DISPLAY_BUFFER_SIZE];
|
pixel_t displayBuf[DISPLAY_BUFFER_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
coord_t lcdNextPos;
|
|
||||||
|
|
||||||
uint8_t getMappedChar(uint8_t c)
|
uint8_t getMappedChar(uint8_t c)
|
||||||
{
|
{
|
||||||
uint8_t result;
|
uint8_t result;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class PageHeader: public FormGroup {
|
|||||||
public:
|
public:
|
||||||
PageHeader(Page * parent, uint8_t icon);
|
PageHeader(Page * parent, uint8_t icon);
|
||||||
|
|
||||||
~PageHeader();
|
~PageHeader() override;
|
||||||
|
|
||||||
void paint(BitmapBuffer * dc) override;
|
void paint(BitmapBuffer * dc) override;
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class MultiPosCalibrationWindow: public Window {
|
|||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void paint(BitmapBuffer * dc)
|
void paint(BitmapBuffer * dc) override
|
||||||
{
|
{
|
||||||
drawHorizontalSlider(dc, 5, 8, rect.w - 18, 1 + (potsPos[potIndex] & 0x0f), 1, XPOTS_MULTIPOS_COUNT+1, XPOTS_MULTIPOS_COUNT, OPTION_SLIDER_TICKS | OPTION_SLIDER_BIG_TICKS | OPTION_SLIDER_NUMBER_BUTTON);
|
drawHorizontalSlider(dc, 5, 8, rect.w - 18, 1 + (potsPos[potIndex] & 0x0f), 1, XPOTS_MULTIPOS_COUNT+1, XPOTS_MULTIPOS_COUNT, OPTION_SLIDER_TICKS | OPTION_SLIDER_BIG_TICKS | OPTION_SLIDER_NUMBER_BUTTON);
|
||||||
}
|
}
|
||||||
@@ -104,6 +104,7 @@ RadioCalibrationPage::RadioCalibrationPage(bool initial):
|
|||||||
{
|
{
|
||||||
buildHeader(&header);
|
buildHeader(&header);
|
||||||
buildBody(&body);
|
buildBody(&body);
|
||||||
|
setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioCalibrationPage::buildHeader(Window * window)
|
void RadioCalibrationPage::buildHeader(Window * window)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class SpectrumWindow : public Window
|
|||||||
coord_t peak_y = 1;
|
coord_t peak_y = 1;
|
||||||
coord_t peak_x = 0;
|
coord_t peak_x = 0;
|
||||||
for (coord_t i = 0; i < LCD_W; i++) {
|
for (coord_t i = 0; i < LCD_W; i++) {
|
||||||
coord_t h = min<coord_t >(reusableBuffer.spectrumAnalyser.bars[i], SPECTRUM_HEIGHT);
|
auto h = min<coord_t >(reusableBuffer.spectrumAnalyser.bars[i], SPECTRUM_HEIGHT);
|
||||||
if (h > peak_y) {
|
if (h > peak_y) {
|
||||||
peak_x = i;
|
peak_x = i;
|
||||||
peak_y = h;
|
peak_y = h;
|
||||||
@@ -49,9 +49,9 @@ class SpectrumWindow : public Window
|
|||||||
dc->drawVerticalLine(i, SPECTRUM_HEIGHT - h, h, SOLID, 0);
|
dc->drawVerticalLine(i, SPECTRUM_HEIGHT - h, h, SOLID, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
coord_t y = max<coord_t>(FH, SPECTRUM_HEIGHT - peak_y - FH);
|
auto y = max<coord_t>(FH, SPECTRUM_HEIGHT - peak_y - FH);
|
||||||
dc->drawNumber(min<coord_t>(100, peak_x), y, ((reusableBuffer.spectrumAnalyser.freq - reusableBuffer.spectrumAnalyser.span / 2) + peak_x * (reusableBuffer.spectrumAnalyser.span / 128)) / 1000000, FONT(XXS));
|
auto x = dc->drawNumber(min<coord_t>(100, peak_x), y, ((reusableBuffer.spectrumAnalyser.freq - reusableBuffer.spectrumAnalyser.span / 2) + peak_x * (reusableBuffer.spectrumAnalyser.span / 128)) / 1000000, FONT(XXS));
|
||||||
dc->drawText(lcdNextPos, y, "M", FONT(XXS));
|
dc->drawText(x, y, "M", FONT(XXS));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -63,7 +63,7 @@ RadioSpectrumAnalyser::RadioSpectrumAnalyser(uint8_t moduleIdx) :
|
|||||||
moduleIdx(moduleIdx)
|
moduleIdx(moduleIdx)
|
||||||
{
|
{
|
||||||
buildBody(&body);
|
buildBody(&body);
|
||||||
|
setFocus();
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ bool isRadioScriptTool(const char * filename)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RadioToolsPage::RadioToolsPage() :
|
RadioToolsPage::RadioToolsPage():
|
||||||
PageTab(STR_MENUTOOLS, ICON_RADIO_TOOLS)
|
PageTab(STR_MENUTOOLS, ICON_RADIO_TOOLS)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -122,6 +122,7 @@ void RadioToolsPage::rebuild(FormWindow * window)
|
|||||||
grid.setLabelWidth(100);
|
grid.setLabelWidth(100);
|
||||||
|
|
||||||
window->clear();
|
window->clear();
|
||||||
|
Window::clearFocus();
|
||||||
|
|
||||||
// LUA scripts in TOOLS
|
// LUA scripts in TOOLS
|
||||||
#if defined(LUA) || defined(DEBUG)
|
#if defined(LUA) || defined(DEBUG)
|
||||||
|
|||||||
@@ -971,7 +971,7 @@ void checkThrottleStick()
|
|||||||
{
|
{
|
||||||
if (isThrottleWarningAlertNeeded()) {
|
if (isThrottleWarningAlertNeeded()) {
|
||||||
AUDIO_ERROR_MESSAGE(AU_THROTTLE_ALERT);
|
AUDIO_ERROR_MESSAGE(AU_THROTTLE_ALERT);
|
||||||
auto dialog = new FullScreenDialog(WARNING_TYPE_ALERT, STR_THROTTLE_WARNING, STR_THROTTLE_NOT_IDLE, STR_PRESS_ANY_KEY_TO_SKIP);
|
auto dialog = new FullScreenDialog(WARNING_TYPE_ALERT, TR_THROTTLE_UPPERCASE, STR_THROTTLE_NOT_IDLE, STR_PRESS_ANY_KEY_TO_SKIP);
|
||||||
dialog->setCloseCondition([]() {
|
dialog->setCloseCondition([]() {
|
||||||
return !isThrottleWarningAlertNeeded();
|
return !isThrottleWarningAlertNeeded();
|
||||||
});
|
});
|
||||||
@@ -1050,7 +1050,7 @@ void alert(const char * title, const char * msg , uint8_t sound)
|
|||||||
bool refresh = false;
|
bool refresh = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (1) {
|
while (true) {
|
||||||
RTOS_WAIT_MS(10);
|
RTOS_WAIT_MS(10);
|
||||||
|
|
||||||
if (getEvent()) // wait for key release
|
if (getEvent()) // wait for key release
|
||||||
@@ -2117,10 +2117,11 @@ uint32_t pwrCheck()
|
|||||||
}
|
}
|
||||||
if (get_tmr10ms() - pwr_press_time > PWR_PRESS_SHUTDOWN_DELAY()) {
|
if (get_tmr10ms() - pwr_press_time > PWR_PRESS_SHUTDOWN_DELAY()) {
|
||||||
#if defined(SHUTDOWN_CONFIRMATION)
|
#if defined(SHUTDOWN_CONFIRMATION)
|
||||||
while (1) {
|
while (1)
|
||||||
#else
|
#else
|
||||||
while ((TELEMETRY_STREAMING() && !g_eeGeneral.disableRssiPoweroffAlarm)) {
|
while ((TELEMETRY_STREAMING() && !g_eeGeneral.disableRssiPoweroffAlarm))
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
|
||||||
#if !defined(COLORLCD)
|
#if !defined(COLORLCD)
|
||||||
lcdRefreshWait();
|
lcdRefreshWait();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#ifndef _STRHELPERS_H_
|
#ifndef _STRHELPERS_H_
|
||||||
#define _STRHELPERS_H_
|
#define _STRHELPERS_H_
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include "opentx_types.h"
|
||||||
|
|
||||||
char * strAppend(char * dest, const char * source, int len=0);
|
char * strAppend(char * dest, const char * source, int len=0);
|
||||||
char * strAppendUnsigned(char * dest, uint32_t value, uint8_t digits=0, uint8_t radix=10);
|
char * strAppendUnsigned(char * dest, uint32_t value, uint8_t digits=0, uint8_t radix=10);
|
||||||
|
|||||||
@@ -100,14 +100,17 @@ enum LcdColorIndex
|
|||||||
FOCUS_BGCOLOR_INDEX,
|
FOCUS_BGCOLOR_INDEX,
|
||||||
TEXT_STATUSBAR_COLOR_INDEX,
|
TEXT_STATUSBAR_COLOR_INDEX,
|
||||||
LINE_COLOR_INDEX,
|
LINE_COLOR_INDEX,
|
||||||
|
MENU_LINE_COLOR_INDEX = LINE_COLOR_INDEX,
|
||||||
CHECKBOX_COLOR_INDEX,
|
CHECKBOX_COLOR_INDEX,
|
||||||
SCROLLBAR_COLOR_INDEX,
|
SCROLLBAR_COLOR_INDEX,
|
||||||
MENU_BGCOLOR_INDEX,
|
MENU_BGCOLOR_INDEX,
|
||||||
|
MENU_HIGHLIGHT_BGCOLOR_INDEX = MENU_BGCOLOR_INDEX,
|
||||||
MENU_COLOR_INDEX,
|
MENU_COLOR_INDEX,
|
||||||
MENU_TITLE_DISABLE_COLOR_INDEX,
|
MENU_TITLE_DISABLE_COLOR_INDEX,
|
||||||
HEADER_COLOR_INDEX,
|
HEADER_COLOR_INDEX,
|
||||||
ALARM_COLOR_INDEX,
|
ALARM_COLOR_INDEX,
|
||||||
HIGHLIGHT_COLOR_INDEX,
|
HIGHLIGHT_COLOR_INDEX,
|
||||||
|
MENU_HIGHLIGHT_COLOR_INDEX = HIGHLIGHT_COLOR_INDEX,
|
||||||
TEXT_DISABLE_COLOR_INDEX,
|
TEXT_DISABLE_COLOR_INDEX,
|
||||||
DISABLE_COLOR_INDEX,
|
DISABLE_COLOR_INDEX,
|
||||||
CURVE_COLOR_INDEX,
|
CURVE_COLOR_INDEX,
|
||||||
@@ -150,7 +153,12 @@ constexpr coord_t INPUT_EDIT_CURVE_HEIGHT = LCD_H - MENU_HEADER_HEIGHT;
|
|||||||
constexpr coord_t INPUT_EDIT_CURVE_LEFT = LCD_W - 158;
|
constexpr coord_t INPUT_EDIT_CURVE_LEFT = LCD_W - 158;
|
||||||
constexpr coord_t INPUT_EDIT_CURVE_TOP = MENU_HEADER_HEIGHT;
|
constexpr coord_t INPUT_EDIT_CURVE_TOP = MENU_HEADER_HEIGHT;
|
||||||
constexpr coord_t MENUS_LINE_HEIGHT = 30;
|
constexpr coord_t MENUS_LINE_HEIGHT = 30;
|
||||||
constexpr uint8_t MENUS_MAX_LINES = 7;
|
constexpr coord_t MENUS_WIDTH = 200;
|
||||||
|
constexpr coord_t MENUS_OFFSET_TOP = 20;
|
||||||
|
constexpr coord_t MENUS_HEADER_HEIGHT = 30;
|
||||||
|
constexpr coord_t MENUS_FOOTER_HEIGHT = 0;
|
||||||
|
constexpr coord_t MENUS_MIN_HEIGHT = 2 * MENUS_LINE_HEIGHT - 1;
|
||||||
|
constexpr coord_t MENUS_MAX_HEIGHT = 7 * MENUS_LINE_HEIGHT - 1;
|
||||||
|
|
||||||
constexpr int CJK_FIRST_LETTER_INDEX = 187;
|
constexpr int CJK_FIRST_LETTER_INDEX = 187;
|
||||||
|
|
||||||
|
|||||||
@@ -98,14 +98,17 @@ enum LcdColorIndex
|
|||||||
FOCUS_BGCOLOR_INDEX,
|
FOCUS_BGCOLOR_INDEX,
|
||||||
TEXT_STATUSBAR_COLOR_INDEX,
|
TEXT_STATUSBAR_COLOR_INDEX,
|
||||||
LINE_COLOR_INDEX,
|
LINE_COLOR_INDEX,
|
||||||
|
MENU_LINE_COLOR_INDEX = LINE_COLOR_INDEX,
|
||||||
CHECKBOX_COLOR_INDEX,
|
CHECKBOX_COLOR_INDEX,
|
||||||
SCROLLBAR_COLOR_INDEX,
|
SCROLLBAR_COLOR_INDEX,
|
||||||
MENU_BGCOLOR_INDEX,
|
MENU_BGCOLOR_INDEX,
|
||||||
|
MENU_HIGHLIGHT_BGCOLOR_INDEX = MENU_BGCOLOR_INDEX,
|
||||||
MENU_COLOR_INDEX,
|
MENU_COLOR_INDEX,
|
||||||
MENU_TITLE_DISABLE_COLOR_INDEX,
|
MENU_TITLE_DISABLE_COLOR_INDEX,
|
||||||
HEADER_COLOR_INDEX,
|
HEADER_COLOR_INDEX,
|
||||||
ALARM_COLOR_INDEX,
|
ALARM_COLOR_INDEX,
|
||||||
HIGHLIGHT_COLOR_INDEX,
|
HIGHLIGHT_COLOR_INDEX,
|
||||||
|
MENU_HIGHLIGHT_COLOR_INDEX = HIGHLIGHT_COLOR_INDEX,
|
||||||
TEXT_DISABLE_COLOR_INDEX,
|
TEXT_DISABLE_COLOR_INDEX,
|
||||||
DISABLE_COLOR_INDEX,
|
DISABLE_COLOR_INDEX,
|
||||||
CURVE_COLOR_INDEX,
|
CURVE_COLOR_INDEX,
|
||||||
@@ -148,7 +151,12 @@ constexpr coord_t INPUT_EDIT_CURVE_HEIGHT = 158;
|
|||||||
constexpr coord_t INPUT_EDIT_CURVE_LEFT = 0;
|
constexpr coord_t INPUT_EDIT_CURVE_LEFT = 0;
|
||||||
constexpr coord_t INPUT_EDIT_CURVE_TOP = MENU_HEADER_HEIGHT;
|
constexpr coord_t INPUT_EDIT_CURVE_TOP = MENU_HEADER_HEIGHT;
|
||||||
constexpr coord_t MENUS_LINE_HEIGHT = 40;
|
constexpr coord_t MENUS_LINE_HEIGHT = 40;
|
||||||
constexpr uint8_t MENUS_MAX_LINES = 8;
|
constexpr coord_t MENUS_WIDTH = 200;
|
||||||
|
constexpr coord_t MENUS_OFFSET_TOP = 20;
|
||||||
|
constexpr coord_t MENUS_HEADER_HEIGHT = 40;
|
||||||
|
constexpr coord_t MENUS_FOOTER_HEIGHT = 0;
|
||||||
|
constexpr coord_t MENUS_MIN_HEIGHT = 2 * MENUS_LINE_HEIGHT - 1;
|
||||||
|
constexpr coord_t MENUS_MAX_HEIGHT = 7 * MENUS_LINE_HEIGHT - 1;
|
||||||
|
|
||||||
constexpr int CJK_FIRST_LETTER_INDEX = 187;
|
constexpr int CJK_FIRST_LETTER_INDEX = 187;
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: c018541f5d...d83f02e3fe
@@ -534,7 +534,7 @@
|
|||||||
#define TR_SPLASHSCREEN "Splash screen"
|
#define TR_SPLASHSCREEN "Splash screen"
|
||||||
#define TR_PWR_ON_DELAY "Pwr On delay"
|
#define TR_PWR_ON_DELAY "Pwr On delay"
|
||||||
#define TR_PWR_OFF_DELAY "Pwr Off delay"
|
#define TR_PWR_OFF_DELAY "Pwr Off delay"
|
||||||
#define TR_THROTTLE_WARNING TR(INDENT "T-Warning", INDENT "Throttle state")
|
#define TR_THROTTLE_WARNING TR(INDENT "T-Warning", INDENT "Throttle state")
|
||||||
#define TR_SWITCHWARNING TR(INDENT "S-Warning", INDENT "Switch positions")
|
#define TR_SWITCHWARNING TR(INDENT "S-Warning", INDENT "Switch positions")
|
||||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||||
|
|||||||
Reference in New Issue
Block a user