mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' into LayerGradientCtor
This commit is contained in:
commit
2d5c295f99
3
AUTHORS
3
AUTHORS
|
@ -793,6 +793,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
|
||||
|
|
|
@ -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)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
4fac42101ef2fb9622f22ccabc18c918622908ad
|
||||
d608beef525313b9c497786a1dd7b2460ff65d84
|
|
@ -366,7 +366,6 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_ui_h__
|
||||
|
|
|
@ -377,6 +377,16 @@ void Slider::setPercent(int percent)
|
|||
spriteRenderer->setTextureRect(rect, spriteRenderer->isTextureRectRotated(), rect.size);
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,10 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
||||
#include "chipmunk_private.h"
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
d53bc7d6e68a49984c5971344f59bba8414d142b
|
||||
8cce920bd091a03ab1e10db03eb397451b0d70c5
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue