summaryrefslogtreecommitdiff
path: root/src/gfx_func.h
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2018-06-24 17:34:42 +0100
committerMichael Lutz <michi@icosahedron.de>2018-06-24 19:32:04 +0200
commit458bc90678b93c0a087d0dda1e877166dac25a77 (patch)
treec54e322ec8c79e4ffd3260facaa5abc358d67388 /src/gfx_func.h
parent7fed8fe004b488c3cdb15de81b4ed213d22acab4 (diff)
downloadopenttd-458bc90678b93c0a087d0dda1e877166dac25a77.tar.xz
Fix: Poor contrast in cargo dest flow legend window cargo labels.
Select foreground colour depending on the brightness of the background. Previously all cargo labels were rendered using black text, even the background cargo colour was dark/black. As an example: FIRS coal was black text on a black background.
Diffstat (limited to 'src/gfx_func.h')
-rw-r--r--src/gfx_func.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gfx_func.h b/src/gfx_func.h
index 99461f907..9f7cb9153 100644
--- a/src/gfx_func.h
+++ b/src/gfx_func.h
@@ -187,7 +187,7 @@ int GetCharacterHeight(FontSize size);
extern DrawPixelInfo *_cur_dpi;
-TextColour GetContrastColour(uint8 background);
+TextColour GetContrastColour(uint8 background, uint8 threshold = 128);
/**
* All 16 colour gradients