1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

[Horus] Bold font added

This commit is contained in:
Bertrand Songis 2016-03-24 21:41:43 +01:00
parent e3d70817ea
commit 31fa16bf87
15 changed files with 43 additions and 35 deletions

View file

@ -18,55 +18,63 @@
* GNU General Public License for more details.
*/
#include "../../opentx.h"
#include "opentx.h"
const uint16_t font_tinsize_specs[] PROGMEM =
uint16_t font_tinsize_specs[] = {
#include "font_tinsize.specs"
;
};
const pm_uchar font_tinsize[] PROGMEM = {
pm_uchar font_tinsize[] = {
#include "font_tinsize.lbm"
};
const uint16_t font_smlsize_specs[] PROGMEM =
uint16_t font_smlsize_specs[] = {
#include "font_smlsize.specs"
;
};
const pm_uchar font_smlsize[] PROGMEM = {
pm_uchar font_smlsize[] = {
#include "font_smlsize.lbm"
};
const uint16_t font_stdsize_specs[] PROGMEM =
uint16_t font_stdsize_specs[] = {
#include "font_stdsize.specs"
;
};
const pm_uchar font_stdsize[] PROGMEM = {
pm_uchar font_stdsize[] = {
#include "font_stdsize.lbm"
};
const uint16_t font_midsize_specs[] PROGMEM =
uint16_t font_midsize_specs[] = {
#include "font_midsize.specs"
;
};
const pm_uchar font_midsize[] PROGMEM = {
pm_uchar font_midsize[] = {
#include "font_midsize.lbm"
};
const uint16_t font_dblsize_specs[] PROGMEM =
uint16_t font_dblsize_specs[] = {
#include "font_dblsize.specs"
;
};
const pm_uchar font_dblsize[] PROGMEM = {
pm_uchar font_dblsize[] = {
#include "font_dblsize.lbm"
};
const uint16_t font_xxlsize_specs[] PROGMEM =
uint16_t font_xxlsize_specs[] = {
#include "font_xxlsize.specs"
;
};
const pm_uchar font_xxlsize[] PROGMEM = {
pm_uchar font_xxlsize[] = {
#include "font_xxlsize.lbm"
};
const uint16_t * const fontspecsTable[16] = { font_stdsize_specs, font_tinsize_specs, font_smlsize_specs, font_midsize_specs, font_dblsize_specs, font_xxlsize_specs };
const pm_uchar * const fontsTable[16] = { font_stdsize, font_tinsize, font_smlsize, font_midsize, font_dblsize, font_xxlsize };
uint16_t font_stdsizebold_specs[] = {
#include "font_stdsizebold.specs"
};
pm_uchar font_stdsizebold[] = {
#include "font_stdsizebold.lbm"
};
const uint16_t * const fontspecsTable[16] = { font_stdsize_specs, font_tinsize_specs, font_smlsize_specs, font_midsize_specs, font_dblsize_specs, font_xxlsize_specs, font_stdsizebold_specs };
const uint8_t * const fontsTable[16] = { font_stdsize, font_tinsize, font_smlsize, font_midsize, font_dblsize, font_xxlsize, font_stdsizebold };

View file

@ -38,7 +38,6 @@
#define lcdint_t int32_t
#define BSS 0x00
#define BOLD 0x00
/* lcd common flags */
#define BLINK 0x01
@ -69,6 +68,7 @@
#define MIDSIZE 0x0300
#define DBLSIZE 0x0400
#define XXLSIZE 0x0500
#define BOLD 0x0600
#define VERTICAL 0x0800
#define TIMEBLINK 0x1000

View file

@ -127,7 +127,7 @@ bool menuModelFlightModesAll(evt_t event)
FlightModeData *p = flightModeAddress(k);
putsFlightMode(MENUS_MARGIN_LEFT, y, k+1, (getFlightMode()==k ? 0/*BOLD*/ : 0) | ((sub==k && menuHorizontalPosition<0) ? INVERS : 0));
putsFlightMode(MENUS_MARGIN_LEFT, y, k+1, (getFlightMode()==k ? BOLD : 0) | ((sub==k && menuHorizontalPosition<0) ? INVERS : 0));
for (int j=0; j<ITEM_FLIGHT_MODES_COUNT; j++) {
LcdFlags attr = ((sub==k && posHorz==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);

View file

@ -109,7 +109,7 @@ bool menuModelLogicalSwitches(evt_t event)
// CSW name
unsigned int sw = SWSRC_SW1+k;
putsSwitches(MENUS_MARGIN_LEFT, y, sw, (getSwitch(sw) ? 0/*BOLD*/ : 0) | ((sub==k && CURSOR_ON_LINE()) ? INVERS : 0));
putsSwitches(MENUS_MARGIN_LEFT, y, sw, (getSwitch(sw) ? BOLD : 0) | ((sub==k && CURSOR_ON_LINE()) ? INVERS : 0));
// CSW func
lcdDrawTextAtIndex(CSW_1ST_COLUMN, y, STR_VCSWFUNC, cs->func, horz==0 ? attr : 0);

View file

@ -162,7 +162,7 @@ enum MixFields {
MIX_FIELD_COUNT
};
void gvarWeightItem(coord_t x, coord_t y, MixData *md, uint8_t attr, evt_t event)
void gvarWeightItem(coord_t x, coord_t y, MixData *md, LcdFlags attr, evt_t event)
{
u_int8int16_t weight;
MD_WEIGHT_TO_UNION(md, weight);