mirror of https://github.com/axmolengine/axmol.git
Merge pull request #7847 from andyque/addLuabindingsToUI
add deprecated options for ui, add Scale9Sprite bindings
This commit is contained in:
commit
ab9c35616e
|
@ -106,6 +106,19 @@ function UICheckBoxDeprecated.addEventListenerCheckBox(self,handler)
|
|||
return self:addEventListener(handler)
|
||||
end
|
||||
rawset(ccui.CheckBox,"addEventListenerCheckBox", UICheckBoxDeprecated.addEventListenerCheckBox)
|
||||
|
||||
function UICheckBoxDeprecated.setSelectedState(self,flag)
|
||||
deprecatedTip("ccui.CheckBox:setSelectedState", "ccui.CheckBox:setSelected")
|
||||
return self:setSelected(flag)
|
||||
end
|
||||
rawset(ccui.CheckBox, "setSelectedState", UICheckBoxDeprecated.setSelectedState)
|
||||
|
||||
function UICheckBoxDeprecated.getSelectedState(self)
|
||||
deprecatedTip("ccui.CheckBox:getSelectedState", "ccui.CheckBox:getSelected")
|
||||
return self:getSelected()
|
||||
end
|
||||
rawset(ccui.CheckBox, "getSelectedState", UICheckBoxDeprecated.setSelectedState)
|
||||
|
||||
--functions of ccui.CheckBox will be deprecated end
|
||||
|
||||
--functions of ccui.Slider will be deprecated begin
|
||||
|
|
|
@ -456,6 +456,7 @@ function UICheckBoxTest:initExtend()
|
|||
|
||||
local checkBox = ccui.CheckBox:create()
|
||||
checkBox:setTouchEnabled(true)
|
||||
checkBox:setSelectedState(true)
|
||||
checkBox:loadTextures("cocosui/check_box_normal.png",
|
||||
"cocosui/check_box_normal_press.png",
|
||||
"cocosui/check_box_active.png",
|
||||
|
|
|
@ -30,7 +30,7 @@ headers = %(cocosdir)s/cocos/ui/CocosGUI.h
|
|||
|
||||
# what classes to produce code for. You can use regular expressions here. When testing the regular
|
||||
# expression, it will be enclosed in "^$", like this: "^Menu*$".
|
||||
classes = Helper Widget Layer Layout RootWidget Button CheckBox ImageView Text TextAtlas TextBMFont LoadingBar Slider Switch TextField ScrollView ListView PageView LayoutParameter LinearLayoutParameter RelativeLayoutParameter Rich.* HBox VBox RelativeBox
|
||||
classes = Helper Widget Layer Layout RootWidget Button CheckBox ImageView Text TextAtlas TextBMFont LoadingBar Slider Switch TextField ScrollView ListView PageView LayoutParameter LinearLayoutParameter RelativeLayoutParameter Rich.* HBox VBox RelativeBox Scale9Sprite
|
||||
|
||||
# what should we skip? in the format ClassName::[function function]
|
||||
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also
|
||||
|
|
Loading…
Reference in New Issue