projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f19c6cb
)
fixed and added some comments
author
Holger Schemel
<info@artsoft.org>
Wed, 13 Apr 2022 22:42:29 +0000
(
00:42
+0200)
committer
Holger Schemel
<info@artsoft.org>
Wed, 13 Apr 2022 22:45:01 +0000
(
00:45
+0200)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index 2f2352cde7798033142a951dc9c2568d96352d8b..f653dd5dc8f6ec27d084084bf9d50119454be8d4 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-5436,7
+5436,7
@@
static void DrawScoreInfo_Content(int entry_nr)
ClearField();
ClearField();
- // redraw
score
selection buttons (which have just been erased)
+ // redraw
level
selection buttons (which have just been erased)
RedrawScreenMenuGadgets(SCREEN_MASK_SCORES);
if (score_entries == NULL)
RedrawScreenMenuGadgets(SCREEN_MASK_SCORES);
if (score_entries == NULL)
@@
-9736,12
+9736,14
@@
static void CreateScreenMenubuttons(void)
if (strPrefix(leveldir_current->identifier, "snake_bite"))
title_width = strlen(INFOTEXT_SCORE_ENTRY) * 32;
if (strPrefix(leveldir_current->identifier, "snake_bite"))
title_width = strlen(INFOTEXT_SCORE_ENTRY) * 32;
+ // use "SX" here to center buttons (ignore horizontal draw offset)
if (pos->x == -1)
x = (id == SCREEN_CTRL_ID_PREV_LEVEL2 ?
SX + (SXSIZE - title_width) / 2 - width * 3 / 2 :
id == SCREEN_CTRL_ID_NEXT_LEVEL2 ?
SX + (SXSIZE + title_width) / 2 + width / 2 : 0);
if (pos->x == -1)
x = (id == SCREEN_CTRL_ID_PREV_LEVEL2 ?
SX + (SXSIZE - title_width) / 2 - width * 3 / 2 :
id == SCREEN_CTRL_ID_NEXT_LEVEL2 ?
SX + (SXSIZE + title_width) / 2 + width / 2 : 0);
+ // use "mSY" here to place buttons (respect vertical draw offset)
if (pos->y == -1)
y = (id == SCREEN_CTRL_ID_PREV_LEVEL2 ||
id == SCREEN_CTRL_ID_NEXT_LEVEL2 ? mSY + MENU_TITLE1_YPOS : 0);
if (pos->y == -1)
y = (id == SCREEN_CTRL_ID_PREV_LEVEL2 ||
id == SCREEN_CTRL_ID_NEXT_LEVEL2 ? mSY + MENU_TITLE1_YPOS : 0);