diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-04-23 22:39:26 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-04-23 22:39:26 +0000 |
commit | 69cf82185e7f559d8858b44fa76379c771acc6b6 (patch) | |
tree | 408ec5fb96da98a352588858db9ac3184d438b07 /src/lua | |
parent | eecfb075df0c92a46c73901ee3cacbf061742825 (diff) | |
download | usdx-69cf82185e7f559d8858b44fa76379c771acc6b6.tar.gz usdx-69cf82185e7f559d8858b44fa76379c771acc6b6.tar.xz usdx-69cf82185e7f559d8858b44fa76379c771acc6b6.zip |
- 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
Diffstat (limited to '')
-rw-r--r-- | src/lua/ULuaTextGL.pas | 5 |
1 files changed, 3 insertions, 2 deletions
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; |