Merge branch 'develop' into LayerGradientCtor

This commit is contained in:
pandamicro 2014-03-27 10:14:57 +08:00
commit 2d5c295f99
12 changed files with 41 additions and 19 deletions

View File

@ -794,6 +794,9 @@ Developers:
LoungeKatt
Corrected a mistake of building android project in README.md
flashjay
Remove deprecated code in lua tests & template
Retired Core Developers:
WenSheng Yang
Author of windows port, CCTextField,

View File

@ -2,13 +2,6 @@
--------------------------------
-- @module Helper
--------------------------------
-- @function [parent=#Helper] seekActionWidgetByActionTag
-- @param self
-- @param #ccui.Widget widget
-- @param #int int
-- @return Widget#Widget ret (return value: ccui.Widget)
--------------------------------
-- @function [parent=#Helper] seekWidgetByTag
-- @param self
@ -17,10 +10,10 @@
-- @return Widget#Widget ret (return value: ccui.Widget)
--------------------------------
-- @function [parent=#Helper] seekWidgetByRelativeName
-- @function [parent=#Helper] seekActionWidgetByActionTag
-- @param self
-- @param #ccui.Widget widget
-- @param #char char
-- @param #int int
-- @return Widget#Widget ret (return value: ccui.Widget)
--------------------------------

View File

@ -111,6 +111,12 @@
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @function [parent=#Slider] hitTest
-- @param self
-- @param #point_table point
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#Slider] getContentSize
-- @param self

View File

@ -1 +1 @@
4fac42101ef2fb9622f22ccabc18c918622908ad
d608beef525313b9c497786a1dd7b2460ff65d84

View File

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

View File

@ -378,6 +378,16 @@ void Slider::setPercent(int percent)
}
}
bool Slider::hitTest(const cocos2d::Point &pt)
{
Point nsp = this->_slidBallNormalRenderer->convertToNodeSpace(pt);
Rect ballRect = this->_slidBallNormalRenderer->getTextureRect();
if (ballRect.containsPoint(nsp)) {
return true;
}
return false;
}
bool Slider::onTouchBegan(Touch *touch, Event *unusedEvent)
{
bool pass = Widget::onTouchBegan(touch, unusedEvent);

View File

@ -189,6 +189,8 @@ public:
//override "ignoreContentAdaptWithSize" method of widget.
virtual void ignoreContentAdaptWithSize(bool ignore) override;
//override the widget's hitTest function to perfom its own
virtual bool hitTest(const Point &pt) override;
/**
* Returns the "class name" of widget.
*/

View File

@ -21,7 +21,10 @@
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#ifndef WIN32
#include <alloca.h>
#endif
#include "chipmunk_private.h"

View File

@ -1 +1 @@
d53bc7d6e68a49984c5971344f59bba8414d142b
8cce920bd091a03ab1e10db03eb397451b0d70c5

View File

@ -1,4 +1,6 @@
require "Cocos2d"
require "Cocos2dConstants"
-- cclog
cclog = function(...)
print(string.format(...))
@ -43,7 +45,7 @@ local function main()
local frameHeight = 95
-- create dog animate
local textureDog = cc.TextureCache:getInstance():addImage("dog.png")
local textureDog = cc.Director:getInstance():getTextureCache():addImage("dog.png")
local rect = cc.rect(0, 0, frameWidth, frameHeight)
local frame0 = cc.SpriteFrame:createWithTexture(textureDog, rect)
rect = cc.rect(frameWidth, 0, frameWidth, frameHeight)
@ -206,7 +208,7 @@ local function main()
-- uncomment below for the BlackBerry version
local bgMusicPath = nil
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) then
bgMusicPath = CCFileUtils:getInstance():fullPathForFilename("res/background.caf")
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.caf")
else
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.mp3")
end

View File

@ -1,4 +1,6 @@
require "Cocos2d"
require "Cocos2dConstants"
-- cclog
cclog = function(...)
print(string.format(...))
@ -43,7 +45,7 @@ local function main()
local frameHeight = 95
-- create dog animate
local textureDog = cc.TextureCache:getInstance():addImage("dog.png")
local textureDog = cc.Director:getInstance():getTextureCache():addImage("dog.png")
local rect = cc.rect(0, 0, frameWidth, frameHeight)
local frame0 = cc.SpriteFrame:createWithTexture(textureDog, rect)
rect = cc.rect(frameWidth, 0, frameWidth, frameHeight)
@ -206,7 +208,7 @@ local function main()
-- uncomment below for the BlackBerry version
local bgMusicPath = nil
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) then
bgMusicPath = CCFileUtils:getInstance():fullPathForFilename("res/background.caf")
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.caf")
else
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.mp3")
end

View File

@ -1,4 +1,6 @@
require "Cocos2d"
require "Cocos2dConstants"
-- cclog
cclog = function(...)
print(string.format(...))
@ -39,7 +41,7 @@ local function main()
local frameHeight = 95
-- create dog animate
local textureDog = cc.TextureCache:getInstance():addImage("res/dog.png")
local textureDog = cc.Director:getInstance():getTextureCache():addImage("res/dog.png")
local rect = cc.rect(0, 0, frameWidth, frameHeight)
local frame0 = cc.SpriteFrame:createWithTexture(textureDog, rect)
rect = cc.rect(frameWidth, 0, frameWidth, frameHeight)
@ -195,7 +197,7 @@ local function main()
-- uncomment below for the BlackBerry version
local bgMusicPath = nil
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) then
bgMusicPath = CCFileUtils:getInstance():fullPathForFilename("res/background.caf")
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.caf")
else
bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.mp3")
end