Browse Source

Type info for function arguments/returns;

bjorn 7 years ago
parent
commit
ff35785a69
3 changed files with 20 additions and 2 deletions
  1. 11 2
      api/init.lua
  2. 2 0
      api/lovr/event/poll.lua
  3. 7 0
      api/lovr/headset/renderTo.lua

+ 11 - 2
api/init.lua

@@ -1163,7 +1163,9 @@ return {
                 {
                 {
                   name = "iterator",
                   name = "iterator",
                   type = "function",
                   type = "function",
-                  description = "The iterator function, usable in a for loop."
+                  description = "The iterator function, usable in a for loop.",
+                  arguments = {},
+                  returns = {}
                 }
                 }
               }
               }
             }
             }
@@ -5350,7 +5352,14 @@ return {
                 {
                 {
                   name = "callback",
                   name = "callback",
                   type = "function",
                   type = "function",
-                  description = "The function used to render.  It will be passed a string representing the current eye that is being rendered to, either \"left\" or \"right\"."
+                  description = "The function used to render.  It will be passed a string representing the current eye that is being rendered to, either \"left\" or \"right\".",
+                  arguments = {
+                    {
+                      name = "eye",
+                      type = "HeadsetEye"
+                    }
+                  },
+                  returns = {}
                 }
                 }
               },
               },
               returns = {}
               returns = {}

+ 2 - 0
api/lovr/event/poll.lua

@@ -10,6 +10,8 @@ return {
     {
     {
       name = 'iterator',
       name = 'iterator',
       type = 'function',
       type = 'function',
+      arguments = {},
+      returns = {},
       description = 'The iterator function, usable in a for loop.'
       description = 'The iterator function, usable in a for loop.'
     }
     }
   }
   }

+ 7 - 0
api/lovr/headset/renderTo.lua

@@ -15,6 +15,13 @@ return {
     {
     {
       name = 'callback',
       name = 'callback',
       type = 'function',
       type = 'function',
+      arguments = {
+        {
+          name = 'eye',
+          type = 'HeadsetEye'
+        }
+      },
+      returns = {},
       description = [[
       description = [[
         The function used to render.  It will be passed a string representing the
         The function used to render.  It will be passed a string representing the
         current eye that is being rendered to, either "left" or "right".
         current eye that is being rendered to, either "left" or "right".