Merge pull request #12060 from CocosRobot/update_lua_bindings_1432717405

[AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
子龙山人 2015-05-27 22:43:28 +08:00
commit 6f16965b06
14 changed files with 4225 additions and 4 deletions

View File

@ -1496,6 +1496,18 @@ getCapInsetsNormalRenderer : function (
return cc.Rect;
},
/**
* @method setTitleAlignment
* @param {cc.TextHAlignment|cc.TextHAlignment} texthalignment
* @param {cc.TextVAlignment} textvalignment
*/
setTitleAlignment : function(
texthalignment,
textvalignment
)
{
},
/**
* @method getCapInsetsPressedRenderer
* @return {rect_object}

View File

@ -3595,6 +3595,45 @@ bool js_cocos2dx_ui_Button_getCapInsetsNormalRenderer(JSContext *cx, uint32_t ar
JS_ReportError(cx, "js_cocos2dx_ui_Button_getCapInsetsNormalRenderer : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_ui_Button_setTitleAlignment(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
JS::RootedObject obj(cx);
cocos2d::ui::Button* cobj = NULL;
obj = args.thisv().toObjectOrNull();
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setTitleAlignment : Invalid Native Object");
do {
if (argc == 2) {
cocos2d::TextHAlignment arg0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
if (!ok) { ok = true; break; }
cocos2d::TextVAlignment arg1;
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
if (!ok) { ok = true; break; }
cobj->setTitleAlignment(arg0, arg1);
args.rval().setUndefined();
return true;
}
} while(0);
do {
if (argc == 1) {
cocos2d::TextHAlignment arg0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
if (!ok) { ok = true; break; }
cobj->setTitleAlignment(arg0);
args.rval().setUndefined();
return true;
}
} while(0);
JS_ReportError(cx, "js_cocos2dx_ui_Button_setTitleAlignment : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_Button_getCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -4051,6 +4090,7 @@ void js_register_cocos2dx_ui_Button(JSContext *cx, JS::HandleObject global) {
JS_FN("loadTexturePressed", js_cocos2dx_ui_Button_loadTexturePressed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setTitleFontName", js_cocos2dx_ui_Button_setTitleFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getCapInsetsNormalRenderer", js_cocos2dx_ui_Button_getCapInsetsNormalRenderer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setTitleAlignment", js_cocos2dx_ui_Button_setTitleAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getCapInsetsPressedRenderer", js_cocos2dx_ui_Button_getCapInsetsPressedRenderer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("loadTextures", js_cocos2dx_ui_Button_loadTextures, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("isScale9Enabled", js_cocos2dx_ui_Button_isScale9Enabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),

View File

@ -195,6 +195,7 @@ bool js_cocos2dx_ui_Button_setCapInsetsNormalRenderer(JSContext *cx, uint32_t ar
bool js_cocos2dx_ui_Button_loadTexturePressed(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_setTitleFontName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_getCapInsetsNormalRenderer(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_setTitleAlignment(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_getCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_loadTextures(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_isScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp);

View File

@ -142,6 +142,15 @@
-- @param self
-- @return rect_table#rect_table ret (return value: rect_table)
--------------------------------
-- @overload self, int, int
-- @overload self, int
-- @function [parent=#Button] setTitleAlignment
-- @param self
-- @param #int hAlignment
-- @param #int vAlignment
-- @return Button#Button self (return value: ccui.Button)
--------------------------------
-- Return the capInsets of pressed state scale9sprite.<br>
-- return The pressed scale9 renderer capInsets.

View File

@ -0,0 +1,104 @@
--------------------------------
-- @module Material
-- @extend RenderState
-- @parent_module cc
--------------------------------
-- returns a clone (deep-copy) of the material
-- @function [parent=#Material] clone
-- @param self
-- @return Material#Material ret (return value: cc.Material)
--------------------------------
-- Returns the number of Techniques in the Material.
-- @function [parent=#Material] getTechniqueCount
-- @param self
-- @return long#long ret (return value: long)
--------------------------------
-- / sets the material name
-- @function [parent=#Material] setName
-- @param self
-- @param #string name
-- @return Material#Material self (return value: cc.Material)
--------------------------------
-- Returns a Technique by index. <br>
-- returns `nullptr` if the index is invalid.
-- @function [parent=#Material] getTechniqueByIndex
-- @param self
-- @param #long index
-- @return Technique#Technique ret (return value: cc.Technique)
--------------------------------
-- / returns the material name
-- @function [parent=#Material] getName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- Returns the list of Techniques
-- @function [parent=#Material] getTechniques
-- @param self
-- @return array_table#array_table ret (return value: array_table)
--------------------------------
-- Sets the current technique
-- @function [parent=#Material] setTechnique
-- @param self
-- @param #string techniqueName
-- @return Material#Material self (return value: cc.Material)
--------------------------------
-- Returns a Technique by its name.<br>
-- returns `nullptr` if the Technique can't be found.
-- @function [parent=#Material] getTechniqueByName
-- @param self
-- @param #string name
-- @return Technique#Technique ret (return value: cc.Technique)
--------------------------------
-- Adds a Technique into the Material
-- @function [parent=#Material] addTechnique
-- @param self
-- @param #cc.Technique technique
-- @return Material#Material self (return value: cc.Material)
--------------------------------
-- Returns the Technique used by the Material
-- @function [parent=#Material] getTechnique
-- @param self
-- @return Technique#Technique ret (return value: cc.Technique)
--------------------------------
-- Creates a Material using the data from the Properties object defined at the specified URL,<br>
-- where the URL is of the format "<file-path>.<extension>#<namespace-id>/<namespace-id>/.../<namespace-id>"<br>
-- (and "#<namespace-id>/<namespace-id>/.../<namespace-id>" is optional).<br>
-- param url The URL pointing to the Properties object defining the material.<br>
-- return A new Material or NULL if there was an error.
-- @function [parent=#Material] createWithFilename
-- @param self
-- @param #string path
-- @return Material#Material ret (return value: cc.Material)
--------------------------------
-- Creates a Material with a GLProgramState.<br>
-- It will only contain one Technique and one Pass.<br>
-- Added in order to support legacy code.
-- @function [parent=#Material] createWithGLStateProgram
-- @param self
-- @param #cc.GLProgramState programState
-- @return Material#Material ret (return value: cc.Material)
--------------------------------
-- Creates a material from the specified properties object.<br>
-- param materialProperties The properties object defining the<br>
-- material (must have namespace equal to 'material').<br>
-- return A new Material.
-- @function [parent=#Material] createWithProperties
-- @param self
-- @param #cc.Properties materialProperties
-- @return Material#Material ret (return value: cc.Material)
return nil

View File

@ -0,0 +1,73 @@
--------------------------------
-- @module Pass
-- @extend RenderState
-- @parent_module cc
--------------------------------
-- Unbinds the Pass.<br>
-- This method must be called AFTER calling the actuall draw call
-- @function [parent=#Pass] unbind
-- @param self
-- @return Pass#Pass self (return value: cc.Pass)
--------------------------------
-- @overload self, mat4_table, bool
-- @overload self, mat4_table
-- @function [parent=#Pass] bind
-- @param self
-- @param #mat4_table modelView
-- @param #bool bindAttributes
-- @return Pass#Pass self (return value: cc.Pass)
--------------------------------
-- Returns a clone (deep-copy) of this instance
-- @function [parent=#Pass] clone
-- @param self
-- @return Pass#Pass ret (return value: cc.Pass)
--------------------------------
-- Returns the GLProgramState
-- @function [parent=#Pass] getGLProgramState
-- @param self
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
--------------------------------
-- Returns the vertex attribute binding for this pass.<br>
-- return The vertex attribute binding for this pass.
-- @function [parent=#Pass] getVertexAttributeBinding
-- @param self
-- @return VertexAttribBinding#VertexAttribBinding ret (return value: cc.VertexAttribBinding)
--------------------------------
--
-- @function [parent=#Pass] getHash
-- @param self
-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- Sets a vertex attribute binding for this pass.<br>
-- When a mesh binding is set, the VertexAttribBinding will be automatically<br>
-- bound when the bind() method is called for the pass.<br>
-- param binding The VertexAttribBinding to set (or NULL to remove an existing binding).
-- @function [parent=#Pass] setVertexAttribBinding
-- @param self
-- @param #cc.VertexAttribBinding binding
-- @return Pass#Pass self (return value: cc.Pass)
--------------------------------
--
-- @function [parent=#Pass] create
-- @param self
-- @param #cc.Technique parent
-- @return Pass#Pass ret (return value: cc.Pass)
--------------------------------
-- Creates a Pass with a GLProgramState.
-- @function [parent=#Pass] createWithGLProgramState
-- @param self
-- @param #cc.Technique parent
-- @param #cc.GLProgramState programState
-- @return Pass#Pass ret (return value: cc.Pass)
return nil

View File

@ -0,0 +1,307 @@
--------------------------------
-- @module Properties
-- @parent_module cc
--------------------------------
-- Returns the value of a variable that is set in this Properties object.<br>
-- Variables take on the format ${name} and are inherited from parent Property objects.<br>
-- param name Name of the variable to get.<br>
-- param defaultValue Value to return if the variable is not found.<br>
-- return The value of the specified variable, or defaultValue if not found.
-- @function [parent=#Properties] getVariable
-- @param self
-- @param #char name
-- @param #char defaultValue
-- @return char#char ret (return value: char)
--------------------------------
-- Get the value of the given property as a string. This can always be retrieved,<br>
-- whatever the intended type of the property.<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- param defaultValue The default value to return if the specified property does not exist.<br>
-- return The value of the given property as a string, or the empty string if no property with that name exists.
-- @function [parent=#Properties] getString
-- @param self
-- @return char#char ret (return value: char)
--------------------------------
-- Interpret the value of the given property as a long integer.<br>
-- If the property does not exist, zero will be returned.<br>
-- If the property exists but could not be scanned, an error will be logged and zero will be returned.<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- return The value of the given property interpreted as a long.<br>
-- Zero if the property does not exist or could not be scanned.
-- @function [parent=#Properties] getLong
-- @param self
-- @return long#long ret (return value: long)
--------------------------------
-- @overload self
-- @overload self, char, bool, bool
-- @function [parent=#Properties] getNamespace
-- @param self
-- @param #char id
-- @param #bool searchNames
-- @param #bool recurse
-- @return Properties#Properties ret (return value: cc.Properties)
--------------------------------
-- Gets the file path for the given property if the file exists.<br>
-- This method will first search for the file relative to the working directory.<br>
-- If the file is not found then it will search relative to the directory the bundle file is in.<br>
-- param name The name of the property.<br>
-- param path The string to copy the path to if the file exists.<br>
-- return True if the property exists and the file exists, false otherwise.<br>
-- script{ignore}
-- @function [parent=#Properties] getPath
-- @param self
-- @param #char name
-- @param #string path
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Interpret the value of the given property as a Matrix.<br>
-- If the property does not exist, out will be set to the identity matrix.<br>
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
-- to the identity matrix.<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- param out The matrix to set to this property's interpreted value.<br>
-- return True on success, false if the property does not exist or could not be scanned.
-- @function [parent=#Properties] getMat4
-- @param self
-- @param #char name
-- @param #mat4_table out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Check if a property with the given name is specified in this Properties object.<br>
-- param name The name of the property to query.<br>
-- return True if the property exists, false otherwise.
-- @function [parent=#Properties] exists
-- @param self
-- @param #char name
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Sets the value of the property with the specified name.<br>
-- If there is no property in this namespace with the current name,<br>
-- one is added. Otherwise, the value of the first property with the<br>
-- specified name is updated.<br>
-- If name is NULL, the value current property (see getNextProperty) is<br>
-- set, unless there is no current property, in which case false<br>
-- is returned.<br>
-- param name The name of the property to set.<br>
-- param value The property value.<br>
-- return True if the property was set, false otherwise.
-- @function [parent=#Properties] setString
-- @param self
-- @param #char name
-- @param #char value
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Get the ID of this Property's namespace. The ID should be a unique identifier,<br>
-- but its uniqueness is not enforced.<br>
-- return The ID of this Property's namespace.
-- @function [parent=#Properties] getId
-- @param self
-- @return char#char ret (return value: char)
--------------------------------
-- Rewind the getNextProperty() and getNextNamespace() iterators<br>
-- to the beginning of the file.
-- @function [parent=#Properties] rewind
-- @param self
-- @return Properties#Properties self (return value: cc.Properties)
--------------------------------
-- Sets the value of the specified variable.<br>
-- param name Name of the variable to set.<br>
-- param value The value to set.
-- @function [parent=#Properties] setVariable
-- @param self
-- @param #char name
-- @param #char value
-- @return Properties#Properties self (return value: cc.Properties)
--------------------------------
-- Interpret the value of the given property as a boolean.<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- param defaultValue the default value to return if the specified property does not exist within the properties file.<br>
-- return true if the property exists and its value is "true", otherwise false.
-- @function [parent=#Properties] getBool
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @overload self, char, vec4_table
-- @overload self, char, vec3_table
-- @function [parent=#Properties] getColor
-- @param self
-- @param #char name
-- @param #vec3_table out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Returns the type of a property.<br>
-- param name The name of the property to interpret, or NULL to return the current property's type.<br>
-- return The type of the property.
-- @function [parent=#Properties] getType
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- Get the next namespace.
-- @function [parent=#Properties] getNextNamespace
-- @param self
-- @return Properties#Properties ret (return value: cc.Properties)
--------------------------------
-- Interpret the value of the given property as an integer.<br>
-- If the property does not exist, zero will be returned.<br>
-- If the property exists but could not be scanned, an error will be logged and zero will be returned.<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- return The value of the given property interpreted as an integer.<br>
-- Zero if the property does not exist or could not be scanned.
-- @function [parent=#Properties] getInt
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- Interpret the value of the given property as a Vector3.<br>
-- If the property does not exist, out will be set to Vector3(0.0f, 0.0f, 0.0f).<br>
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
-- to Vector3(0.0f, 0.0f, 0.0f).<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- param out The vector to set to this property's interpreted value.<br>
-- return True on success, false if the property does not exist or could not be scanned.
-- @function [parent=#Properties] getVec3
-- @param self
-- @param #char name
-- @param #vec3_table out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Interpret the value of the given property as a Vector2.<br>
-- If the property does not exist, out will be set to Vector2(0.0f, 0.0f).<br>
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
-- to Vector2(0.0f, 0.0f).<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- param out The vector to set to this property's interpreted value.<br>
-- return True on success, false if the property does not exist or could not be scanned.
-- @function [parent=#Properties] getVec2
-- @param self
-- @param #char name
-- @param #vec2_table out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Interpret the value of the given property as a Vector4.<br>
-- If the property does not exist, out will be set to Vector4(0.0f, 0.0f, 0.0f, 0.0f).<br>
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
-- to Vector4(0.0f, 0.0f, 0.0f, 0.0f).<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- param out The vector to set to this property's interpreted value.<br>
-- return True on success, false if the property does not exist or could not be scanned.
-- @function [parent=#Properties] getVec4
-- @param self
-- @param #char name
-- @param #vec4_table out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Get the name of the next property.<br>
-- If a valid next property is returned, the value of the property can be<br>
-- retrieved using any of the get methods in this class, passing NULL for the property name.<br>
-- return The name of the next property, or NULL if there are no properties remaining.
-- @function [parent=#Properties] getNextProperty
-- @param self
-- @return char#char ret (return value: char)
--------------------------------
-- Interpret the value of the given property as a floating-point number.<br>
-- If the property does not exist, zero will be returned.<br>
-- If the property exists but could not be scanned, an error will be logged and zero will be returned.<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- return The value of the given property interpreted as a float.<br>
-- Zero if the property does not exist or could not be scanned.
-- @function [parent=#Properties] getFloat
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- Interpret the value of the given property as a Quaternion specified as an axis angle.<br>
-- If the property does not exist, out will be set to Quaternion().<br>
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
-- to Quaternion().<br>
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
-- param out The quaternion to set to this property's interpreted value.<br>
-- return True on success, false if the property does not exist or could not be scanned.
-- @function [parent=#Properties] getQuaternionFromAxisAngle
-- @param self
-- @param #char name
-- @param #cc.Quaternion out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @overload self, char, vec4_table
-- @overload self, char, vec3_table
-- @function [parent=#Properties] parseColor
-- @param self
-- @param #char str
-- @param #vec3_table out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Attempts to parse the specified string as a Vector3 value.<br>
-- On error, false is returned and the output is set to all zero values.<br>
-- param str The string to parse.<br>
-- param out The value to populate if successful.<br>
-- return True if a valid Vector3 was parsed, false otherwise.
-- @function [parent=#Properties] parseVec3
-- @param self
-- @param #char str
-- @param #vec3_table out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Attempts to parse the specified string as an axis-angle value.<br>
-- The specified string is expected to contain four comma-separated<br>
-- values, where the first three values represents the axis and the<br>
-- fourth value represents the angle, in degrees.<br>
-- On error, false is returned and the output is set to all zero values.<br>
-- param str The string to parse.<br>
-- param out A Quaternion populated with the orientation of the axis-angle, if successful.<br>
-- return True if a valid axis-angle was parsed, false otherwise.
-- @function [parent=#Properties] parseAxisAngle
-- @param self
-- @param #char str
-- @param #cc.Quaternion out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Attempts to parse the specified string as a Vector2 value.<br>
-- On error, false is returned and the output is set to all zero values.<br>
-- param str The string to parse.<br>
-- param out The value to populate if successful.<br>
-- return True if a valid Vector2 was parsed, false otherwise.
-- @function [parent=#Properties] parseVec2
-- @param self
-- @param #char str
-- @param #vec2_table out
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Attempts to parse the specified string as a Vector4 value.<br>
-- On error, false is returned and the output is set to all zero values.<br>
-- param str The string to parse.<br>
-- param out The value to populate if successful.<br>
-- return True if a valid Vector4 was parsed, false otherwise.
-- @function [parent=#Properties] parseVec4
-- @param self
-- @param #char str
-- @param #vec4_table out
-- @return bool#bool ret (return value: bool)
return nil

View File

@ -0,0 +1,61 @@
--------------------------------
-- @module RenderState
-- @extend Ref
-- @parent_module cc
--------------------------------
-- Replaces the texture that is at the front of _textures array.<br>
-- Added to be backwards compatible.
-- @function [parent=#RenderState] setTexture
-- @param self
-- @param #cc.Texture2D texture
-- @return RenderState#RenderState self (return value: cc.RenderState)
--------------------------------
-- Returns the topmost RenderState in the hierarchy below the given RenderState.
-- @function [parent=#RenderState] getTopmost
-- @param self
-- @param #cc.RenderState below
-- @return RenderState#RenderState ret (return value: cc.RenderState)
--------------------------------
-- Returns the texture that is at the front of the _textures array.<br>
-- Added to be backwards compatible.
-- @function [parent=#RenderState] getTexture
-- @param self
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
--------------------------------
-- Binds the render state for this RenderState and any of its parents, top-down,<br>
-- for the given pass.
-- @function [parent=#RenderState] bind
-- @param self
-- @param #cc.Pass pass
-- @return RenderState#RenderState self (return value: cc.RenderState)
--------------------------------
--
-- @function [parent=#RenderState] getName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
--
-- @function [parent=#RenderState] getStateBlock
-- @param self
-- @return RenderState::StateBlock#RenderState::StateBlock ret (return value: cc.RenderState::StateBlock)
--------------------------------
--
-- @function [parent=#RenderState] getTextures
-- @param self
-- @return array_table#array_table ret (return value: array_table)
--------------------------------
-- Static initializer that is called during game startup.
-- @function [parent=#RenderState] initialize
-- @param self
-- @return RenderState#RenderState self (return value: cc.RenderState)
return nil

View File

@ -0,0 +1,62 @@
--------------------------------
-- @module Technique
-- @extend RenderState
-- @parent_module cc
--------------------------------
-- Returns the number of Passes in the Technique
-- @function [parent=#Technique] getPassCount
-- @param self
-- @return long#long ret (return value: long)
--------------------------------
-- Returns a new clone of the Technique
-- @function [parent=#Technique] clone
-- @param self
-- @return Technique#Technique ret (return value: cc.Technique)
--------------------------------
-- Adds a new pass to the Technique.<br>
-- Order matters. First added, first rendered
-- @function [parent=#Technique] addPass
-- @param self
-- @param #cc.Pass pass
-- @return Technique#Technique self (return value: cc.Technique)
--------------------------------
-- Returns the list of passes
-- @function [parent=#Technique] getPasses
-- @param self
-- @return array_table#array_table ret (return value: array_table)
--------------------------------
-- Returns the name of the Technique
-- @function [parent=#Technique] getName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- Returns the Pass at given index
-- @function [parent=#Technique] getPassByIndex
-- @param self
-- @param #long index
-- @return Pass#Pass ret (return value: cc.Pass)
--------------------------------
--
-- @function [parent=#Technique] create
-- @param self
-- @param #cc.Material parent
-- @return Technique#Technique ret (return value: cc.Technique)
--------------------------------
-- Creates a new Technique with a GLProgramState.<br>
-- Method added to support legacy code
-- @function [parent=#Technique] createWithGLProgramState
-- @param self
-- @param #cc.Material parent
-- @param #cc.GLProgramState state
-- @return Technique#Technique ret (return value: cc.Technique)
return nil

View File

@ -241,6 +241,11 @@
-- @field [parent=#cc] ActionFloat#ActionFloat ActionFloat preloaded module
--------------------------------------------------------
-- the cc Properties
-- @field [parent=#cc] Properties#Properties Properties preloaded module
--------------------------------------------------------
-- the cc UserDefault
-- @field [parent=#cc] UserDefault#UserDefault UserDefault preloaded module
@ -1181,6 +1186,26 @@
-- @field [parent=#cc] GLProgramCache#GLProgramCache GLProgramCache preloaded module
--------------------------------------------------------
-- the cc RenderState
-- @field [parent=#cc] RenderState#RenderState RenderState preloaded module
--------------------------------------------------------
-- the cc Pass
-- @field [parent=#cc] Pass#Pass Pass preloaded module
--------------------------------------------------------
-- the cc Technique
-- @field [parent=#cc] Technique#Technique Technique preloaded module
--------------------------------------------------------
-- the cc Material
-- @field [parent=#cc] Material#Material Material preloaded module
--------------------------------------------------------
-- the cc TextureCache
-- @field [parent=#cc] TextureCache#TextureCache TextureCache preloaded module

File diff suppressed because it is too large Load Diff

View File

@ -1956,6 +1956,76 @@ int register_all_cocos2dx(lua_State* tolua_S);

View File

@ -6986,6 +6986,65 @@ int lua_cocos2dx_ui_Button_getCapInsetsNormalRenderer(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Button_setTitleAlignment(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Button* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Button",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Button*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Button_setTitleAlignment'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
do{
if (argc == 2) {
cocos2d::TextHAlignment arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Button:setTitleAlignment");
if (!ok) { break; }
cocos2d::TextVAlignment arg1;
ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.Button:setTitleAlignment");
if (!ok) { break; }
cobj->setTitleAlignment(arg0, arg1);
lua_settop(tolua_S, 1);
return 1;
}
}while(0);
ok = true;
do{
if (argc == 1) {
cocos2d::TextHAlignment arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Button:setTitleAlignment");
if (!ok) { break; }
cobj->setTitleAlignment(arg0);
lua_settop(tolua_S, 1);
return 1;
}
}while(0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.Button:setTitleAlignment",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Button_setTitleAlignment'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Button_getCapInsetsPressedRenderer(lua_State* tolua_S)
{
int argc = 0;
@ -7737,6 +7796,7 @@ int lua_register_cocos2dx_ui_Button(lua_State* tolua_S)
tolua_function(tolua_S,"loadTexturePressed",lua_cocos2dx_ui_Button_loadTexturePressed);
tolua_function(tolua_S,"setTitleFontName",lua_cocos2dx_ui_Button_setTitleFontName);
tolua_function(tolua_S,"getCapInsetsNormalRenderer",lua_cocos2dx_ui_Button_getCapInsetsNormalRenderer);
tolua_function(tolua_S,"setTitleAlignment",lua_cocos2dx_ui_Button_setTitleAlignment);
tolua_function(tolua_S,"getCapInsetsPressedRenderer",lua_cocos2dx_ui_Button_getCapInsetsPressedRenderer);
tolua_function(tolua_S,"loadTextures",lua_cocos2dx_ui_Button_loadTextures);
tolua_function(tolua_S,"isScale9Enabled",lua_cocos2dx_ui_Button_isScale9Enabled);

View File

@ -561,6 +561,7 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
#endif // __cocos2dx_ui_h__