Parcourir la source

Font:getWidth returns the width of the last line;

bjorn il y a 3 ans
Parent
commit
6ae7af427d
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      api/lovr/graphics/Font/getWidth.lua

+ 5 - 0
api/lovr/graphics/Font/getWidth.lua

@@ -27,6 +27,11 @@ return {
       name = 'lines',
       type = 'number',
       description = 'The number of lines in the wrapped text.'
+    },
+    {
+      name = 'lastwidth',
+      type = 'number',
+      description = 'The width of the last line of text (to assist in text layout).'
     }
   },
   notes = [[