projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e99bc0
)
fixed using narrow fonts for setup values on setup screens with scrollbar
author
Holger Schemel
<info@artsoft.org>
Fri, 15 Apr 2016 18:36:17 +0000
(20:36 +0200)
committer
Holger Schemel
<info@artsoft.org>
Fri, 15 Apr 2016 18:36:17 +0000
(20:36 +0200)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index c6e3c645c87796d4690ea98663725436cdbfbd8d..1743be63f92aee4c0f88e9d00a55d25790149364 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-5641,7
+5641,7
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
int ypos = MENU_SCREEN_START_YPOS + screen_pos;
int startx = mSX + xpos * 32;
int starty = mSY + ypos * 32;
int ypos = MENU_SCREEN_START_YPOS + screen_pos;
int startx = mSX + xpos * 32;
int starty = mSY + ypos * 32;
- int font_nr, font_
width
;
+ int font_nr, font_
nr_default, font_width_default
;
int type = si->type;
void *value = si->value;
char *value_string = getSetupValue(type, value);
int type = si->type;
void *value = si->value;
char *value_string = getSetupValue(type, value);
@@
-5673,8
+5673,10
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
startx = mSX + xpos * 32;
starty = mSY + ypos * 32;
startx = mSX + xpos * 32;
starty = mSY + ypos * 32;
- font_nr = getSetupValueFont(type, value);
- font_width = getFontWidth(font_nr);
+ font_nr_default = getSetupValueFont(type, value);
+ font_width_default = getFontWidth(font_nr_default);
+
+ font_nr = font_nr_default;
// special check if right-side setup values moved left due to scrollbar
if (scrollbar_needed && xpos > MENU_SCREEN_START_XPOS)
// special check if right-side setup values moved left due to scrollbar
if (scrollbar_needed && xpos > MENU_SCREEN_START_XPOS)
@@
-5692,7
+5694,6
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
startx = mSX + xpos * 32;
font_nr = getSetupValueFontNarrow(type, font_nr);
startx = mSX + xpos * 32;
font_nr = getSetupValueFontNarrow(type, font_nr);
- font_width = getFontWidth(font_nr);
}
}
}
}
@@
-5735,7
+5736,7
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
}
for (i = 0; i <= menu_screen_max_xpos - xpos; i++)
}
for (i = 0; i <= menu_screen_max_xpos - xpos; i++)
- DrawText(startx + i * font_width
, starty, " ", font_nr
);
+ DrawText(startx + i * font_width
_default, starty, " ", font_nr_default
);
DrawText(startx, starty, value_string, font_nr);
DrawText(startx, starty, value_string, font_nr);