Browse Source

Pass:text update;

bjorn 3 years ago
parent
commit
df5f80d1d7
2 changed files with 7 additions and 89 deletions
  1. 3 76
      api/init.lua
  2. 4 13
      api/lovr/graphics/Pass/text.lua

+ 3 - 76
api/init.lua

@@ -15775,82 +15775,6 @@ return {
                 },
                 {
                   arguments = {
-                    {
-                      name = "font",
-                      type = "Font",
-                      description = "The Font to use."
-                    },
-                    {
-                      name = "text",
-                      type = "string",
-                      description = "The text to render."
-                    },
-                    {
-                      name = "transform",
-                      type = "transform",
-                      description = "The transform of the text."
-                    },
-                    {
-                      name = "wrap",
-                      type = "number",
-                      description = "The maximum width of each line in meters (before scale is applied).  When zero, the text will not wrap.",
-                      default = "0"
-                    },
-                    {
-                      name = "halign",
-                      type = "HorizontalAlign",
-                      description = "The horizontal alignment.",
-                      default = "'center'"
-                    },
-                    {
-                      name = "valign",
-                      type = "VerticalAlign",
-                      description = "The vertical alignment.",
-                      default = "'middle'"
-                    }
-                  },
-                  returns = {}
-                },
-                {
-                  arguments = {
-                    {
-                      name = "colortext",
-                      type = "table",
-                      description = "A table of strings with colors to render, in the form `{ color1, string1, color2, string2\n      }`, where color is a `Color`."
-                    },
-                    {
-                      name = "transform",
-                      type = "transform",
-                      description = "The transform of the text."
-                    },
-                    {
-                      name = "wrap",
-                      type = "number",
-                      description = "The maximum width of each line in meters (before scale is applied).  When zero, the text will not wrap.",
-                      default = "0"
-                    },
-                    {
-                      name = "halign",
-                      type = "HorizontalAlign",
-                      description = "The horizontal alignment.",
-                      default = "'center'"
-                    },
-                    {
-                      name = "valign",
-                      type = "VerticalAlign",
-                      description = "The vertical alignment.",
-                      default = "'middle'"
-                    }
-                  },
-                  returns = {}
-                },
-                {
-                  arguments = {
-                    {
-                      name = "font",
-                      type = "Font",
-                      description = "The Font to use."
-                    },
                     {
                       name = "colortext",
                       type = "table",
@@ -15882,6 +15806,9 @@ return {
                   },
                   returns = {}
                 }
+              },
+              related = {
+                "Pass:setFont"
               }
             },
             {

+ 4 - 13
api/lovr/graphics/Pass/text.lua

@@ -3,10 +3,6 @@ return {
   summary = 'Draw text.',
   description = 'TODO',
   arguments = {
-    font = {
-      type = 'Font',
-      description = 'The Font to use.'
-    },
     text = {
       type = 'string',
       description = 'The text to render.'
@@ -47,18 +43,13 @@ return {
       arguments = { 'text', 'transform', 'wrap', 'halign', 'valign' },
       returns = {}
     },
-    {
-      arguments = { 'font', 'text', 'transform', 'wrap', 'halign', 'valign' },
-      returns = {}
-    },
     {
       arguments = { 'colortext', 'transform', 'wrap', 'halign', 'valign' },
       returns = {}
-    },
-    {
-      arguments = { 'font', 'colortext', 'transform', 'wrap', 'halign', 'valign' },
-      returns = {}
     }
   },
-  notes = 'TODO'
+  notes = 'TODO',
+  related = {
+    'Pass:setFont'
+  }
 }