X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=1291b8ea9dacc8d010d869ddfba418de7ff98341;hb=d5aae18363bcd9867d27d8db5bdcf1d8579bb42c;hp=6f6e7a13dec6b5c2c28e709dbdd3e75e23c19d42;hpb=6dd55346a5d7a35592294313893c14e0641e15ae;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 6f6e7a13..1291b8ea 100644 --- a/src/screens.c +++ b/src/screens.c @@ -749,19 +749,19 @@ static struct MainControlInfo main_controls[] = #endif { MAIN_CONTROL_FIRST_LEVEL, - NULL, -1, + &menu.main.button.first_level, IMG_MENU_BUTTON_FIRST_LEVEL, &menu.main.text.first_level, &main_text_first_level, NULL, NULL, }, { MAIN_CONTROL_LAST_LEVEL, - NULL, -1, + &menu.main.button.last_level, IMG_MENU_BUTTON_LAST_LEVEL, &menu.main.text.last_level, &main_text_last_level, NULL, NULL, }, { MAIN_CONTROL_LEVEL_NUMBER, - NULL, -1, + &menu.main.button.level_number, IMG_MENU_BUTTON_LEVEL_NUMBER, &menu.main.text.level_number, &main_text_level_number, NULL, NULL, }, @@ -1148,8 +1148,8 @@ static void InitializeMainControls() if (pos_text != NULL) /* (x/y may be -1/-1 here) */ { - /* calculate size for non-clickable text -- needed for text alignment */ - boolean calculate_text_size = (pos_button == NULL && text != NULL); + /* calculate text size -- needed for text alignment */ + boolean calculate_text_size = (text != NULL); if (pos_text->width == -1 || calculate_text_size) pos_text->width = text_width; @@ -6026,8 +6026,10 @@ static struct TokenInfo setup_info_touch_virtual_buttons_0[] = { TYPE_STRING, &grid_size_text[0][0], "" }, { TYPE_ENTER_LIST, execSetupChooseGridYSize_0, "Vertical Buttons (Landscape):" }, { TYPE_STRING, &grid_size_text[0][1], "" }, - { TYPE_ENTER_LIST, execSetupChooseTransparency, "Transparency:" }, + { TYPE_ENTER_LIST, execSetupChooseTransparency, "Button Transparency:" }, { TYPE_STRING, &transparency_text, "" }, + { TYPE_SWITCH, &setup.touch.draw_outlined, "Draw Buttons Outlined:" }, + { TYPE_SWITCH, &setup.touch.draw_pressed, "Highlight Pressed Buttons:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_ENTER_LIST, execSetupConfigureVirtualButtons, "Configure Virtual Buttons" }, { TYPE_EMPTY, NULL, "" }, @@ -6045,8 +6047,10 @@ static struct TokenInfo setup_info_touch_virtual_buttons_1[] = { TYPE_STRING, &grid_size_text[1][0], "" }, { TYPE_ENTER_LIST, execSetupChooseGridYSize_1, "Vertical Buttons (Portrait):" }, { TYPE_STRING, &grid_size_text[1][1], "" }, - { TYPE_ENTER_LIST, execSetupChooseTransparency, "Transparency:" }, + { TYPE_ENTER_LIST, execSetupChooseTransparency, "Button Transparency:" }, { TYPE_STRING, &transparency_text, "" }, + { TYPE_SWITCH, &setup.touch.draw_outlined, "Draw Buttons Outlined:" }, + { TYPE_SWITCH, &setup.touch.draw_pressed, "Highlight Pressed Buttons:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_ENTER_LIST, execSetupConfigureVirtualButtons, "Configure Virtual Buttons" }, { TYPE_EMPTY, NULL, "" }, @@ -7554,13 +7558,19 @@ boolean ConfigureVirtualButtonsMain() /* press 'Enter' to keep the existing key binding */ if (key == KSYM_Return || +#if defined(TARGET_SDL2) key == KSYM_Menu || +#endif key == KSYM_space) { step_nr++; } - else if (key == KSYM_BackSpace || - key == KSYM_Back) + else if (key == KSYM_BackSpace +#if defined(TARGET_SDL2) + || + key == KSYM_Back +#endif + ) { if (step_nr == 0) {