Browse Source

Fix setBackground;

bjorn 3 years ago
parent
commit
0daed97537
2 changed files with 9 additions and 3 deletions
  1. 8 2
      api/init.lua
  2. 1 1
      api/lovr/graphics/setBackground.lua

+ 8 - 2
api/init.lua

@@ -5455,10 +5455,10 @@ return {
           }
           }
         },
         },
         {
         {
-          name = "setBackgroundColor",
+          name = "setBackground",
           summary = "Set the background color.",
           summary = "Set the background color.",
           description = "TODO",
           description = "TODO",
-          key = "lovr.graphics.setBackgroundColor",
+          key = "lovr.graphics.setBackground",
           module = "lovr.graphics",
           module = "lovr.graphics",
           related = {
           related = {
             "lovr.graphics.begin"
             "lovr.graphics.begin"
@@ -5498,6 +5498,12 @@ return {
                   name = "hex",
                   name = "hex",
                   type = "number",
                   type = "number",
                   description = "A hexcode (like `0xffffff`) to use for the background color (does not support alpha)."
                   description = "A hexcode (like `0xffffff`) to use for the background color (does not support alpha)."
+                },
+                {
+                  name = "a",
+                  type = "number",
+                  description = "The alpha component of the background color.",
+                  default = "1.0"
                 }
                 }
               },
               },
               returns = {}
               returns = {}

+ 1 - 1
api/lovr/graphics/setBackgroundColor.lua → api/lovr/graphics/setBackground.lua

@@ -39,7 +39,7 @@ return {
     },
     },
     {
     {
       description = 'TODO',
       description = 'TODO',
-      arguments = { 'hex', 'alpha' },
+      arguments = { 'hex', 'a' },
       returns = {}
       returns = {}
     },
     },
     {
     {