Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_hot_fix

This commit is contained in:
samuele3hu 2014-07-02 09:37:47 +08:00
commit 9ffbafaecd
9 changed files with 35 additions and 62 deletions

View File

@ -23,7 +23,7 @@
THE SOFTWARE.
****************************************************************************/
#include "CCControllerThumbStick.h"
#include "CCControllerThumbstick.h"
#include "CCControllerAxisInput.h"
#include "CCControllerButtonInput.h"

View File

@ -264,7 +264,9 @@ namespace cocostudio
widget->setColor(_color);
widget->setOpacity(_opacity);
//the setSize method will be conflict with scale9Width & scale9Height
widget->setSize(Size(_width, _height));
if (!widget->isIgnoreContentAdaptWithSize()) {
widget->setSize(Size(_width, _height));
}
widget->setPosition(_position);
widget->setAnchorPoint(_originalAnchorPoint);
}

View File

@ -0,0 +1,16 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-16
android.library.reference.1=../java
android.library=true

View File

@ -769,6 +769,7 @@
"cocos/platform/android/ControllerManualAdapter/build.xml",
"cocos/platform/android/ControllerManualAdapter/lint.xml",
"cocos/platform/android/ControllerManualAdapter/proguard-project.txt",
"cocos/platform/android/ControllerManualAdapter/project.properties",
"cocos/platform/android/ControllerManualAdapter/src/org/cocos2dx/lib/GameControllerActivity.java",
"cocos/platform/android/ControllerManualAdapter/src/org/cocos2dx/lib/GameControllerHelper.java",
"cocos/platform/android/ControllerManualAdapter/src/org/cocos2dx/lib/GameControllerMoga.java",

View File

@ -1247,6 +1247,11 @@ void NodeNameTest::onEnter()
{
TestCocosNodeDemo::BaseTest::onEnter();
this->scheduleOnce(schedule_selector(NodeNameTest::test),0.05f);
}
void NodeNameTest::test(float dt)
{
auto parent = Node::create();
// setName(), getName() and getChildByName()

View File

@ -303,6 +303,8 @@ public:
virtual std::string subtitle() const override;
virtual void onEnter() override;
void test(float dt);
};

View File

@ -10,4 +10,4 @@
# Project target.
target=android-10
android.library.reference.1=../../../cocos/platform/android/ControllerDelegate
android.library.reference.1=../../../cocos/platform/android/ControllerAutoAdapter

View File

@ -23,14 +23,10 @@ THE SOFTWARE.
****************************************************************************/
package org.cocos2dx.game_controller_test;
import java.util.ArrayList;
import org.cocos2dx.lib.GameControllerActivity;
import org.cocos2dx.lib.GameControllerHelper.ControllerListener;
//import org.cocos2dx.lib.GameControllerHelper.ControllerListener;
import android.bluetooth.BluetoothDevice;
import android.os.Bundle;
import android.util.Log;
public class AppActivity extends GameControllerActivity {
@ -42,61 +38,12 @@ public class AppActivity extends GameControllerActivity {
//Automatic adaptation for connect controller.
//Supported Platform: Nibiru / Moga / Ouya TV
//mControllerHelper.setControllerListener(controllerListener);
mControllerHelper.connectController();
this.connectController();
//Manually specify an adapter.
//setGameControllerInstance(new GameControllerNibiru());
//setGameControllerInstance(new GameControllerMoga());
//setGameControllerInstance(new GameControllerOuya());
//Requirements: using libControllerDriveAdapter project
//this.connectController(DRIVERTYPE_NIBIRU);
//this.connectController(DRIVERTYPE_MOGA);
//this.connectController(DRIVERTYPE_OUYA);
}
ControllerListener controllerListener = new ControllerListener() {
@Override
public void onDownloadConfigStarted() {
Log.w("controllerListener", "onDownloadDepsFinished");
}
@Override
public void onDownloadConfigFinished(boolean isSuccess) {
//If download failed
Log.w("controllerListener", "onDownloadConfigFinished:" + isSuccess);
}
@Override
public void onControllerDiscoveryStarted() {
Log.w("controllerListener", "onControllerDiscoveryStarted");
}
@Override
public void onControllerDiscoveryFinish(ArrayList<BluetoothDevice> devices) {
Log.w("controllerListener", "onControllerDiscoveryFinish");
}
@Override
public void onDownloadDepsStarted() {
Log.w("controllerListener", "onDownloadDepsStarted");
}
@Override
public void onDownloadDepsProgress(int bytesWritten, int totalSize) {
Log.w("controllerListener", "onDownloadDepsProgress");
}
@Override
public void onDownloadDepsFinished(boolean isSuccess) {
Log.w("controllerListener", "");
}
@Override
public void onInstallDriver(String filePath) {
Log.w("controllerListener", "onInstallDriver");
}
@Override
public void onConnectController() {
Log.w("controllerListener", "onConnectController");
}
};
}