summaryrefslogtreecommitdiff
path: root/src/gfx_func.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-05-30 15:32:37 +0000
committerfrosch <frosch@openttd.org>2010-05-30 15:32:37 +0000
commit4b7afccd46d99ecb80e91f5ae34948a706980d05 (patch)
tree18585c7612ecf9461eb3b910ad5eec6296c7eb45 /src/gfx_func.h
parent2224c9b515b2e63b7268221905772770352e5425 (diff)
downloadopenttd-4b7afccd46d99ecb80e91f5ae34948a706980d05.tar.xz
(svn r19911) -Codechange: Simplify text drawing by eliminating global variables and side effects. This also fixes the 'colour' parameter of DrawStringMultiLine().
Diffstat (limited to 'src/gfx_func.h')
-rw-r--r--src/gfx_func.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gfx_func.h b/src/gfx_func.h
index 1bbaefc17..d76e02f01 100644
--- a/src/gfx_func.h
+++ b/src/gfx_func.h
@@ -112,9 +112,9 @@ void GfxFillRect(int left, int top, int right, int bottom, int colour, FillRectM
void GfxDrawLine(int left, int top, int right, int bottom, int colour);
void DrawBox(int x, int y, int dx1, int dy1, int dx2, int dy2, int dx3, int dy3);
-Dimension GetStringBoundingBox(const char *str);
+Dimension GetStringBoundingBox(const char *str, FontSize start_fontsize = FS_NORMAL);
Dimension GetStringBoundingBox(StringID strid);
-uint32 FormatStringLinebreaks(char *str, const char *last, int maxw);
+uint32 FormatStringLinebreaks(char *str, const char *last, int maxw, FontSize start_fontsize = FS_NORMAL);
int GetStringHeight(StringID str, int maxw);
Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion);
void LoadStringWidthTable();
@@ -155,8 +155,6 @@ void SortResolutions(int count);
bool ToggleFullScreen(bool fs);
/* gfx.cpp */
-extern FontSize _cur_fontsize; ///< Currently selected font.
-
byte GetCharacterWidth(FontSize size, uint32 key);
byte GetDigitWidth(FontSize size = FS_NORMAL);