summaryrefslogtreecommitdiff
path: root/src/menus.c
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-12-11 00:53:34 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:22:37 +0200
commit84e9c736f38032d10630389fd1c73e025dd9d1c8 (patch)
treeb2796d4f2d8acda5e572c539c40eca42a07bd793 /src/menus.c
parent5e994635777d7a4d5330e1c1fc0bf971e3000259 (diff)
Implemented the mp_config stubs.
Fixed a small error with menus (wrong font size was being used in RenderMenuElement -- was visible with custom maps with long names).
Diffstat (limited to 'src/menus.c')
-rw-r--r--src/menus.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/menus.c b/src/menus.c
index 09628aa..1359786 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -388,6 +388,18 @@ int LengthOfMenuText(char *textPtr)
return width;
}
+int LengthOfSmallMenuText(char *textPtr)
+{
+ int width = 0;
+
+ while (textPtr && *textPtr) {
+ width += AAFontWidths[(unsigned int) *textPtr];
+
+ textPtr++;
+ }
+ return width;
+}
+
int RenderMenuText(char *textPtr, int sx, int sy, int alpha, enum AVPMENUFORMAT_ID format)
{
int width;