diff --git a/src/ui4x/48gx.c b/src/ui4x/48gx.c index 684d857..410e05f 100644 --- a/src/ui4x/48gx.c +++ b/src/ui4x/48gx.c @@ -1,141 +1,6 @@ #include "inner.h" color_t colors_48gx[ NB_COLORS ] = { - /* UI4X_COLOR_WHITE */ - { - .r = 0xFF, - .g = 0xFF, - .b = 0xFF, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xFF, - }, - /* UI4X_COLOR_ALPHA */ - { - .r = 0xFF, - .g = 0xFF, - .b = 0xFF, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xFF, - }, - /* UI4X_COLOR_SHIFT_LEFT */ - { - .r = 0xFF, - .g = 0xBA, - .b = 0xFF, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xDC, - }, - /* UI4X_COLOR_SHIFT_RIGHT */ - { - .r = 0x0, - .g = 0xFF, - .b = 0xCC, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xA9, - }, - /* UI4X_COLOR_BUTTON_EDGE_TOP */ - { - .r = 0x68, - .g = 0x68, - .b = 0x68, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x68, - }, - /* UI4X_COLOR_BUTTON */ - { - .r = 0x58, - .g = 0x58, - .b = 0x58, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x58, - }, - /* UI4X_COLOR_BUTTON_EDGE_BOTTOM */ - { - .r = 0x4A, - .g = 0x4A, - .b = 0x4A, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x4A, - }, - /* UI4X_COLOR_LCD_BG */ - { - .r = 0xCA, - .g = 0xDD, - .b = 0x5C, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xCD, - }, - /* UI4X_COLOR_LCD_PIXEL */ - { - .r = 0x0, - .g = 0x0, - .b = 0x80, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x14, - }, - /* UI4X_COLOR_FACEPLATE_EDGE_TOP */ - { - .r = 0x58, - .g = 0x58, - .b = 0x58, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x58, - }, - /* UI4X_COLOR_FACEPLATE */ - { - .r = 0x4A, - .g = 0x4A, - .b = 0x4A, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x4A, - }, - /* UI4X_COLOR_FACEPLATE_EDGE_BOTTOM */ - { - .r = 0x40, - .g = 0x40, - .b = 0x40, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x40, - }, - /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_TOP */ - { - .r = 0x80, - .g = 0x80, - .b = 0x8A, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x80, - }, - /* UI4X_COLOR_UPPER_FACEPLATE */ - { - .r = 0x68, - .g = 0x68, - .b = 0x6E, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x68, - }, - /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_BOTTOM */ - { - .r = 0x54, - .g = 0x54, - .b = 0x5A, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x54, - }, /* UI4X_COLOR_HP_LOGO */ { .r = 0xB0, @@ -172,6 +37,60 @@ color_t colors_48gx[ NB_COLORS ] = { .mono_rgb = 0xFF, .gray_rgb = 0x0, }, + /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_TOP */ + { + .r = 0x80, + .g = 0x80, + .b = 0x8A, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x80, + }, + /* UI4X_COLOR_UPPER_FACEPLATE */ + { + .r = 0x68, + .g = 0x68, + .b = 0x6E, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x68, + }, + /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_BOTTOM */ + { + .r = 0x54, + .g = 0x54, + .b = 0x5A, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x54, + }, + /* UI4X_COLOR_FACEPLATE_EDGE_TOP */ + { + .r = 0x58, + .g = 0x58, + .b = 0x58, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x58, + }, + /* UI4X_COLOR_FACEPLATE */ + { + .r = 0x4A, + .g = 0x4A, + .b = 0x4A, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x4A, + }, + /* UI4X_COLOR_FACEPLATE_EDGE_BOTTOM */ + { + .r = 0x40, + .g = 0x40, + .b = 0x40, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x40, + }, /* UI4X_COLOR_KEYPAD_HIGHLIGHT */ { .r = 0x68, @@ -181,6 +100,105 @@ color_t colors_48gx[ NB_COLORS ] = { .mono_rgb = 0x0, .gray_rgb = 0x68, }, + /* UI4X_COLOR_BUTTON_EDGE_TOP */ + { + .r = 0x68, + .g = 0x68, + .b = 0x68, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x68, + }, + /* UI4X_COLOR_BUTTON */ + { + .r = 0x58, + .g = 0x58, + .b = 0x58, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x58, + }, + /* UI4X_COLOR_BUTTON_EDGE_BOTTOM */ + { + .r = 0x4A, + .g = 0x4A, + .b = 0x4A, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x4A, + }, + /* UI4X_COLOR_PIXEL_OFF */ + { + .r = 0xCA, + .g = 0xDD, + .b = 0x5C, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xCD, + }, + /* UI4X_COLOR_PIXEL_ON */ + { + .r = 0x0, + .g = 0x0, + .b = 0x80, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x14, + }, + /* UI4X_COLOR_BLACK_PIXEL_OFF */ + { + .r = 0xf5, + .g = 0xf5, + .b = 0xf5, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xCD, + }, + /* UI4X_COLOR_BLACK_PIXEL_ON */ + { + .r = 0x0, + .g = 0x0, + .b = 0x0, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x14, + }, + /* UI4X_COLOR_LABEL */ + { + .r = 0xFF, + .g = 0xFF, + .b = 0xFF, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xFF, + }, + /* UI4X_COLOR_ALPHA */ + { + .r = 0xFF, + .g = 0xFF, + .b = 0xFF, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xFF, + }, + /* UI4X_COLOR_SHIFT_LEFT */ + { + .r = 0xFF, + .g = 0xBA, + .b = 0xFF, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xDC, + }, + /* UI4X_COLOR_SHIFT_RIGHT */ + { + .r = 0x0, + .g = 0xFF, + .b = 0xCC, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xA9, + }, }; button_t buttons_48gx[ NB_HP48_KEYS ] = { @@ -188,7 +206,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -203,7 +221,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -218,7 +236,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -233,7 +251,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -248,7 +266,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -263,7 +281,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -279,7 +297,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "MTH", .font_size = 0, .label_graphic_w = 0, @@ -294,7 +312,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "PRG", .font_size = 0, .label_graphic_w = 0, @@ -309,7 +327,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "CST", .font_size = 0, .label_graphic_w = 0, @@ -324,7 +342,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "VAR", .font_size = 0, .label_graphic_w = 0, @@ -339,7 +357,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = up_width, @@ -354,7 +372,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "NXT", .font_size = 0, .label_graphic_w = 0, @@ -370,7 +388,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = quote_width, @@ -385,7 +403,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "STO", .font_size = 0, .label_graphic_w = 0, @@ -400,7 +418,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "EVAL", .font_size = 0, .label_graphic_w = 0, @@ -415,7 +433,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = left_width, @@ -430,7 +448,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = down_width, @@ -445,7 +463,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = right_width, @@ -461,7 +479,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "SIN", .font_size = 0, .label_graphic_w = 0, @@ -476,7 +494,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "COS", .font_size = 0, .label_graphic_w = 0, @@ -491,7 +509,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "TAN", .font_size = 0, .label_graphic_w = 0, @@ -506,7 +524,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = sqrt_width, @@ -521,7 +539,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = power_width, @@ -536,7 +554,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = inv_width, @@ -552,7 +570,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 200, .w = 86, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "ENTER", .font_size = 2, .label_graphic_w = 0, @@ -567,7 +585,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 200, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = neg_width, @@ -582,7 +600,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 200, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "EEX", .font_size = 0, .label_graphic_w = 0, @@ -597,7 +615,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 200, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "DEL", .font_size = 0, .label_graphic_w = 0, @@ -612,7 +630,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 200, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = bs_width, @@ -628,7 +646,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 250, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = alpha_width, @@ -643,7 +661,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 250, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "7", .font_size = 1, .label_graphic_w = 0, @@ -658,7 +676,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 250, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "8", .font_size = 1, .label_graphic_w = 0, @@ -673,7 +691,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 250, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "9", .font_size = 1, .label_graphic_w = 0, @@ -688,7 +706,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 250, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = div_width, @@ -719,7 +737,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 300, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "4", .font_size = 1, .label_graphic_w = 0, @@ -734,7 +752,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 300, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "5", .font_size = 1, .label_graphic_w = 0, @@ -749,7 +767,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 300, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "6", .font_size = 1, .label_graphic_w = 0, @@ -764,7 +782,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 300, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = mul_width, @@ -795,7 +813,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 350, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "1", .font_size = 1, .label_graphic_w = 0, @@ -810,7 +828,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 350, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "2", .font_size = 1, .label_graphic_w = 0, @@ -825,7 +843,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 350, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "3", .font_size = 1, .label_graphic_w = 0, @@ -840,7 +858,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 350, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = minus_width, @@ -856,7 +874,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 400, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "ON", .font_size = 0, .label_graphic_w = 0, @@ -871,7 +889,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 400, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "0", .font_size = 1, .label_graphic_w = 0, @@ -886,7 +904,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 400, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = ".", .font_size = 1, .label_graphic_w = 0, @@ -901,7 +919,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 400, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "SPC", .font_size = 0, .label_graphic_w = 0, @@ -916,7 +934,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .y = 400, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = plus_width, diff --git a/src/ui4x/48sx.c b/src/ui4x/48sx.c index bab1441..cc9ad01 100644 --- a/src/ui4x/48sx.c +++ b/src/ui4x/48sx.c @@ -1,141 +1,6 @@ #include "inner.h" color_t colors_48sx[ NB_COLORS ] = { - /* UI4X_COLOR_WHITE */ - { - .r = 0xFF, - .g = 0xFF, - .b = 0xFF, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xFF, - }, - /* UI4X_COLOR_ALPHA */ - { - .r = 0xFF, - .g = 0xFF, - .b = 0xFF, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xFF, - }, - /* UI4X_COLOR_SHIFT_LEFT */ - { - .r = 0xFF, - .g = 0xA6, - .b = 0x0, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xE6, - }, - /* UI4X_COLOR_SHIFT_RIGHT */ - { - .r = 0x0, - .g = 0xD2, - .b = 0xFF, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xA9, - }, - /* UI4X_COLOR_BUTTON_EDGE_TOP */ - { - .r = 0x6D, - .g = 0x5D, - .b = 0x5D, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x5B, - }, - /* UI4X_COLOR_BUTTON */ - { - .r = 0x5A, - .g = 0x4D, - .b = 0x4D, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x51, - }, - /* UI4X_COLOR_BUTTON_EDGE_BOTTOM */ - { - .r = 0x4C, - .g = 0x41, - .b = 0x41, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x45, - }, - /* UI4X_COLOR_LCD_BG */ - { - .r = 0xCA, - .g = 0xDD, - .b = 0x5C, - .a = 0xFF, - .mono_rgb = 0xFF, - .gray_rgb = 0xCD, - }, - /* UI4X_COLOR_LCD_PIXEL */ - { - .r = 0x0, - .g = 0x0, - .b = 0x80, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x14, - }, - /* UI4X_COLOR_FACEPLATE_EDGE_TOP */ - { - .r = 0x6D, - .g = 0x4E, - .b = 0x4E, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x58, - }, - /* UI4X_COLOR_FACEPLATE */ - { - .r = 0x5A, - .g = 0x40, - .b = 0x40, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x49, - }, - /* UI4X_COLOR_FACEPLATE_EDGE_BOTTOM */ - { - .r = 0x4C, - .g = 0x36, - .b = 0x36, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x3C, - }, - /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_TOP */ - { - .r = 0x9B, - .g = 0x76, - .b = 0x54, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x7C, - }, - /* UI4X_COLOR_UPPER_FACEPLATE */ - { - .r = 0x7C, - .g = 0x5E, - .b = 0x43, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x63, - }, - /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_BOTTOM */ - { - .r = 0x64, - .g = 0x4B, - .b = 0x35, - .a = 0xFF, - .mono_rgb = 0x0, - .gray_rgb = 0x4F, - }, /* UI4X_COLOR_HP_LOGO */ { .r = 0xCC, @@ -172,6 +37,60 @@ color_t colors_48sx[ NB_COLORS ] = { .mono_rgb = 0xFF, .gray_rgb = 0x0, }, + /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_TOP */ + { + .r = 0x9B, + .g = 0x76, + .b = 0x54, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x7C, + }, + /* UI4X_COLOR_UPPER_FACEPLATE */ + { + .r = 0x7C, + .g = 0x5E, + .b = 0x43, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x63, + }, + /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_BOTTOM */ + { + .r = 0x64, + .g = 0x4B, + .b = 0x35, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x4F, + }, + /* UI4X_COLOR_FACEPLATE_EDGE_TOP */ + { + .r = 0x6D, + .g = 0x4E, + .b = 0x4E, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x58, + }, + /* UI4X_COLOR_FACEPLATE */ + { + .r = 0x5A, + .g = 0x40, + .b = 0x40, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x49, + }, + /* UI4X_COLOR_FACEPLATE_EDGE_BOTTOM */ + { + .r = 0x4C, + .g = 0x36, + .b = 0x36, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x3C, + }, /* UI4X_COLOR_KEYPAD_HIGHLIGHT */ { .r = 0x3C, @@ -181,6 +100,105 @@ color_t colors_48sx[ NB_COLORS ] = { .mono_rgb = 0x0, .gray_rgb = 0x30, }, + /* UI4X_COLOR_BUTTON_EDGE_TOP */ + { + .r = 0x6D, + .g = 0x5D, + .b = 0x5D, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x5B, + }, + /* UI4X_COLOR_BUTTON */ + { + .r = 0x5A, + .g = 0x4D, + .b = 0x4D, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x51, + }, + /* UI4X_COLOR_BUTTON_EDGE_BOTTOM */ + { + .r = 0x4C, + .g = 0x41, + .b = 0x41, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x45, + }, + /* UI4X_COLOR_PIXEL_OFF */ + { + .r = 0xCA, + .g = 0xDD, + .b = 0x5C, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xCD, + }, + /* UI4X_COLOR_PIXEL_ON */ + { + .r = 0x0, + .g = 0x0, + .b = 0x80, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x14, + }, + /* UI4X_COLOR_BLACK_PIXEL_OFF */ + { + .r = 0xf5, + .g = 0xf5, + .b = 0xf5, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xCD, + }, + /* UI4X_COLOR_BLACK_PIXEL_ON */ + { + .r = 0x0, + .g = 0x0, + .b = 0x0, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x14, + }, + /* UI4X_COLOR_LABEL */ + { + .r = 0xFF, + .g = 0xFF, + .b = 0xFF, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xFF, + }, + /* UI4X_COLOR_ALPHA */ + { + .r = 0xFF, + .g = 0xFF, + .b = 0xFF, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xFF, + }, + /* UI4X_COLOR_SHIFT_LEFT */ + { + .r = 0xFF, + .g = 0xA6, + .b = 0x0, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xE6, + }, + /* UI4X_COLOR_SHIFT_RIGHT */ + { + .r = 0x0, + .g = 0xD2, + .b = 0xFF, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xA9, + }, }; button_t buttons_48sx[ NB_HP48_KEYS ] = { @@ -188,7 +206,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -203,7 +221,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -218,7 +236,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -233,7 +251,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -248,7 +266,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -263,7 +281,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 0, .w = 36, .h = 23, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = menu_label_width, @@ -279,7 +297,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "MTH", .font_size = 0, .label_graphic_w = 0, @@ -294,7 +312,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "PRG", .font_size = 0, .label_graphic_w = 0, @@ -309,7 +327,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "CST", .font_size = 0, .label_graphic_w = 0, @@ -324,7 +342,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "VAR", .font_size = 0, .label_graphic_w = 0, @@ -339,7 +357,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = up_width, @@ -354,7 +372,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 50, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "NXT", .font_size = 0, .label_graphic_w = 0, @@ -370,7 +388,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = quote_width, @@ -385,7 +403,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "STO", .font_size = 0, .label_graphic_w = 0, @@ -400,7 +418,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "EVAL", .font_size = 0, .label_graphic_w = 0, @@ -415,7 +433,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = left_width, @@ -430,7 +448,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = down_width, @@ -445,7 +463,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 100, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = right_width, @@ -461,7 +479,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "SIN", .font_size = 0, .label_graphic_w = 0, @@ -476,7 +494,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "COS", .font_size = 0, .label_graphic_w = 0, @@ -491,7 +509,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "TAN", .font_size = 0, .label_graphic_w = 0, @@ -506,7 +524,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = sqrt_width, @@ -521,7 +539,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = power_width, @@ -536,7 +554,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 150, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = inv_width, @@ -552,7 +570,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 200, .w = 86, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "ENTER", .font_size = 2, .label_graphic_w = 0, @@ -567,7 +585,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 200, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = neg_width, @@ -582,7 +600,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 200, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "EEX", .font_size = 0, .label_graphic_w = 0, @@ -597,7 +615,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 200, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "DEL", .font_size = 0, .label_graphic_w = 0, @@ -612,7 +630,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 200, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = bs_width, @@ -628,7 +646,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 250, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = alpha_width, @@ -643,7 +661,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 250, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "7", .font_size = 1, .label_graphic_w = 0, @@ -658,7 +676,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 250, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "8", .font_size = 1, .label_graphic_w = 0, @@ -673,7 +691,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 250, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "9", .font_size = 1, .label_graphic_w = 0, @@ -688,7 +706,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 250, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = div_width, @@ -719,7 +737,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 300, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "4", .font_size = 1, .label_graphic_w = 0, @@ -734,7 +752,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 300, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "5", .font_size = 1, .label_graphic_w = 0, @@ -749,7 +767,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 300, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "6", .font_size = 1, .label_graphic_w = 0, @@ -764,7 +782,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 300, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = mul_width, @@ -795,7 +813,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 350, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "1", .font_size = 1, .label_graphic_w = 0, @@ -810,7 +828,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 350, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "2", .font_size = 1, .label_graphic_w = 0, @@ -825,7 +843,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 350, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "3", .font_size = 1, .label_graphic_w = 0, @@ -840,7 +858,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 350, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = minus_width, @@ -856,7 +874,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 400, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "ON", .font_size = 0, .label_graphic_w = 0, @@ -871,7 +889,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 400, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "0", .font_size = 1, .label_graphic_w = 0, @@ -886,7 +904,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 400, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = ".", .font_size = 1, .label_graphic_w = 0, @@ -901,7 +919,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 400, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "SPC", .font_size = 0, .label_graphic_w = 0, @@ -916,7 +934,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .y = 400, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = plus_width, diff --git a/src/ui4x/49g.c b/src/ui4x/49g.c index ec0bed6..5f35f91 100644 --- a/src/ui4x/49g.c +++ b/src/ui4x/49g.c @@ -1,141 +1,6 @@ #include "inner.h" color_t colors_49g[ NB_COLORS ] = { - /* UI4X_COLOR_WHITE */ - { - .r = 0xff, - .g = 0xff, - .b = 0xff, - .a = 0xff, - .mono_rgb = 0xff, - .gray_rgb = 0xff, - }, - /* UI4X_COLOR_ALPHA */ - { - .r = 0x67, - .g = 0xc1, - .b = 0x84, - .a = 0xff, - .mono_rgb = 0xff, - .gray_rgb = 0xDC, - }, - /* UI4X_COLOR_SHIFT_LEFT */ - { - .r = 0x82, - .g = 0xb1, - .b = 0xff, - .a = 0xff, - .mono_rgb = 0xff, - .gray_rgb = 0xDC, - }, - /* UI4X_COLOR_SHIFT_RIGHT */ - { - .r = 0xff, - .g = 0x8a, - .b = 0x80, - .a = 0xff, - .mono_rgb = 0xff, - .gray_rgb = 0xA9, - }, - /* UI4X_COLOR_BUTTON_EDGE_TOP */ - { - .r = 0x4b, - .g = 0x4b, - .b = 0x4b, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x68, - }, - /* UI4X_COLOR_BUTTON */ - { - .r = 0x3f, - .g = 0x3f, - .b = 0x3f, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x58, - }, - /* UI4X_COLOR_BUTTON_EDGE_BOTTOM */ - { - .r = 0x3d, - .g = 0x3d, - .b = 0x3d, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x4A, - }, - /* UI4X_COLOR_LCD_BG */ - { - .r = 0xcc, - .g = 0xcc, - .b = 0xcc, - .a = 0xff, - .mono_rgb = 0xff, - .gray_rgb = 0xCD, - }, - /* UI4X_COLOR_LCD_PIXEL */ - { - .r = 0x00, - .g = 0x00, - .b = 0x00, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x14, - }, - /* UI4X_COLOR_FACEPLATE_EDGE_TOP */ - { - .r = 0x58, - .g = 0x58, - .b = 0x58, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x58, - }, - /* UI4X_COLOR_FACEPLATE */ - { - .r = 0x27, - .g = 0x27, - .b = 0x27, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x4A, - }, - /* UI4X_COLOR_FACEPLATE_EDGE_BOTTOM */ - { - .r = 0x40, - .g = 0x40, - .b = 0x40, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x40, - }, - /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_TOP */ - { - .r = 0x00, - .g = 0x00, - .b = 0x00, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x80, - }, - /* UI4X_COLOR_UPPER_FACEPLATE */ - { - .r = 0x26, - .g = 0x26, - .b = 0x26, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x68, - }, - /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_BOTTOM */ - { - .r = 0x00, - .g = 0x00, - .b = 0x00, - .a = 0xff, - .mono_rgb = 0x00, - .gray_rgb = 0x54, - }, /* UI4X_COLOR_HP_LOGO */ { .r = 0xB0, @@ -172,6 +37,60 @@ color_t colors_49g[ NB_COLORS ] = { .mono_rgb = 0xff, .gray_rgb = 0x00, }, + /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_TOP */ + { + .r = 0x00, + .g = 0x00, + .b = 0x00, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x80, + }, + /* UI4X_COLOR_UPPER_FACEPLATE */ + { + .r = 0x26, + .g = 0x26, + .b = 0x26, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x68, + }, + /* UI4X_COLOR_UPPER_FACEPLATE_EDGE_BOTTOM */ + { + .r = 0x00, + .g = 0x00, + .b = 0x00, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x54, + }, + /* UI4X_COLOR_FACEPLATE_EDGE_TOP */ + { + .r = 0x58, + .g = 0x58, + .b = 0x58, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x58, + }, + /* UI4X_COLOR_FACEPLATE */ + { + .r = 0x27, + .g = 0x27, + .b = 0x27, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x4A, + }, + /* UI4X_COLOR_FACEPLATE_EDGE_BOTTOM */ + { + .r = 0x40, + .g = 0x40, + .b = 0x40, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x40, + }, /* UI4X_COLOR_KEYPAD_HIGHLIGHT */ { .r = 0x4f, @@ -181,6 +100,105 @@ color_t colors_49g[ NB_COLORS ] = { .mono_rgb = 0x00, .gray_rgb = 0x68, }, + /* UI4X_COLOR_BUTTON_EDGE_TOP */ + { + .r = 0x4b, + .g = 0x4b, + .b = 0x4b, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x68, + }, + /* UI4X_COLOR_BUTTON */ + { + .r = 0x3f, + .g = 0x3f, + .b = 0x3f, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x58, + }, + /* UI4X_COLOR_BUTTON_EDGE_BOTTOM */ + { + .r = 0x3d, + .g = 0x3d, + .b = 0x3d, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x4A, + }, + /* UI4X_COLOR_PIXEL_OFF */ + { + .r = 0xcd, + .g = 0xcd, + .b = 0xcd, + .a = 0xff, + .mono_rgb = 0xff, + .gray_rgb = 0xCD, + }, + /* UI4X_COLOR_PIXEL_ON */ + { + .r = 0x00, + .g = 0x00, + .b = 0x00, + .a = 0xff, + .mono_rgb = 0x00, + .gray_rgb = 0x14, + }, + /* UI4X_COLOR_BLACK_PIXEL_OFF */ + { + .r = 0xf5, + .g = 0xf5, + .b = 0xf5, + .a = 0xFF, + .mono_rgb = 0xFF, + .gray_rgb = 0xCD, + }, + /* UI4X_COLOR_BLACK_PIXEL_ON */ + { + .r = 0x0, + .g = 0x0, + .b = 0x0, + .a = 0xFF, + .mono_rgb = 0x0, + .gray_rgb = 0x14, + }, + /* UI4X_COLOR_LABEL */ + { + .r = 0xff, + .g = 0xff, + .b = 0xff, + .a = 0xff, + .mono_rgb = 0xff, + .gray_rgb = 0xff, + }, + /* UI4X_COLOR_ALPHA */ + { + .r = 0x67, + .g = 0xc1, + .b = 0x84, + .a = 0xff, + .mono_rgb = 0xff, + .gray_rgb = 0xDC, + }, + /* UI4X_COLOR_SHIFT_LEFT */ + { + .r = 0x82, + .g = 0xb1, + .b = 0xff, + .a = 0xff, + .mono_rgb = 0xff, + .gray_rgb = 0xDC, + }, + /* UI4X_COLOR_SHIFT_RIGHT */ + { + .r = 0xff, + .g = 0x8a, + .b = 0x80, + .a = 0xff, + .mono_rgb = 0xff, + .gray_rgb = 0xA9, + }, }; #define KB_LINE_HEIGHT 45 @@ -190,7 +208,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 0, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "F1", .font_size = 0, .label_graphic_w = 0, @@ -205,7 +223,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 0, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "F2", .font_size = 0, .label_graphic_w = 0, @@ -220,7 +238,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 0, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "F3", .font_size = 0, .label_graphic_w = 0, @@ -235,7 +253,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 0, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "F4", .font_size = 0, .label_graphic_w = 0, @@ -250,7 +268,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 0, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "F5", .font_size = 0, .label_graphic_w = 0, @@ -265,7 +283,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 0, .w = 36, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "F6", .font_size = 0, .label_graphic_w = 0, @@ -281,7 +299,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 1 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "APPS", .font_size = 0, .label_graphic_w = 0, @@ -296,7 +314,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 1 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "MODE", .font_size = 0, .label_graphic_w = 0, @@ -311,7 +329,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 1 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "TOOL", .font_size = 0, .label_graphic_w = 0, @@ -327,7 +345,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 2 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "VAR", .font_size = 0, .label_graphic_w = 0, @@ -342,7 +360,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 2 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "STO", .font_size = 0, .label_graphic_w = 0, @@ -357,7 +375,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 2 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "NXT", .font_size = 0, .label_graphic_w = 0, @@ -373,7 +391,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 1.4 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = left_width, @@ -388,7 +406,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 0.75 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = up_width, @@ -403,7 +421,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 1.4 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = right_width, @@ -418,7 +436,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 2 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = down_width, @@ -434,7 +452,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 3 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "HIST", .font_size = 0, .label_graphic_w = 0, @@ -449,7 +467,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 3 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "CAT", .font_size = 0, .label_graphic_w = 0, @@ -464,7 +482,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 3 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "EQW", .font_size = 0, .label_graphic_w = 0, @@ -479,7 +497,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 3 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "SYMB", .font_size = 0, .label_graphic_w = 0, @@ -494,7 +512,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 3 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = bs_width, @@ -510,7 +528,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 4 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = power_width, @@ -525,7 +543,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 4 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = sqrt_width, @@ -540,7 +558,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 4 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "SIN", .font_size = 0, .label_graphic_w = 0, @@ -555,7 +573,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 4 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "COS", .font_size = 2, .label_graphic_w = 0, @@ -570,7 +588,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 4 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "TAN", .font_size = 0, .label_graphic_w = 0, @@ -586,7 +604,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 5 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "EEX", .font_size = 0, .label_graphic_w = 0, @@ -601,7 +619,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 5 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = neg_width, @@ -616,7 +634,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 5 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "X", .font_size = 0, .label_graphic_w = 0, @@ -631,7 +649,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 5 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = inv_width, @@ -646,7 +664,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 5 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = div_width, @@ -677,7 +695,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 6 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "7", .font_size = 1, .label_graphic_w = 0, @@ -692,7 +710,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 6 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "8", .font_size = 1, .label_graphic_w = 0, @@ -707,7 +725,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 6 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "9", .font_size = 1, .label_graphic_w = 0, @@ -722,7 +740,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 6 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = mul_width, @@ -753,7 +771,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 7 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "4", .font_size = 1, .label_graphic_w = 0, @@ -768,7 +786,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 7 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "5", .font_size = 1, .label_graphic_w = 0, @@ -783,7 +801,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 7 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "6", .font_size = 1, .label_graphic_w = 0, @@ -798,7 +816,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 7 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = minus_width, @@ -829,7 +847,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 8 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "1", .font_size = 1, .label_graphic_w = 0, @@ -844,7 +862,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 8 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "2", .font_size = 1, .label_graphic_w = 0, @@ -859,7 +877,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 8 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "3", .font_size = 1, .label_graphic_w = 0, @@ -874,7 +892,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 8 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = 0, .font_size = 0, .label_graphic_w = plus_width, @@ -890,7 +908,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 9 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "ON", .font_size = 0, .label_graphic_w = 0, @@ -905,7 +923,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 9 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "0", .font_size = 1, .label_graphic_w = 0, @@ -920,7 +938,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 9 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = ".", .font_size = 1, .label_graphic_w = 0, @@ -935,7 +953,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 9 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "SPC", .font_size = 0, .label_graphic_w = 0, @@ -950,7 +968,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .y = 9 * KB_LINE_HEIGHT, .w = 46, .h = 26, - .label_color = UI4X_COLOR_WHITE, + .label_color = UI4X_COLOR_LABEL, .label_text = "ENTER", .font_size = 0, .label_graphic_w = 0, diff --git a/src/ui4x/config.c b/src/ui4x/config.c index c82d9ce..a240521 100644 --- a/src/ui4x/config.c +++ b/src/ui4x/config.c @@ -385,6 +385,9 @@ config_t* config_init( int argc, char* argv[] ) /* if ( clopt_port_2_file_name != NULL ) */ /* config.port_2_file_name = strdup( clopt_port_2_file_name ); */ + if ( config.model == MODEL_49G ) + config.black_lcd = true; + config.mod_file_name = normalize_filename( config.state_dir_path, clopt_mod_file_name ); config.cpu_file_name = normalize_filename( config.state_dir_path, clopt_cpu_file_name ); config.hdw_file_name = normalize_filename( config.state_dir_path, clopt_hdw_file_name ); diff --git a/src/ui4x/inner.h b/src/ui4x/inner.h index 77439ea..667db87 100644 --- a/src/ui4x/inner.h +++ b/src/ui4x/inner.h @@ -6,30 +6,37 @@ #include "bitmaps_misc.h" // Colors -#define UI4X_COLOR_WHITE 0 -#define UI4X_COLOR_ALPHA 1 -#define UI4X_COLOR_SHIFT_LEFT 2 -#define UI4X_COLOR_SHIFT_RIGHT 3 -#define UI4X_COLOR_BUTTON_EDGE_TOP 4 -#define UI4X_COLOR_BUTTON 5 -#define UI4X_COLOR_BUTTON_EDGE_BOTTOM 6 -#define UI4X_COLOR_LCD_BG 7 -#define UI4X_COLOR_LCD_PIXEL 8 -#define UI4X_COLOR_FACEPLATE_EDGE_TOP 9 -#define UI4X_COLOR_FACEPLATE 10 -#define UI4X_COLOR_FACEPLATE_EDGE_BOTTOM 11 -#define UI4X_COLOR_UPPER_FACEPLATE_EDGE_TOP 12 -#define UI4X_COLOR_UPPER_FACEPLATE 13 -#define UI4X_COLOR_UPPER_FACEPLATE_EDGE_BOTTOM 14 -#define UI4X_COLOR_HP_LOGO 15 -#define UI4X_COLOR_HP_LOGO_BG 16 -#define UI4X_COLOR_48GX_128K_RAM 17 -#define UI4X_COLOR_FRAME 18 -#define UI4X_COLOR_KEYPAD_HIGHLIGHT 19 +#define UI4X_COLOR_HP_LOGO 0 +#define UI4X_COLOR_HP_LOGO_BG 1 +#define UI4X_COLOR_48GX_128K_RAM 2 -#define FIRST_COLOR UI4X_COLOR_WHITE -#define LAST_COLOR UI4X_COLOR_KEYPAD_HIGHLIGHT -#define NB_COLORS ( LAST_COLOR + 1 ) +#define UI4X_COLOR_FRAME 3 + +#define UI4X_COLOR_UPPER_FACEPLATE_EDGE_TOP 4 +#define UI4X_COLOR_UPPER_FACEPLATE 5 +#define UI4X_COLOR_UPPER_FACEPLATE_EDGE_BOTTOM 6 + +#define UI4X_COLOR_FACEPLATE_EDGE_TOP 7 +#define UI4X_COLOR_FACEPLATE 8 +#define UI4X_COLOR_FACEPLATE_EDGE_BOTTOM 9 + +#define UI4X_COLOR_KEYPAD_HIGHLIGHT 10 +#define UI4X_COLOR_BUTTON_EDGE_TOP 11 +#define UI4X_COLOR_BUTTON 12 +#define UI4X_COLOR_BUTTON_EDGE_BOTTOM 13 + +#define UI4X_COLOR_PIXEL_OFF 14 +#define UI4X_COLOR_PIXEL_ON 15 +#define UI4X_COLOR_BLACK_PIXEL_OFF 16 +#define UI4X_COLOR_BLACK_PIXEL_ON 17 + +#define UI4X_COLOR_LABEL 18 +#define UI4X_COLOR_ALPHA 19 +#define UI4X_COLOR_SHIFT_LEFT 20 +#define UI4X_COLOR_SHIFT_RIGHT 21 + +#define FIRST_COLOR 0 +#define NB_COLORS 22 /***********/ /* typedef */ diff --git a/src/ui4x/ncurses.c b/src/ui4x/ncurses.c index f1d048d..78ce6d1 100644 --- a/src/ui4x/ncurses.c +++ b/src/ui4x/ncurses.c @@ -474,14 +474,14 @@ void ui_start_ncurses( config_t* conf ) start_color(); if ( config.gray ) { - init_color( LCD_COLOR_BG, COLORS[ UI4X_COLOR_LCD_BG ].gray_rgb, COLORS[ UI4X_COLOR_LCD_BG ].gray_rgb, - COLORS[ UI4X_COLOR_LCD_BG ].gray_rgb ); - init_color( LCD_COLOR_FG, COLORS[ UI4X_COLOR_LCD_PIXEL ].gray_rgb, COLORS[ UI4X_COLOR_LCD_PIXEL ].gray_rgb, - COLORS[ UI4X_COLOR_LCD_PIXEL ].gray_rgb ); + init_color( LCD_COLOR_BG, COLORS[ UI4X_COLOR_PIXEL_OFF ].gray_rgb, COLORS[ UI4X_COLOR_PIXEL_OFF ].gray_rgb, + COLORS[ UI4X_COLOR_PIXEL_OFF ].gray_rgb ); + init_color( LCD_COLOR_FG, COLORS[ UI4X_COLOR_PIXEL_ON ].gray_rgb, COLORS[ UI4X_COLOR_PIXEL_ON ].gray_rgb, + COLORS[ UI4X_COLOR_PIXEL_ON ].gray_rgb ); } else { - init_color( LCD_COLOR_BG, COLORS[ UI4X_COLOR_LCD_BG ].r, COLORS[ UI4X_COLOR_LCD_BG ].g, COLORS[ UI4X_COLOR_LCD_BG ].b ); - init_color( LCD_COLOR_FG, COLORS[ UI4X_COLOR_LCD_PIXEL ].r, COLORS[ UI4X_COLOR_LCD_PIXEL ].g, - COLORS[ UI4X_COLOR_LCD_PIXEL ].b ); + init_color( LCD_COLOR_BG, COLORS[ UI4X_COLOR_PIXEL_OFF ].r, COLORS[ UI4X_COLOR_PIXEL_OFF ].g, + COLORS[ UI4X_COLOR_PIXEL_OFF ].b ); + init_color( LCD_COLOR_FG, COLORS[ UI4X_COLOR_PIXEL_ON ].r, COLORS[ UI4X_COLOR_PIXEL_ON ].g, COLORS[ UI4X_COLOR_PIXEL_ON ].b ); } init_pair( LCD_PIXEL_OFF, LCD_COLOR_BG, LCD_COLOR_BG ); diff --git a/src/ui4x/sdl2.c b/src/ui4x/sdl2.c index 74be087..fbaa64b 100644 --- a/src/ui4x/sdl2.c +++ b/src/ui4x/sdl2.c @@ -31,6 +31,9 @@ #define KEYBOARD_OFFSET_X SIDE_SKIP #define KEYBOARD_OFFSET_Y ( TOP_SKIP + DISPLAY_HEIGHT + DISP_KBD_SKIP ) +#define COLOR_PIXEL_ON ( config.black_lcd ? UI4X_COLOR_BLACK_PIXEL_ON : UI4X_COLOR_PIXEL_ON ) +#define COLOR_PIXEL_OFF ( config.black_lcd ? UI4X_COLOR_BLACK_PIXEL_OFF : UI4X_COLOR_PIXEL_OFF ) + /***********/ /* typedef */ /***********/ @@ -213,9 +216,9 @@ static void create_annunciators_textures( void ) { for ( int i = 0; i < NB_ANNUNCIATORS; i++ ) { annunciators_textures[ i ].up = bitmap_to_texture( annunciators_ui[ i ].width, annunciators_ui[ i ].height, - annunciators_ui[ i ].bits, UI4X_COLOR_LCD_PIXEL, UI4X_COLOR_LCD_BG ); + annunciators_ui[ i ].bits, COLOR_PIXEL_ON, COLOR_PIXEL_OFF ); annunciators_textures[ i ].down = bitmap_to_texture( annunciators_ui[ i ].width, annunciators_ui[ i ].height, - annunciators_ui[ i ].bits, UI4X_COLOR_LCD_BG, UI4X_COLOR_LCD_BG ); + annunciators_ui[ i ].bits, COLOR_PIXEL_OFF, COLOR_PIXEL_OFF ); } } @@ -577,7 +580,7 @@ static SDL_Texture* create_button_texture( int hpkey, bool is_up ) // draw label in button int label_color = BUTTONS[ hpkey ].label_color; /* if ( config.model == MODEL_49G && ( hpkey == HP49_KEY_ALPHA || hpkey == HP49_KEY_SHL || hpkey == HP49_KEY_SHR ) ) */ - /* label_color = UI4X_COLOR_WHITE; */ + /* label_color = UI4X_COLOR_LABEL; */ if ( BUTTONS[ hpkey ].label_text != ( char* )0 ) { /* Button has a text label */ x = strlen( BUTTONS[ hpkey ].label_text ) - 1; @@ -730,7 +733,7 @@ static void _draw_keypad( void ) x = KEYBOARD_OFFSET_X + BUTTONS[ i ].x + ( 1 + BUTTONS[ i ].w - SmallTextWidth( BUTTONS[ i ].sub, strlen( BUTTONS[ i ].sub ) ) ) / 2; y = KEYBOARD_OFFSET_Y + BUTTONS[ i ].y + BUTTONS[ i ].h + small_ascent + 2; - write_with_small_font( x, y, BUTTONS[ i ].sub, UI4X_COLOR_WHITE, UI4X_COLOR_FACEPLATE ); + write_with_small_font( x, y, BUTTONS[ i ].sub, UI4X_COLOR_LABEL, UI4X_COLOR_FACEPLATE ); } total_top_labels_width = 0; @@ -820,14 +823,12 @@ static void _draw_bezel_LCD( void ) UI4X_COLOR_UPPER_FACEPLATE ); // simulate rounded lcd corners - __draw_line( DISPLAY_OFFSET_X - 1, DISPLAY_OFFSET_Y + 1, DISPLAY_OFFSET_X - 1, DISPLAY_OFFSET_Y + DISPLAY_HEIGHT - 2, - UI4X_COLOR_LCD_BG ); - __draw_line( DISPLAY_OFFSET_X + 1, DISPLAY_OFFSET_Y - 1, DISPLAY_OFFSET_X + DISPLAY_WIDTH - 2, DISPLAY_OFFSET_Y - 1, - UI4X_COLOR_LCD_BG ); + __draw_line( DISPLAY_OFFSET_X - 1, DISPLAY_OFFSET_Y + 1, DISPLAY_OFFSET_X - 1, DISPLAY_OFFSET_Y + DISPLAY_HEIGHT - 2, COLOR_PIXEL_OFF ); + __draw_line( DISPLAY_OFFSET_X + 1, DISPLAY_OFFSET_Y - 1, DISPLAY_OFFSET_X + DISPLAY_WIDTH - 2, DISPLAY_OFFSET_Y - 1, COLOR_PIXEL_OFF ); __draw_line( DISPLAY_OFFSET_X + 1, DISPLAY_OFFSET_Y + DISPLAY_HEIGHT, DISPLAY_OFFSET_X + DISPLAY_WIDTH - 2, - DISPLAY_OFFSET_Y + DISPLAY_HEIGHT, UI4X_COLOR_LCD_BG ); + DISPLAY_OFFSET_Y + DISPLAY_HEIGHT, COLOR_PIXEL_OFF ); __draw_line( DISPLAY_OFFSET_X + DISPLAY_WIDTH, DISPLAY_OFFSET_Y + 1, DISPLAY_OFFSET_X + DISPLAY_WIDTH, - DISPLAY_OFFSET_Y + DISPLAY_HEIGHT - 2, UI4X_COLOR_LCD_BG ); + DISPLAY_OFFSET_Y + DISPLAY_HEIGHT - 2, COLOR_PIXEL_OFF ); } static void _draw_background( int width, int height, int w_top, int h_top ) @@ -838,7 +839,7 @@ static void _draw_background( int width, int height, int w_top, int h_top ) static void _draw_background_LCD( void ) { - __draw_rect( DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y, DISPLAY_WIDTH, DISPLAY_HEIGHT, UI4X_COLOR_LCD_BG ); + __draw_rect( DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y, DISPLAY_WIDTH, DISPLAY_HEIGHT, COLOR_PIXEL_OFF ); } // Show the hp key which is being pressed @@ -882,7 +883,7 @@ static void _draw_serial_devices_path( void ) if ( strlen( text ) > 0 ) write_with_small_font( ( ( SIDE_SKIP * 1.5 ) + DISPLAY_WIDTH ) - SmallTextWidth( text, strlen( text ) ), ( config.model == MODEL_49G ? TOP_SKIP - 12 : KEYBOARD_OFFSET_Y - ( DISP_KBD_SKIP / 2 ) ), text, - UI4X_COLOR_LCD_BG, UI4X_COLOR_UPPER_FACEPLATE ); + COLOR_PIXEL_OFF, UI4X_COLOR_UPPER_FACEPLATE ); } static int sdl_press_key( int hpkey ) @@ -935,7 +936,7 @@ static void sdl_update_annunciators( void ) static void apply_contrast( void ) { - // Adjust the UI4X_COLOR_LCD_BG color according to the contrast + // Adjust the COLOR_PIXEL_OFF color according to the contrast int contrast = get_contrast(); if ( last_contrast == contrast ) @@ -943,12 +944,12 @@ static void apply_contrast( void ) last_contrast = contrast; - if ( contrast < 0x3 ) - contrast = 0x3; - if ( contrast > 0x13 ) - contrast = 0x13; + if ( contrast < 3 ) + contrast = 3; + if ( contrast > 19 ) + contrast = 19; - for ( unsigned i = FIRST_COLOR; i < LAST_COLOR; i++ ) { + for ( unsigned i = FIRST_COLOR; i < NB_COLORS; i++ ) { colors[ i ] = COLORS[ i ]; if ( config.mono ) { colors[ i ].r = colors[ i ].mono_rgb; @@ -960,10 +961,13 @@ static void apply_contrast( void ) colors[ i ].b = colors[ i ].gray_rgb; } - if ( !config.mono && i == UI4X_COLOR_LCD_PIXEL ) { - colors[ i ].r = ( 0x13 - contrast ) * ( colors[ UI4X_COLOR_LCD_BG ].r / 0x10 ); - colors[ i ].g = ( 0x13 - contrast ) * ( colors[ UI4X_COLOR_LCD_BG ].g / 0x10 ); - colors[ i ].b = 128 - ( ( 0x13 - contrast ) * ( ( 128 - colors[ UI4X_COLOR_LCD_BG ].b ) / 0x10 ) ); + if ( !config.mono && i == COLOR_PIXEL_ON ) { + colors[ i ].r = ( 0x13 - contrast ) * ( colors[ COLOR_PIXEL_OFF ].r / 0x10 ); + colors[ i ].g = ( 0x13 - contrast ) * ( colors[ COLOR_PIXEL_OFF ].g / 0x10 ); + if ( config.black_lcd ) + colors[ i ].b = ( 0x13 - contrast ) * ( colors[ COLOR_PIXEL_OFF ].b / 0x10 ); + else + colors[ i ].b = 128 - ( ( 0x13 - contrast ) * ( ( 128 - colors[ COLOR_PIXEL_OFF ].b ) / 0x10 ) ); } } @@ -1031,13 +1035,10 @@ void ui_update_display_sdl( void ) SDL_SetRenderTarget( renderer, main_texture ); - int color_pixel_off = UI4X_COLOR_LCD_BG; - int color_pixel_on = ( config.black_lcd ? UI4X_COLOR_FRAME : UI4X_COLOR_LCD_PIXEL ); - for ( int y = 0; y < LCD_HEIGHT; ++y ) for ( int x = 0; x < LCD_WIDTH; ++x ) __draw_rect( DISPLAY_OFFSET_X + 5 + ( 2 * x ), DISPLAY_OFFSET_Y + 20 + ( 2 * y ), 2, 2, - lcd_pixels_buffer[ ( y * LCD_WIDTH ) + x ] ? color_pixel_on : color_pixel_off ); + lcd_pixels_buffer[ ( y * LCD_WIDTH ) + x ] ? COLOR_PIXEL_ON : COLOR_PIXEL_OFF ); SDL_SetRenderTarget( renderer, NULL ); SDL_RenderCopy( renderer, main_texture, NULL, NULL );