From 69cf82185e7f559d8858b44fa76379c771acc6b6 Mon Sep 17 00:00:00 2001 From: tobigun Date: Fri, 23 Apr 2010 22:39:26 +0000 Subject: - font fallback added - more configurable fonts.ini - ftNormal/ftBold/ftOutline1/2 added git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2293 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lua/ULuaTextGL.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lua') diff --git a/src/lua/ULuaTextGL.pas b/src/lua/ULuaTextGL.pas index 1db41b21..2e70a2c1 100644 --- a/src/lua/ULuaTextGL.pas +++ b/src/lua/ULuaTextGL.pas @@ -35,6 +35,7 @@ interface uses TextGL, + SysUtils, ULua; { TextGl.Pos(X, Y: Float) : sets font position } @@ -99,10 +100,10 @@ function ULuaTextGL_Style(L: Plua_State): Integer; cdecl; begin Style := luaL_checkinteger(L, 1); - if (Style >= 0) and (Style <= 3) then + if (Style >= 0) and (Style < Length(Fonts)) then SetFontStyle(Style) else - luaL_ArgError(L, 1, PChar('number from 0 to 3 expected')); + luaL_ArgError(L, 1, PChar('number from 0 to ' + IntToStr(High(Fonts)) + ' expected')); Result := 0; end; -- cgit v1.2.3