projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
00c3d9a
)
changed using function to get font offset for drawing
author
Holger Schemel
<info@artsoft.org>
Thu, 17 Feb 2022 16:36:47 +0000
(17:36 +0100)
committer
Holger Schemel
<info@artsoft.org>
Thu, 17 Feb 2022 16:37:07 +0000
(17:37 +0100)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index 49f390f973f643616266c0e1a78cfce6d6a432ce..243c6ef3556f8b148cf305fc5429a135cc4bd01f 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-4881,7
+4881,7
@@
static void drawChooseTreeText(int y, boolean active, TreeInfo *ti)
TreeInfo *node_first = getTreeInfoFirstGroupEntry(ti);
TreeInfo *node = getTreeInfoFromPos(node_first, entry_pos);
int font_nr = getChooseTreeFont(node, active);
TreeInfo *node_first = getTreeInfoFirstGroupEntry(ti);
TreeInfo *node = getTreeInfoFromPos(node_first, entry_pos);
int font_nr = getChooseTreeFont(node, active);
- int font_xoffset = getFont
BitmapInfo(font_nr)->draw_xoffset
;
+ int font_xoffset = getFont
DrawOffsetX(font_nr)
;
int xpos = MENU_SCREEN_START_XPOS;
int ypos = MENU_SCREEN_START_YPOS + y;
int startx = amSX + xpos * 32;
int xpos = MENU_SCREEN_START_XPOS;
int ypos = MENU_SCREEN_START_YPOS + y;
int startx = amSX + xpos * 32;
@@
-7772,10
+7772,10
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
if (scrollbar_needed && xpos > MENU_SCREEN_START_XPOS)
{
int max_menu_text_length = 26; // maximum text length for classic menu
if (scrollbar_needed && xpos > MENU_SCREEN_START_XPOS)
{
int max_menu_text_length = 26; // maximum text length for classic menu
- int font_xoffset = getFont
BitmapInfo(font_nr)->draw_xoffset
;
+ int font_xoffset = getFont
DrawOffsetX(font_nr)
;
int text_startx = mSX + MENU_SCREEN_START_XPOS * 32;
int text_font_nr = getMenuTextFont(FONT_MENU_2);
int text_startx = mSX + MENU_SCREEN_START_XPOS * 32;
int text_font_nr = getMenuTextFont(FONT_MENU_2);
- int text_font_xoffset = getFont
BitmapInfo(text_font_nr)->draw_xoffset
;
+ int text_font_xoffset = getFont
DrawOffsetX(text_font_nr)
;
int text_width = max_menu_text_length * getFontWidth(text_font_nr);
if (startx + font_xoffset < text_startx + text_width + text_font_xoffset)
int text_width = max_menu_text_length * getFontWidth(text_font_nr);
if (startx + font_xoffset < text_startx + text_width + text_font_xoffset)
@@
-7798,11
+7798,11
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
MENU_SCREEN_START_XPOS);
int max_menu_text_length_medium = max_menu_text_length_big * 2;
int check_font_nr = FONT_OPTION_ON; // known font that needs correction
MENU_SCREEN_START_XPOS);
int max_menu_text_length_medium = max_menu_text_length_big * 2;
int check_font_nr = FONT_OPTION_ON; // known font that needs correction
- int font1_xoffset = getFont
BitmapInfo(font_nr)->draw_xoffset
;
- int font2_xoffset = getFont
BitmapInfo(check_font_nr)->draw_xoffset
;
+ int font1_xoffset = getFont
DrawOffsetX(font_nr)
;
+ int font2_xoffset = getFont
DrawOffsetX(check_font_nr)
;
int text_startx = mSX + MENU_SCREEN_START_XPOS * 32;
int text_font_nr = getMenuTextFont(FONT_MENU_2);
int text_startx = mSX + MENU_SCREEN_START_XPOS * 32;
int text_font_nr = getMenuTextFont(FONT_MENU_2);
- int text_font_xoffset = getFont
BitmapInfo(text_font_nr)->draw_xoffset
;
+ int text_font_xoffset = getFont
DrawOffsetX(text_font_nr)
;
int text_width = max_menu_text_length_medium * getFontWidth(text_font_nr);
boolean correct_font_draw_xoffset = FALSE;
int text_width = max_menu_text_length_medium * getFontWidth(text_font_nr);
boolean correct_font_draw_xoffset = FALSE;
@@
-7818,7
+7818,7
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
// (this can happen for extreme/wrong values for font draw offset)
if (correct_font_draw_xoffset)
{
// (this can happen for extreme/wrong values for font draw offset)
if (correct_font_draw_xoffset)
{
- font_draw_xoffset_old = getFont
BitmapInfo(font_nr)->draw_xoffset
;
+ font_draw_xoffset_old = getFont
DrawOffsetX(font_nr)
;
font_draw_xoffset_modified = TRUE;
if (type & TYPE_KEY)
font_draw_xoffset_modified = TRUE;
if (type & TYPE_KEY)