Removed color table and added the list of colors to be defined

This commit is contained in:
Raphael Coeffic
2021-05-07 22:41:43 +02:00
parent 8ec57dd39e
commit e251f63a35
3 changed files with 22 additions and 7 deletions
@@ -83,5 +83,4 @@
#define COLOR2FLAGS(color) LcdFlags(unsigned(color) << 16u)
#define COLOR_VAL(flags) ((flags) >> 16u)
#define COLOR_MASK(flags) ((flags) & 0xFFFF0000u)
#define COLOR(index) (lcdColorTable[ unsigned(index) & 0xFF ] << 16u)
+22
View File
@@ -30,3 +30,25 @@ void onKeyError();
void killEvents(event_t event);
event_t getWindowEvent();
//
// These colors MUST be defined
//
// #define DEFAULT_COLOR
// #define DEFAULT_BGCOLOR
// #define FOCUS_COLOR
// #define FOCUS_BGCOLOR
// #define DISABLE_COLOR
// #define HIGHLIGHT_COLOR
// #define CHECKBOX_COLOR
// #define SCROLLBAR_COLOR
// #define MENU_COLOR
// #define MENU_BGCOLOR
// #define MENU_TITLE_BGCOLOR
// #define MENU_LINE_COLOR
// #define MENU_HIGHLIGHT_COLOR
// #define MENU_HIGHLIGHT_BGCOLOR
// #define OVERLAY_COLOR
// #define TABLE_BGCOLOR
// #define TABLE_HEADER_BGCOLOR
// #define CUSTOM_COLOR
@@ -22,12 +22,6 @@
#include <inttypes.h>
#include "libopenui_config.h"
extern uint16_t lcdColorTable[LCD_COLOR_COUNT];
extern const uint16_t * const fontspecsTable[FONTS_COUNT];
extern const uint8_t * fontsTable[FONTS_COUNT];
inline void lcdSetColor(uint16_t color)
{
lcdColorTable[CUSTOM_COLOR_INDEX] = color;
}