Parcourir la source

const static members from C++ are now set in the metatable of the class (ScreenShape.SHAPE_RECT instead of SHAPE_RECT)

Ivan Safrin il y a 13 ans
Parent
commit
f55af8e1c0
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Bindings/Scripts/create_lua_library/create_lua_library.py

+ 1 - 1
Bindings/Scripts/create_lua_library/create_lua_library.py

@@ -183,7 +183,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 						continue
 					if pp["type"].find("static ") != -1: # If static. FIXME: Static doesn't work?
 						if "defaltValue" in pp: # FIXME: defaltValue is misspelled.
-							luaClassBindingOut += "%s = %s\n" % (pp["name"], pp["defaltValue"])
+							luaClassBindingOut += "%s.%s = %s\n" % (ckey, pp["name"], pp["defaltValue"])
 					else: # FIXME: Nonstatic method ? variable ?? found.
 						#there are some bugs in the class parser that cause it to return junk
 						if pp["type"].find("*") == -1 and pp["type"].find("vector") == -1 and pp["name"] != "setScale" and pp["name"] != "setPosition" and pp["name"] != "BUFFER_CACHE_PRECISION" and not pp["name"].isdigit():