forked from mirror/OpenTTD
Change: Scale position of font shadow.
This commit is contained in:
@@ -564,6 +564,8 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||
NOT_REACHED();
|
||||
}
|
||||
|
||||
const uint shadow_offset = ScaleGUITrad(1);
|
||||
|
||||
TextColour colour = TC_BLACK;
|
||||
bool draw_shadow = false;
|
||||
for (int run_index = 0; run_index < line.CountRuns(); run_index++) {
|
||||
@@ -599,7 +601,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||
|
||||
if (draw_shadow && (glyph & SPRITE_GLYPH) == 0) {
|
||||
SetColourRemap(TC_BLACK);
|
||||
GfxMainBlitter(sprite, begin_x + 1, top + 1, BM_COLOUR_REMAP);
|
||||
GfxMainBlitter(sprite, begin_x + shadow_offset, top + shadow_offset, BM_COLOUR_REMAP);
|
||||
SetColourRemap(colour);
|
||||
}
|
||||
GfxMainBlitter(sprite, begin_x, top, BM_COLOUR_REMAP);
|
||||
@@ -611,7 +613,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||
for (int i = 0; i < 3; i++, x += dot_width) {
|
||||
if (draw_shadow) {
|
||||
SetColourRemap(TC_BLACK);
|
||||
GfxMainBlitter(dot_sprite, x + 1, y + 1, BM_COLOUR_REMAP);
|
||||
GfxMainBlitter(dot_sprite, x + shadow_offset, y + shadow_offset, BM_COLOUR_REMAP);
|
||||
SetColourRemap(colour);
|
||||
}
|
||||
GfxMainBlitter(dot_sprite, x, y, BM_COLOUR_REMAP);
|
||||
|
Reference in New Issue
Block a user