From: Holger Schemel Date: Wed, 14 Dec 2022 11:18:47 +0000 (+0100) Subject: added dynamic default screen position for button to show level set info X-Git-Tag: 4.3.4.0~18 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=32a5b3574b41354734b444313e91725e9c452b90;p=rocksndiamonds.git added dynamic default screen position for button to show level set info --- diff --git a/src/screens.c b/src/screens.c index 8a471ecb..d986f8d9 100644 --- a/src/screens.c +++ b/src/screens.c @@ -9770,6 +9770,16 @@ static void CreateScreenMenubuttons(void) id == SCREEN_CTRL_ID_NEXT_LEVEL2 ? mSY + MENU_TITLE1_YPOS : 0); } + if (id == SCREEN_CTRL_ID_LEVELSET_INFO) + { + if (pos->x == -1 && pos->y == -1) + { + // use "SX" here to place button (ignore draw offsets) + x = SX + SXSIZE - 2 * TILESIZE; + y = SY + SYSIZE - 2 * TILESIZE; + } + } + gi = CreateGadget(GDI_CUSTOM_ID, id, GDI_CUSTOM_TYPE_ID, i, GDI_IMAGE_ID, gfx_unpressed,