From 90c49ce1efe94f226e88d3dd3982240dc09052b9 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 3 Oct 2024 15:47:48 +0200 Subject: [PATCH] rename button_t.label to .label_text --- src/ui4x/48gx.c | 98 ++++++++++++++++++++++----------------------- src/ui4x/48sx.c | 98 ++++++++++++++++++++++----------------------- src/ui4x/49g.c | 102 +++++++++++++++++++++++------------------------ src/ui4x/inner.h | 2 +- src/ui4x/sdl2.c | 8 ++-- 5 files changed, 154 insertions(+), 154 deletions(-) diff --git a/src/ui4x/48gx.c b/src/ui4x/48gx.c index 3f375c5..473ba2f 100644 --- a/src/ui4x/48gx.c +++ b/src/ui4x/48gx.c @@ -180,7 +180,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -195,7 +195,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -210,7 +210,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -225,7 +225,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -240,7 +240,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -255,7 +255,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -271,7 +271,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "MTH", + .label_text = "MTH", .font_size = 0, .lw = 0, .lh = 0, @@ -286,7 +286,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "PRG", + .label_text = "PRG", .font_size = 0, .lw = 0, .lh = 0, @@ -301,7 +301,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "CST", + .label_text = "CST", .font_size = 0, .lw = 0, .lh = 0, @@ -316,7 +316,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "VAR", + .label_text = "VAR", .font_size = 0, .lw = 0, .lh = 0, @@ -331,7 +331,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = up_width, .lh = up_height, @@ -346,7 +346,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "NXT", + .label_text = "NXT", .font_size = 0, .lw = 0, .lh = 0, @@ -362,7 +362,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = quote_width, .lh = quote_height, @@ -377,7 +377,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "STO", + .label_text = "STO", .font_size = 0, .lw = 0, .lh = 0, @@ -392,7 +392,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "EVAL", + .label_text = "EVAL", .font_size = 0, .lw = 0, .lh = 0, @@ -407,7 +407,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = left_width, .lh = left_height, @@ -422,7 +422,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = down_width, .lh = down_height, @@ -437,7 +437,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = right_width, .lh = right_height, @@ -453,7 +453,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "SIN", + .label_text = "SIN", .font_size = 0, .lw = 0, .lh = 0, @@ -468,7 +468,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "COS", + .label_text = "COS", .font_size = 0, .lw = 0, .lh = 0, @@ -483,7 +483,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "TAN", + .label_text = "TAN", .font_size = 0, .lw = 0, .lh = 0, @@ -498,7 +498,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = sqrt_width, .lh = sqrt_height, @@ -513,7 +513,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = power_width, .lh = power_height, @@ -528,7 +528,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = inv_width, .lh = inv_height, @@ -544,7 +544,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 86, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "ENTER", + .label_text = "ENTER", .font_size = 2, .lw = 0, .lh = 0, @@ -559,7 +559,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = neg_width, .lh = neg_height, @@ -574,7 +574,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "EEX", + .label_text = "EEX", .font_size = 0, .lw = 0, .lh = 0, @@ -589,7 +589,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "DEL", + .label_text = "DEL", .font_size = 0, .lw = 0, .lh = 0, @@ -604,7 +604,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = bs_width, .lh = bs_height, @@ -620,7 +620,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = alpha_width, .lh = alpha_height, @@ -635,7 +635,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "7", + .label_text = "7", .font_size = 1, .lw = 0, .lh = 0, @@ -650,7 +650,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "8", + .label_text = "8", .font_size = 1, .lw = 0, .lh = 0, @@ -665,7 +665,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "9", + .label_text = "9", .font_size = 1, .lw = 0, .lh = 0, @@ -680,7 +680,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = div_width, .lh = div_height, @@ -696,7 +696,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_SHIFT_LEFT, - .label = 0, + .label_text = 0, .font_size = 0, .lw = shl_width, .lh = shl_height, @@ -711,7 +711,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "4", + .label_text = "4", .font_size = 1, .lw = 0, .lh = 0, @@ -726,7 +726,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "5", + .label_text = "5", .font_size = 1, .lw = 0, .lh = 0, @@ -741,7 +741,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "6", + .label_text = "6", .font_size = 1, .lw = 0, .lh = 0, @@ -756,7 +756,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = mul_width, .lh = mul_height, @@ -772,7 +772,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_SHIFT_RIGHT, - .label = 0, + .label_text = 0, .font_size = 0, .lw = shr_width, .lh = shr_height, @@ -787,7 +787,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "1", + .label_text = "1", .font_size = 1, .lw = 0, .lh = 0, @@ -802,7 +802,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "2", + .label_text = "2", .font_size = 1, .lw = 0, .lh = 0, @@ -817,7 +817,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "3", + .label_text = "3", .font_size = 1, .lw = 0, .lh = 0, @@ -832,7 +832,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = minus_width, .lh = minus_height, @@ -848,7 +848,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "ON", + .label_text = "ON", .font_size = 0, .lw = 0, .lh = 0, @@ -863,7 +863,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "0", + .label_text = "0", .font_size = 1, .lw = 0, .lh = 0, @@ -878,7 +878,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = ".", + .label_text = ".", .font_size = 1, .lw = 0, .lh = 0, @@ -893,7 +893,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "SPC", + .label_text = "SPC", .font_size = 0, .lw = 0, .lh = 0, @@ -908,7 +908,7 @@ button_t buttons_48gx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = plus_width, .lh = plus_height, diff --git a/src/ui4x/48sx.c b/src/ui4x/48sx.c index 941c430..11d9607 100644 --- a/src/ui4x/48sx.c +++ b/src/ui4x/48sx.c @@ -180,7 +180,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -195,7 +195,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -210,7 +210,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -225,7 +225,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -240,7 +240,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -255,7 +255,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 23, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = menu_label_width, .lh = menu_label_height, @@ -271,7 +271,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "MTH", + .label_text = "MTH", .font_size = 0, .lw = 0, .lh = 0, @@ -286,7 +286,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "PRG", + .label_text = "PRG", .font_size = 0, .lw = 0, .lh = 0, @@ -301,7 +301,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "CST", + .label_text = "CST", .font_size = 0, .lw = 0, .lh = 0, @@ -316,7 +316,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "VAR", + .label_text = "VAR", .font_size = 0, .lw = 0, .lh = 0, @@ -331,7 +331,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = up_width, .lh = up_height, @@ -346,7 +346,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "NXT", + .label_text = "NXT", .font_size = 0, .lw = 0, .lh = 0, @@ -362,7 +362,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = quote_width, .lh = quote_height, @@ -377,7 +377,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "STO", + .label_text = "STO", .font_size = 0, .lw = 0, .lh = 0, @@ -392,7 +392,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "EVAL", + .label_text = "EVAL", .font_size = 0, .lw = 0, .lh = 0, @@ -407,7 +407,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = left_width, .lh = left_height, @@ -422,7 +422,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = down_width, .lh = down_height, @@ -437,7 +437,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = right_width, .lh = right_height, @@ -453,7 +453,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "SIN", + .label_text = "SIN", .font_size = 0, .lw = 0, .lh = 0, @@ -468,7 +468,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "COS", + .label_text = "COS", .font_size = 0, .lw = 0, .lh = 0, @@ -483,7 +483,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "TAN", + .label_text = "TAN", .font_size = 0, .lw = 0, .lh = 0, @@ -498,7 +498,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = sqrt_width, .lh = sqrt_height, @@ -513,7 +513,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = power_width, .lh = power_height, @@ -528,7 +528,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = inv_width, .lh = inv_height, @@ -544,7 +544,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 86, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "ENTER", + .label_text = "ENTER", .font_size = 2, .lw = 0, .lh = 0, @@ -559,7 +559,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = neg_width, .lh = neg_height, @@ -574,7 +574,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "EEX", + .label_text = "EEX", .font_size = 0, .lw = 0, .lh = 0, @@ -589,7 +589,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "DEL", + .label_text = "DEL", .font_size = 0, .lw = 0, .lh = 0, @@ -604,7 +604,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = bs_width, .lh = bs_height, @@ -620,7 +620,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = alpha_width, .lh = alpha_height, @@ -635,7 +635,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "7", + .label_text = "7", .font_size = 1, .lw = 0, .lh = 0, @@ -650,7 +650,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "8", + .label_text = "8", .font_size = 1, .lw = 0, .lh = 0, @@ -665,7 +665,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "9", + .label_text = "9", .font_size = 1, .lw = 0, .lh = 0, @@ -680,7 +680,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = div_width, .lh = div_height, @@ -696,7 +696,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_SHIFT_LEFT, - .label = 0, + .label_text = 0, .font_size = 0, .lw = shl_width, .lh = shl_height, @@ -711,7 +711,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "4", + .label_text = "4", .font_size = 1, .lw = 0, .lh = 0, @@ -726,7 +726,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "5", + .label_text = "5", .font_size = 1, .lw = 0, .lh = 0, @@ -741,7 +741,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "6", + .label_text = "6", .font_size = 1, .lw = 0, .lh = 0, @@ -756,7 +756,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = mul_width, .lh = mul_height, @@ -772,7 +772,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_SHIFT_RIGHT, - .label = 0, + .label_text = 0, .font_size = 0, .lw = shr_width, .lh = shr_height, @@ -787,7 +787,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "1", + .label_text = "1", .font_size = 1, .lw = 0, .lh = 0, @@ -802,7 +802,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "2", + .label_text = "2", .font_size = 1, .lw = 0, .lh = 0, @@ -817,7 +817,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "3", + .label_text = "3", .font_size = 1, .lw = 0, .lh = 0, @@ -832,7 +832,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = minus_width, .lh = minus_height, @@ -848,7 +848,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "ON", + .label_text = "ON", .font_size = 0, .lw = 0, .lh = 0, @@ -863,7 +863,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "0", + .label_text = "0", .font_size = 1, .lw = 0, .lh = 0, @@ -878,7 +878,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = ".", + .label_text = ".", .font_size = 1, .lw = 0, .lh = 0, @@ -893,7 +893,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "SPC", + .label_text = "SPC", .font_size = 0, .lw = 0, .lh = 0, @@ -908,7 +908,7 @@ button_t buttons_48sx[ NB_HP48_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = plus_width, .lh = plus_height, diff --git a/src/ui4x/49g.c b/src/ui4x/49g.c index 012cf9e..1060c1c 100644 --- a/src/ui4x/49g.c +++ b/src/ui4x/49g.c @@ -182,7 +182,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "F1", + .label_text = "F1", .font_size = 0, .lw = 0, .lh = 0, @@ -197,7 +197,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "F2", + .label_text = "F2", .font_size = 0, .lw = 0, .lh = 0, @@ -212,7 +212,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "F3", + .label_text = "F3", .font_size = 0, .lw = 0, .lh = 0, @@ -227,7 +227,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "F4", + .label_text = "F4", .font_size = 0, .lw = 0, .lh = 0, @@ -242,7 +242,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "F5", + .label_text = "F5", .font_size = 0, .lw = 0, .lh = 0, @@ -257,7 +257,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 36, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "F6", + .label_text = "F6", .font_size = 0, .lw = 0, .lh = 0, @@ -273,7 +273,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "APPS", + .label_text = "APPS", .font_size = 0, .lw = 0, .lh = 0, @@ -288,7 +288,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "MODE", + .label_text = "MODE", .font_size = 0, .lw = 0, .lh = 0, @@ -303,7 +303,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "TOOL", + .label_text = "TOOL", .font_size = 0, .lw = 0, .lh = 0, @@ -319,7 +319,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "VAR", + .label_text = "VAR", .font_size = 0, .lw = 0, .lh = 0, @@ -334,7 +334,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "STO", + .label_text = "STO", .font_size = 0, .lw = 0, .lh = 0, @@ -349,7 +349,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "NXT", + .label_text = "NXT", .font_size = 0, .lw = 0, .lh = 0, @@ -365,7 +365,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = left_width, .lh = left_height, @@ -380,7 +380,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = up_width, .lh = up_height, @@ -395,7 +395,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = right_width, .lh = right_height, @@ -410,7 +410,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = down_width, .lh = down_height, @@ -426,7 +426,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "HIST", + .label_text = "HIST", .font_size = 0, .lw = 0, .lh = 0, @@ -441,7 +441,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "CAT", + .label_text = "CAT", .font_size = 0, .lw = 0, .lh = 0, @@ -456,7 +456,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "EQW", + .label_text = "EQW", .font_size = 0, .lw = 0, .lh = 0, @@ -471,7 +471,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "SYMB", + .label_text = "SYMB", .font_size = 0, .lw = 0, .lh = 0, @@ -486,7 +486,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = bs_width, .lh = bs_height, @@ -502,7 +502,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = power_width, .lh = power_height, @@ -517,7 +517,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = sqrt_width, .lh = sqrt_height, @@ -532,7 +532,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "SIN", + .label_text = "SIN", .font_size = 0, .lw = 0, .lh = 0, @@ -547,7 +547,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "COS", + .label_text = "COS", .font_size = 2, .lw = 0, .lh = 0, @@ -562,7 +562,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "TAN", + .label_text = "TAN", .font_size = 0, .lw = 0, .lh = 0, @@ -578,7 +578,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "EEX", + .label_text = "EEX", .font_size = 0, .lw = 0, .lh = 0, @@ -593,7 +593,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = neg_width, .lh = neg_height, @@ -608,7 +608,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "X", + .label_text = "X", .font_size = 0, .lw = 0, .lh = 0, @@ -623,7 +623,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = inv_width, .lh = inv_height, @@ -638,7 +638,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = div_width, .lh = div_height, @@ -654,7 +654,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = alpha_width, .lh = alpha_height, @@ -669,7 +669,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "7", + .label_text = "7", .font_size = 1, .lw = 0, .lh = 0, @@ -684,7 +684,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "8", + .label_text = "8", .font_size = 1, .lw = 0, .lh = 0, @@ -699,7 +699,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "9", + .label_text = "9", .font_size = 1, .lw = 0, .lh = 0, @@ -714,7 +714,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = mul_width, .lh = mul_height, @@ -730,7 +730,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_SHIFT_LEFT, - .label = 0, + .label_text = 0, .font_size = 0, .lw = shl_width, .lh = shl_height, @@ -745,7 +745,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "4", + .label_text = "4", .font_size = 1, .lw = 0, .lh = 0, @@ -760,7 +760,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "5", + .label_text = "5", .font_size = 1, .lw = 0, .lh = 0, @@ -775,7 +775,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "6", + .label_text = "6", .font_size = 1, .lw = 0, .lh = 0, @@ -790,7 +790,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = minus_width, .lh = minus_height, @@ -806,7 +806,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_SHIFT_RIGHT, - .label = 0, + .label_text = 0, .font_size = 0, .lw = shr_width, .lh = shr_height, @@ -821,7 +821,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "1", + .label_text = "1", .font_size = 1, .lw = 0, .lh = 0, @@ -836,7 +836,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "2", + .label_text = "2", .font_size = 1, .lw = 0, .lh = 0, @@ -851,7 +851,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "3", + .label_text = "3", .font_size = 1, .lw = 0, .lh = 0, @@ -866,7 +866,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = 0, + .label_text = 0, .font_size = 0, .lw = plus_width, .lh = plus_height, @@ -882,7 +882,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "ON", + .label_text = "ON", .font_size = 0, .lw = 0, .lh = 0, @@ -897,7 +897,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "0", + .label_text = "0", .font_size = 1, .lw = 0, .lh = 0, @@ -912,7 +912,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = ".", + .label_text = ".", .font_size = 1, .lw = 0, .lh = 0, @@ -927,7 +927,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "SPC", + .label_text = "SPC", .font_size = 0, .lw = 0, .lh = 0, @@ -942,7 +942,7 @@ button_t buttons_49g[ NB_HP49_KEYS ] = { .w = 46, .h = 26, .label_color = UI4X_COLOR_WHITE, - .label = "ENTER", + .label_text = "ENTER", .font_size = 0, .lw = 0, .lh = 0, diff --git a/src/ui4x/inner.h b/src/ui4x/inner.h index 8ff5298..8a09b46 100644 --- a/src/ui4x/inner.h +++ b/src/ui4x/inner.h @@ -53,7 +53,7 @@ typedef struct button_t { /* label on the button (text or bitmap) */ int label_color; - const char* label; + const char* label_text; unsigned int lw, lh; unsigned char* lb; diff --git a/src/ui4x/sdl2.c b/src/ui4x/sdl2.c index d67ad87..7e19895 100644 --- a/src/ui4x/sdl2.c +++ b/src/ui4x/sdl2.c @@ -563,15 +563,15 @@ static SDL_Texture* create_button_texture( int hpkey, bool is_up ) __draw_rect( 1, 1, BUTTONS[ hpkey ].w - 2, BUTTONS[ hpkey ].h - 2, UI4X_COLOR_BUTTON ); // draw label in button - if ( BUTTONS[ hpkey ].label != ( char* )0 ) { + if ( BUTTONS[ hpkey ].label_text != ( char* )0 ) { /* Button has a text label */ - x = strlen( BUTTONS[ hpkey ].label ) - 1; - x += ( ( BUTTONS[ hpkey ].w - BigTextWidth( BUTTONS[ hpkey ].label, strlen( BUTTONS[ hpkey ].label ) ) ) / 2 ); + x = strlen( BUTTONS[ hpkey ].label_text ) - 1; + x += ( ( BUTTONS[ hpkey ].w - BigTextWidth( BUTTONS[ hpkey ].label_text, strlen( BUTTONS[ hpkey ].label_text ) ) ) / 2 ); y = ( BUTTONS[ hpkey ].h + 1 ) / 2 - 6; if ( is_down ) y -= 1; - write_with_big_font( x, y, BUTTONS[ hpkey ].label, BUTTONS[ hpkey ].label_color, UI4X_COLOR_BUTTON ); + write_with_big_font( x, y, BUTTONS[ hpkey ].label_text, BUTTONS[ hpkey ].label_color, UI4X_COLOR_BUTTON ); } else if ( BUTTONS[ hpkey ].lw != 0 ) { /* Button has a texture */ x = ( 1 + BUTTONS[ hpkey ].w - BUTTONS[ hpkey ].lw ) / 2;