瀏覽代碼

Font:getWidth returns the width of the last line;

bjorn 3 年之前
父節點
當前提交
6ae7af427d
共有 1 個文件被更改,包括 5 次插入0 次删除
  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 = [[