Merge pull request #7543 from chengstory/v3_CocosStudioSurpport

1. CocosStudio adapt to cocos2d-x v3.2.
This commit is contained in:
minggo 2014-07-22 16:19:45 +08:00
commit 14ab7f2419
132 changed files with 541 additions and 301 deletions

View File

@ -4,9 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
ProjectSection(ProjectDependencies) = postProject
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "..\external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
EndProject
@ -14,8 +11,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\external\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}"
@ -37,6 +32,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-test", "..\tests\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-empty-test", "..\tests\lua-empty-test\project\proj.win32\lua-empty-test.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -63,10 +60,6 @@ Global
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.ActiveCfg = Debug|Win32
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.Build.0 = Debug|Win32
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.ActiveCfg = Release|Win32
@ -103,6 +96,10 @@ Global
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.Build.0 = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -631,8 +631,6 @@
460E47B31808090B000CDD6D /* CCEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */; };
460E47B41808090B000CDD6D /* CCEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */; };
460E47B51808090B000CDD6D /* CCEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */; };
460E47B61808090B000CDD6D /* CCEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168561807AF4E005B8026 /* CCEditBoxImplMac.h */; };
460E47B71808090B000CDD6D /* CCEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168571807AF4E005B8026 /* CCEditBoxImplMac.mm */; };
460E47B81808090B000CDD6D /* CCEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */; };
460E47BB1808090B000CDD6D /* CCEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */; };
460E47BC1808090B000CDD6D /* CCEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */; };
@ -643,8 +641,6 @@
460E47C11808090D000CDD6D /* CCEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */; };
460E47C21808090D000CDD6D /* CCEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */; };
460E47C31808090D000CDD6D /* CCEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */; };
460E47C41808090D000CDD6D /* CCEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168561807AF4E005B8026 /* CCEditBoxImplMac.h */; };
460E47C51808090D000CDD6D /* CCEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168571807AF4E005B8026 /* CCEditBoxImplMac.mm */; };
460E47C61808090D000CDD6D /* CCEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */; };
460E47C91808090D000CDD6D /* CCEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */; };
460E47CA1808090D000CDD6D /* CCEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */; };
@ -1957,7 +1953,7 @@
06CAAABF186AD63B0012A414 /* TriggerMng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerMng.h; sourceTree = "<group>"; };
06CAAAC0186AD63B0012A414 /* TriggerObj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerObj.cpp; sourceTree = "<group>"; };
06CAAAC1186AD63B0012A414 /* TriggerObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerObj.h; sourceTree = "<group>"; };
1551A33F158F2AB200E66CFE /* libcocos2dx Mac.dylib */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos2dx Mac.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
1551A33F158F2AB200E66CFE /* libcocos2dx Mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos2dx Mac.a"; sourceTree = BUILT_PRODUCTS_DIR; };
1551A342158F2AB200E66CFE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1A01C67618F57BE800EFE3A6 /* CCArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArray.cpp; sourceTree = "<group>"; };
1A01C67718F57BE800EFE3A6 /* CCArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArray.h; sourceTree = "<group>"; };
@ -2434,8 +2430,6 @@
46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplAndroid.h; sourceTree = "<group>"; };
46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplIOS.h; sourceTree = "<group>"; };
46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEditBoxImplIOS.mm; sourceTree = "<group>"; };
46A168561807AF4E005B8026 /* CCEditBoxImplMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplMac.h; sourceTree = "<group>"; };
46A168571807AF4E005B8026 /* CCEditBoxImplMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = CCEditBoxImplMac.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplNone.cpp; sourceTree = "<group>"; };
46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplWin.cpp; sourceTree = "<group>"; };
46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplWin.h; sourceTree = "<group>"; };
@ -3160,7 +3154,7 @@
1551A340158F2AB200E66CFE /* Products */ = {
isa = PBXGroup;
children = (
1551A33F158F2AB200E66CFE /* libcocos2dx Mac.dylib */,
1551A33F158F2AB200E66CFE /* libcocos2dx Mac.a */,
A03F2CB81780BD04006731B9 /* libchipmunk Mac.a */,
A03F2D9B1780BDF7006731B9 /* libbox2d Mac.a */,
A03F2ED617814268006731B9 /* libCocosDenshion Mac.a */,
@ -4383,8 +4377,6 @@
46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */,
46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */,
46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */,
46A168561807AF4E005B8026 /* CCEditBoxImplMac.h */,
46A168571807AF4E005B8026 /* CCEditBoxImplMac.mm */,
46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */,
46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */,
46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */,
@ -5445,7 +5437,6 @@
460E477E18080902000CDD6D /* CCControl.h in Headers */,
460E47B11808090B000CDD6D /* CCEditBoxImpl.h in Headers */,
460E47B31808090B000CDD6D /* CCEditBoxImplAndroid.h in Headers */,
460E47B61808090B000CDD6D /* CCEditBoxImplMac.h in Headers */,
460E477B180808F5000CDD6D /* ExtensionMacros.h in Headers */,
460E479118080902000CDD6D /* CCControlUtils.h in Headers */,
460E468118080832000CDD6D /* cocos-ext.h in Headers */,
@ -5718,7 +5709,6 @@
460E47A418080904000CDD6D /* CCControlSlider.h in Headers */,
460E479E18080904000CDD6D /* CCControlHuePicker.h in Headers */,
460E468218080836000CDD6D /* cocos-ext.h in Headers */,
460E47C41808090D000CDD6D /* CCEditBoxImplMac.h in Headers */,
460E47BF1808090D000CDD6D /* CCEditBoxImpl.h in Headers */,
460E47AE18080904000CDD6D /* CCScale9Sprite.h in Headers */,
460E477C180808F7000CDD6D /* ExtensionMacros.h in Headers */,
@ -6212,7 +6202,7 @@
);
name = "cocos2dx Mac";
productName = cocos2dx;
productReference = 1551A33F158F2AB200E66CFE /* libcocos2dx Mac.dylib */;
productReference = 1551A33F158F2AB200E66CFE /* libcocos2dx Mac.a */;
productType = "com.apple.product-type.library.static";
};
A03F2B781780BD04006731B9 /* chipmunk Mac */ = {
@ -6898,7 +6888,6 @@
460E478E18080902000CDD6D /* CCControlSwitch.cpp in Sources */,
460E479218080902000CDD6D /* CCInvocation.cpp in Sources */,
460E477F18080902000CDD6D /* CCControlButton.cpp in Sources */,
460E47B71808090B000CDD6D /* CCEditBoxImplMac.mm in Sources */,
460E47AF1808090B000CDD6D /* CCEditBox.cpp in Sources */,
460E479418080902000CDD6D /* CCScale9Sprite.cpp in Sources */,
460E478118080902000CDD6D /* CCControlColourPicker.cpp in Sources */,
@ -7121,7 +7110,6 @@
460E47D718080914000CDD6D /* CCTableView.cpp in Sources */,
460E479F18080904000CDD6D /* CCControlPotentiometer.cpp in Sources */,
460E479818080904000CDD6D /* CCControlButton.cpp in Sources */,
460E47C51808090D000CDD6D /* CCEditBoxImplMac.mm in Sources */,
460E479D18080904000CDD6D /* CCControlHuePicker.cpp in Sources */,
460E47A318080904000CDD6D /* CCControlSlider.cpp in Sources */,
460E47AB18080904000CDD6D /* CCInvocation.cpp in Sources */,
@ -7635,7 +7623,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = YES;
@ -7673,7 +7661,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = YES;
@ -7708,8 +7696,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
EXECUTABLE_EXTENSION = dylib;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
EXECUTABLE_EXTENSION = a;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
@ -7731,7 +7719,7 @@
"\"$(SRCROOT)/../external/freetype2/prebuilt/mac\"",
"\"$(SRCROOT)/../external/websockets/prebuilt/mac\"",
);
MACH_O_TYPE = mh_dylib;
MACH_O_TYPE = staticlib;
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac";
};
name = Debug;
@ -7740,8 +7728,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
EXECUTABLE_EXTENSION = dylib;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
EXECUTABLE_EXTENSION = a;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch";
@ -7764,7 +7752,7 @@
"\"$(SRCROOT)/../external/freetype2/prebuilt/mac\"",
"\"$(SRCROOT)/../external/websockets/prebuilt/mac\"",
);
MACH_O_TYPE = mh_dylib;
MACH_O_TYPE = staticlib;
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac";
};
name = Release;
@ -7870,6 +7858,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
CODE_SIGN_IDENTITY = "";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
CC_TARGET_OS_MAC,
@ -7886,6 +7875,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
CODE_SIGN_IDENTITY = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",

View File

@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1551A33E158F2AB200E66CFE"
BuildableName = "libcocos2dx Mac.dylib"
BuildableName = "libcocos2dx Mac.a"
BlueprintName = "cocos2dx Mac"
ReferencedContainer = "container:cocos2d_libs.xcodeproj">
</BuildableReference>

View File

@ -89,12 +89,33 @@ bool ComponentContainer::remove(const std::string& name)
com->setOwner(nullptr);
_components->erase(iter);
ret = true;
} while(0);
return ret;
}
bool ComponentContainer::remove(Component *com)
{
bool ret = false;
do
{
CC_BREAK_IF(!_components);
for (auto iter = _components->begin(); iter != _components->end(); ++iter)
{
if (iter->second == com)
{
com->onExit();
com->setOwner(nullptr);
_components->erase(iter);
break;
}
}
ret = true;
} while(0);
return ret;
}
void ComponentContainer::removeAll()
{
if (_components != nullptr)

View File

@ -50,6 +50,7 @@ public:
virtual Component* get(const std::string& name) const;
virtual bool add(Component *com);
virtual bool remove(const std::string& name);
virtual bool remove(Component *com);
virtual void removeAll();
virtual void visit(float delta);
public:

View File

@ -1850,6 +1850,11 @@ bool Node::removeComponent(const std::string& name)
return false;
}
bool Node::removeComponent(Component *component)
{
return _componentContainer->remove(component);
}
void Node::removeAllComponents()
{
if( _componentContainer )

View File

@ -1433,6 +1433,10 @@ public:
*/
virtual bool removeComponent(const std::string& name);
/**
* removes a component by its pointer
*/
virtual bool removeComponent(Component *component);
/**
* removes all components
*/

View File

@ -78,7 +78,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_USRDLL;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_USRDLL;_DEBUG;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@ -112,7 +112,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<IgnoreSpecificDefaultLibraries> ;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<ModuleDefinitionFile>cocos2d.def</ModuleDefinitionFile>
<AdditionalDependencies>libchipmunk.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
@ -129,7 +129,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_USRDLL;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_USRDLL;NDEBUG;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
@ -165,7 +165,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<ModuleDefinitionFile>cocos2d.def</ModuleDefinitionFile>
</Link>

View File

@ -30,11 +30,11 @@ THE SOFTWARE.
#define EXPORT_DLL _EXPORT_
#elif defined(_WIN32)
#if defined(_EXPORT_DLL_)
#define EXPORT_DLL// __declspec(dllexport)
#define EXPORT_DLL __declspec(dllexport)
#elif defined(IGNORE_EXPORT)
#define EXPORT_DLL
#else /* use a DLL library */
#define EXPORT_DLL// __declspec(dllimport)
#define EXPORT_DLL __declspec(dllimport)
#endif
#else
#if defined(_SHARED_)

View File

@ -18,7 +18,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
@ -27,7 +27,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
@ -74,7 +74,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_EXPORT_DLL_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@ -90,7 +90,7 @@
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>
@ -98,7 +98,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_EXPORT_DLL_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
@ -116,7 +116,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>

View File

@ -283,5 +283,5 @@ To enable set it to a value different than 0. Disabled by default.
#ifndef CC_CONSTRUCTOR_ACCESS
#define CC_CONSTRUCTOR_ACCESS protected
#endif
#endif // __CCCONFIG_H__

View File

@ -184,7 +184,7 @@ struct CC_DLL Color4F
/** A texcoord composed of 2 floats: u, y
@since v3.0
*/
struct Tex2F {
struct CC_DLL Tex2F {
Tex2F(float _u, float _v): u(_u), v(_v) {}
Tex2F(): u(0.f), v(0.f) {}
@ -195,7 +195,7 @@ struct Tex2F {
//! Vec2 Sprite component
struct PointSprite
struct CC_DLL PointSprite
{
Vec2 pos; // 8 bytes
Color4B color; // 4 bytes
@ -203,7 +203,7 @@ struct PointSprite
};
//! A 2D Quad. 4 * 2 floats
struct Quad2
struct CC_DLL Quad2
{
Vec2 tl;
Vec2 tr;
@ -213,7 +213,7 @@ struct Quad2
//! A 3D Quad. 4 * 3 floats
struct Quad3 {
struct CC_DLL Quad3 {
Vec3 bl;
Vec3 br;
Vec3 tl;
@ -232,7 +232,7 @@ struct V2F_C4B_T2F
};
//! a Vec2 with a vertex point, a tex coord point and a color 4F
struct V2F_C4F_T2F
struct CC_DLL V2F_C4F_T2F
{
//! vertices (2F)
Vec2 vertices;
@ -243,7 +243,7 @@ struct V2F_C4F_T2F
};
//! a Vec2 with a vertex point, a tex coord point and a color 4B
struct V3F_C4B_T2F
struct CC_DLL V3F_C4B_T2F
{
//! vertices (3F)
Vec3 vertices; // 12 bytes
@ -256,7 +256,7 @@ struct V3F_C4B_T2F
};
//! a Vec2 with a vertex point, a tex coord point
struct V3F_T2F
struct CC_DLL V3F_T2F
{
//! vertices (2F)
Vec3 vertices;
@ -265,7 +265,7 @@ struct V3F_T2F
};
//! A Triangle of V2F_C4B_T2F
struct V2F_C4B_T2F_Triangle
struct CC_DLL V2F_C4B_T2F_Triangle
{
//! Vec2 A
V2F_C4B_T2F a;
@ -276,7 +276,7 @@ struct V2F_C4B_T2F_Triangle
};
//! A Quad of V2F_C4B_T2F
struct V2F_C4B_T2F_Quad
struct CC_DLL V2F_C4B_T2F_Quad
{
//! bottom left
V2F_C4B_T2F bl;
@ -289,7 +289,7 @@ struct V2F_C4B_T2F_Quad
};
//! 4 Vertex3FTex2FColor4B
struct V3F_C4B_T2F_Quad
struct CC_DLL V3F_C4B_T2F_Quad
{
//! top left
V3F_C4B_T2F tl;
@ -302,7 +302,7 @@ struct V3F_C4B_T2F_Quad
};
//! 4 Vertex2FTex2FColor4F Quad
struct V2F_C4F_T2F_Quad
struct CC_DLL V2F_C4F_T2F_Quad
{
//! bottom left
V2F_C4F_T2F bl;
@ -314,7 +314,7 @@ struct V2F_C4F_T2F_Quad
V2F_C4F_T2F tr;
};
struct V3F_T2F_Quad
struct CC_DLL V3F_T2F_Quad
{
//! bottom left
V3F_T2F bl;
@ -359,7 +359,7 @@ struct CC_DLL BlendFunc
// XXX: If any of these enums are edited and/or reordered, update Texture2D.m
//! Vertical text alignment type
enum class TextVAlignment
enum class CC_DLL TextVAlignment
{
TOP,
CENTER,
@ -368,7 +368,7 @@ enum class TextVAlignment
// XXX: If any of these enums are edited and/or reordered, update Texture2D.m
//! Horizontal text alignment type
enum class TextHAlignment
enum class CC_DLL TextHAlignment
{
LEFT,
CENTER,
@ -378,7 +378,7 @@ enum class TextHAlignment
// types for animation in particle systems
// texture coordinates for a quad
struct T2F_Quad
struct CC_DLL T2F_Quad
{
//! bottom left
Tex2F bl;
@ -391,7 +391,7 @@ struct T2F_Quad
};
// struct that holds the size in pixels, texture coordinates and delays for animated ParticleSystemQuad
struct AnimationFrameData
struct CC_DLL AnimationFrameData
{
T2F_Quad texCoords;
float delay;
@ -404,7 +404,7 @@ struct AnimationFrameData
// shadow attributes
struct FontShadow
struct CC_DLL FontShadow
{
public:
@ -426,7 +426,7 @@ public:
};
// stroke attributes
struct FontStroke
struct CC_DLL FontStroke
{
public:
@ -447,7 +447,7 @@ public:
};
// font attributes
struct FontDefinition
struct CC_DLL FontDefinition
{
public:
/**

View File

@ -63,7 +63,7 @@
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
@ -82,7 +82,7 @@
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>None</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization>
</ClCompile>

View File

@ -215,13 +215,17 @@ void ActionTimeline::startWithTarget(Node *target)
[this, target](Node* child)
{
ActionTimelineData* data = dynamic_cast<ActionTimelineData*>(child->getUserObject());
int actionTag = data->getActionTag();
if(_timelineMap.find(actionTag) != _timelineMap.end())
if(data)
{
auto timelines = this->_timelineMap[actionTag];
for (auto timeline : timelines)
int actionTag = data->getActionTag();
if(_timelineMap.find(actionTag) != _timelineMap.end())
{
timeline->setNode(child);
auto timelines = this->_timelineMap[actionTag];
for (auto timeline : timelines)
{
timeline->setNode(child);
}
}
}
});

View File

@ -27,10 +27,11 @@ THE SOFTWARE.
#include "CCTimeLine.h"
#include "renderer/CCRenderer.h"
#include "cocostudio/CocosStudioExport.h"
NS_TIMELINE_BEGIN
class ActionTimelineData : public cocos2d::Ref
class CC_STUDIO_DLL ActionTimelineData : public cocos2d::Ref
{
public:
static ActionTimelineData* create(int actionTag);
@ -45,7 +46,7 @@ protected:
};
class ActionTimeline : public cocos2d::Action
class CC_STUDIO_DLL ActionTimeline : public cocos2d::Action
{
public:
friend class Frame;

View File

@ -28,6 +28,7 @@ THE SOFTWARE.
#include "cocos2d.h"
#include "cocostudio/DictionaryHelper.h"
#include "CCTimelineMacro.h"
#include "cocostudio/CocosStudioExport.h"
NS_TIMELINE_BEGIN
@ -35,7 +36,7 @@ class ActionTimeline;
class Timeline;
class Frame;
class ActionTimelineCache
class CC_STUDIO_DLL ActionTimelineCache
{
public:
/** Gets the singleton */

View File

@ -27,12 +27,13 @@ THE SOFTWARE.
#include "cocos2d.h"
#include "CCTimelineMacro.h"
#include "cocostudio/CocosStudioExport.h"
NS_TIMELINE_BEGIN
class Timeline;
class Frame : public cocos2d::Ref
class CC_STUDIO_DLL Frame : public cocos2d::Ref
{
public:
@ -68,7 +69,7 @@ protected:
};
class VisibleFrame : public Frame
class CC_STUDIO_DLL VisibleFrame : public Frame
{
public:
static VisibleFrame* create();
@ -86,7 +87,7 @@ protected:
};
class TextureFrame : public Frame
class CC_STUDIO_DLL TextureFrame : public Frame
{
public:
static TextureFrame* create();
@ -106,7 +107,7 @@ protected:
std::string _textureName;
};
class RotationFrame : public Frame
class CC_STUDIO_DLL RotationFrame : public Frame
{
public:
static RotationFrame* create();
@ -125,7 +126,7 @@ protected:
float _betwennRotation;
};
class SkewFrame : public Frame
class CC_STUDIO_DLL SkewFrame : public Frame
{
public:
static SkewFrame* create();
@ -150,7 +151,7 @@ protected:
};
class RotationSkewFrame : public SkewFrame
class CC_STUDIO_DLL RotationSkewFrame : public SkewFrame
{
public:
static RotationSkewFrame* create();
@ -163,7 +164,7 @@ public:
};
class PositionFrame : public Frame
class CC_STUDIO_DLL PositionFrame : public Frame
{
public:
static PositionFrame* create();
@ -189,7 +190,7 @@ protected:
};
class ScaleFrame : public Frame
class CC_STUDIO_DLL ScaleFrame : public Frame
{
public:
static ScaleFrame* create();
@ -216,7 +217,7 @@ protected:
};
class AnchorPointFrame : public Frame
class CC_STUDIO_DLL AnchorPointFrame : public Frame
{
public:
static AnchorPointFrame* create();
@ -242,7 +243,7 @@ enum InnerActionType
SingleFrame
};
class InnerActionFrame : public Frame
class CC_STUDIO_DLL InnerActionFrame : public Frame
{
public:
static InnerActionFrame* create();
@ -263,7 +264,7 @@ protected:
};
class ColorFrame : public Frame
class CC_STUDIO_DLL ColorFrame : public Frame
{
public:
static ColorFrame* create();
@ -290,7 +291,7 @@ protected:
};
class EventFrame : public Frame
class CC_STUDIO_DLL EventFrame : public Frame
{
public:
static EventFrame* create();
@ -307,7 +308,7 @@ protected:
std::string _event;
};
class ZOrderFrame : public Frame
class CC_STUDIO_DLL ZOrderFrame : public Frame
{
public:
static ZOrderFrame* create();

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __CC_NODE_CACHE_H__
#include "cocostudio/DictionaryHelper.h"
#include "cocostudio/CocosStudioExport.h"
#include "cocos2d.h"
namespace cocostudio {
@ -33,7 +34,7 @@ namespace cocostudio {
namespace timeline{
class NodeReader
class CC_STUDIO_DLL NodeReader
{
public:
static NodeReader* getInstance();

View File

@ -27,12 +27,13 @@ THE SOFTWARE.
#include "CCFrame.h"
#include "CCTimelineMacro.h"
#include "cocostudio/CocosStudioExport.h"
NS_TIMELINE_BEGIN
class ActionTimeline;
class Timeline : public cocos2d::Ref
class CC_STUDIO_DLL Timeline : public cocos2d::Ref
{
public:
static Timeline* create();

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include "math/CCGeometry.h"
#include "2d/CCActionInterval.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -92,7 +93,7 @@ enum class FrameEaseType
* @js NA
* @lua NA
*/
class ActionFrame: public cocos2d::Ref
class CC_STUDIO_DLL ActionFrame: public cocos2d::Ref
{
public:
@ -210,7 +211,7 @@ protected:
* @js NA
* @lua NA
*/
class ActionMoveFrame:public ActionFrame
class CC_STUDIO_DLL ActionMoveFrame:public ActionFrame
{
public:
@ -254,7 +255,7 @@ protected:
* @js NA
* @lua NA
*/
class ActionScaleFrame:public ActionFrame
class CC_STUDIO_DLL ActionScaleFrame:public ActionFrame
{
public:

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __ActionFrameEasing_H__
#include "base/CCRef.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -56,7 +57,7 @@ enum FrameEasingType
* @js NA
* @lua NA
*/
class ActionFrameEasing:public cocos2d::Ref
class CC_STUDIO_DLL ActionFrameEasing:public cocos2d::Ref
{
protected:
FrameEasingType _type;

View File

@ -27,13 +27,14 @@ THE SOFTWARE.
#include "cocostudio/CCActionObject.h"
#include "cocostudio/DictionaryHelper.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
class CocoLoader;
struct stExpCocoNode;
class ActionManagerEx:public cocos2d::Ref
class CC_STUDIO_DLL ActionManagerEx:public cocos2d::Ref
{
public:

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include "cocostudio/CCActionFrame.h"
#include "cocostudio/DictionaryHelper.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -36,7 +37,7 @@ struct stExpCocoNode;
* @js NA
* @lua NA
*/
class ActionNode : public cocos2d::Ref
class CC_STUDIO_DLL ActionNode : public cocos2d::Ref
{
public:

View File

@ -28,6 +28,7 @@ THE SOFTWARE.
#include "cocostudio/CCActionNode.h"
#include "2d/CCActionInstant.h"
#include "cocostudio/DictionaryHelper.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -38,7 +39,7 @@ struct stExpCocoNode;
* @js NA
* @lua NA
*/
class ActionObject : public cocos2d::Ref
class CC_STUDIO_DLL ActionObject : public cocos2d::Ref
{
public:

View File

@ -31,6 +31,7 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureAnimation.h"
#include "cocostudio/CCSpriteFrameCacheHelper.h"
#include "cocostudio/CCArmatureDataManager.h"
#include "cocostudio/CocosStudioExport.h"
#include "math/CCMath.h"
class b2Body;
@ -67,7 +68,7 @@ CC_DEPRECATED_ATTRIBUTE typedef Armature CCArmature;
CC_DEPRECATED_ATTRIBUTE typedef ArmatureDataManager CCArmatureDataManager;
CC_DEPRECATED_ATTRIBUTE typedef cocos2d::tweenfunc::TweenType CCTweenType;
class Armature : public cocos2d::Node, public cocos2d::BlendProtocol
class CC_STUDIO_DLL Armature : public cocos2d::Node, public cocos2d::BlendProtocol
{
public:

View File

@ -28,6 +28,7 @@ THE SOFTWARE.
#include "cocostudio/CCProcessBase.h"
#include "cocostudio/CCTween.h"
#include "cocostudio/CocosStudioExport.h"
#include <queue>
namespace cocostudio {
@ -65,7 +66,7 @@ struct MovementEvent
std::string movementID;
};
class ArmatureAnimation : public ProcessBase
class CC_STUDIO_DLL ArmatureAnimation : public ProcessBase
{
public:
/**

View File

@ -27,7 +27,7 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CCDatas.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -42,7 +42,7 @@ struct RelativeData
/**
* @brief format and manage armature configuration and armature animation
*/
class ArmatureDataManager : public cocos2d::Ref
class CC_STUDIO_DLL ArmatureDataManager : public cocos2d::Ref
{
public:
/** @deprecated Use getInstance() instead */

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include "2d/CCNode.h"
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocos2d {
class GroupCommand;
@ -34,7 +35,7 @@ namespace cocos2d {
namespace cocostudio {
class BatchNode : public cocos2d::Node
class CC_STUDIO_DLL BatchNode : public cocos2d::Node
{
public:
static BatchNode *create();

View File

@ -30,6 +30,7 @@ THE SOFTWARE.
#include "cocostudio/CCTween.h"
#include "cocostudio/CCDecorativeDisplay.h"
#include "cocostudio/CCDisplayManager.h"
#include "cocostudio/CocosStudioExport.h"
#include "2d/CCNode.h"
#include "math/CCMath.h"
@ -37,7 +38,7 @@ namespace cocostudio {
class Armature;
class Bone : public cocos2d::Node
class CC_STUDIO_DLL Bone : public cocos2d::Node
{
public:
/**

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CCDatas.h"
#include "cocostudio/CocosStudioExport.h"
#ifndef PT_RATIO
#define PT_RATIO 32
@ -48,7 +49,7 @@ class Bone;
* @js NA
* @lua NA
*/
class ColliderFilter
class CC_STUDIO_DLL ColliderFilter
{
public:
virtual ~ColliderFilter() { }
@ -85,7 +86,7 @@ protected:
#endif
};
class ColliderBody : public cocos2d::Ref
class CC_STUDIO_DLL ColliderBody : public cocos2d::Ref
{
public:
ColliderBody(ContourData *contourData);
@ -130,7 +131,7 @@ private:
* @js NA
* @lua NA
*/
class ColliderDetector : public cocos2d::Ref
class CC_STUDIO_DLL ColliderDetector : public cocos2d::Ref
{
public:
static ColliderDetector *create();

View File

@ -28,13 +28,14 @@ THE SOFTWARE.
#include "CCComBase.h"
#include "2d/CCComponent.h"
#include "base/CCValue.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
class ComAttribute : public cocos2d::Component
class CC_STUDIO_DLL ComAttribute : public cocos2d::Component
{
DECLARE_CLASS_COMPONENT_INFO
protected:
public:
/**
* @js ctor
*/

View File

@ -27,14 +27,16 @@ THE SOFTWARE.
#include "CCComBase.h"
#include "2d/CCComponent.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
class ComAudio : public cocos2d::Component
class CC_STUDIO_DLL ComAudio : public cocos2d::Component
{
DECLARE_CLASS_COMPONENT_INFO
protected:
public:
/**
* @js ctor
*/

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include <string>
#include "DictionaryHelper.h"
#include "cocostudio/CocosStudioExport.h"
#include "base/ObjectFactory.h"
#include "CocoLoader.h"
@ -46,7 +47,7 @@ THE SOFTWARE.
#define CREATE_CLASS_COMPONENT_INFO(className) \
cocos2d::ObjectFactory::TInfo(#className, &className::createInstance)
struct SerData
struct CC_STUDIO_DLL SerData
{
const rapidjson::Value *_rData;
cocostudio::stExpCocoNode *_cocoNode;

View File

@ -27,11 +27,12 @@ THE SOFTWARE.
#include "CCComBase.h"
#include "cocostudio/CCInputDelegate.h"
#include "cocostudio/CocosStudioExport.h"
#include "2d/CCComponent.h"
namespace cocostudio {
class ComController : public cocos2d::Component, public InputDelegate
class CC_STUDIO_DLL ComController : public cocos2d::Component, public InputDelegate
{
DECLARE_CLASS_COMPONENT_INFO

View File

@ -27,10 +27,11 @@ THE SOFTWARE.
#include "CCComBase.h"
#include "2d/CCComponent.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
class ComRender : public cocos2d::Component
class CC_STUDIO_DLL ComRender : public cocos2d::Component
{
DECLARE_CLASS_COMPONENT_INFO
protected:

View File

@ -29,6 +29,7 @@ THE SOFTWARE.
#include "cocostudio/CCDatas.h"
#include "cocostudio/CCArmature.h"
#include "cocostudio/DictionaryHelper.h"
#include "cocostudio/CocosStudioExport.h"
#include "json/document.h"
#include "DictionaryHelper.h"
@ -52,7 +53,7 @@ namespace cocostudio {
* @js NA
* @lua NA
*/
class DataReaderHelper : cocos2d::Ref
class CC_STUDIO_DLL DataReaderHelper : cocos2d::Ref
{
protected:

View File

@ -33,6 +33,7 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureDefine.h"
#include "2d/CCTweenFunction.h"
#include "cocostudio/CocosStudioExport.h"
#define CC_CREATE_NO_PARAM_NO_INIT(varType)\
@ -68,7 +69,7 @@ namespace cocostudio {
* @js NA
* @lua NA
*/
class BaseData : public cocos2d::Ref
class CC_STUDIO_DLL BaseData : public cocos2d::Ref
{
public:
CC_CREATE_NO_PARAM_NO_INIT(BaseData)
@ -137,7 +138,7 @@ enum DisplayType
* @js NA
* @lua NA
*/
class DisplayData : public cocos2d::Ref
class CC_STUDIO_DLL DisplayData : public cocos2d::Ref
{
public:
CC_CREATE_NO_PARAM_NO_INIT(DisplayData)
@ -165,7 +166,7 @@ public:
* @js NA
* @lua NA
*/
class SpriteDisplayData : public DisplayData
class CC_STUDIO_DLL SpriteDisplayData : public DisplayData
{
public:
CC_CREATE_NO_PARAM_NO_INIT(SpriteDisplayData)
@ -189,7 +190,7 @@ public:
* @js NA
* @lua NA
*/
class ArmatureDisplayData : public DisplayData
class CC_STUDIO_DLL ArmatureDisplayData : public DisplayData
{
public:
CC_CREATE_NO_PARAM_NO_INIT(ArmatureDisplayData)
@ -209,7 +210,7 @@ public:
* @js NA
* @lua NA
*/
class ParticleDisplayData : public DisplayData
class CC_STUDIO_DLL ParticleDisplayData : public DisplayData
{
public:
CC_CREATE_NO_PARAM_NO_INIT(ParticleDisplayData)
@ -234,7 +235,7 @@ public:
* @js NA
* @lua NA
*/
class BoneData : public BaseData
class CC_STUDIO_DLL BoneData : public BaseData
{
public:
CC_CREATE_NO_PARAM(BoneData)
@ -268,7 +269,7 @@ public:
* @js NA
* @lua NA
*/
class ArmatureData : public cocos2d::Ref
class CC_STUDIO_DLL ArmatureData : public cocos2d::Ref
{
public:
CC_CREATE_NO_PARAM(ArmatureData)
@ -314,7 +315,7 @@ enum BlendType
* @js NA
* @lua NA
*/
class FrameData : public BaseData
class CC_STUDIO_DLL FrameData : public BaseData
{
public:
CC_CREATE_NO_PARAM_NO_INIT(FrameData)
@ -361,7 +362,7 @@ public:
* @js NA
* @lua NA
*/
class MovementBoneData : public cocos2d::Ref
class CC_STUDIO_DLL MovementBoneData : public cocos2d::Ref
{
public:
CC_CREATE_NO_PARAM(MovementBoneData)
@ -393,7 +394,7 @@ public:
* @js NA
* @lua NA
*/
class MovementData : public cocos2d::Ref
class CC_STUDIO_DLL MovementData : public cocos2d::Ref
{
public:
CC_CREATE_NO_PARAM_NO_INIT(MovementData)
@ -455,7 +456,7 @@ public:
* @js NA
* @lua NA
*/
class AnimationData : public cocos2d::Ref
class CC_STUDIO_DLL AnimationData : public cocos2d::Ref
{
public:
CC_CREATE_NO_PARAM_NO_INIT(AnimationData)
@ -486,7 +487,7 @@ public:
* @js NA
* @lua NA
*/
class ContourData : public cocos2d::Ref
class CC_STUDIO_DLL ContourData : public cocos2d::Ref
{
public:
CC_CREATE_NO_PARAM(ContourData)
@ -515,7 +516,7 @@ public:
* @js NA
* @lua NA
*/
class TextureData : public cocos2d::Ref
class CC_STUDIO_DLL TextureData : public cocos2d::Ref
{
public:
CC_CREATE_NO_PARAM(TextureData)

View File

@ -28,6 +28,7 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CCDisplayFactory.h"
#include "cocostudio/CCDatas.h"
#include "cocostudio/CocosStudioExport.h"
#if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT || ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX
@ -43,7 +44,7 @@ namespace cocostudio {
* @js NA
* @lua NA
*/
class DecorativeDisplay: public cocos2d::Ref
class CC_STUDIO_DLL DecorativeDisplay: public cocos2d::Ref
{
public:
static DecorativeDisplay *create();

View File

@ -27,6 +27,8 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CCDatas.h"
#include "cocostudio/CocosStudioExport.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -38,7 +40,7 @@ class DisplayData;
* @js NA
* @lua NA
*/
class DisplayFactory
class CC_STUDIO_DLL DisplayFactory
{
public:
static void addDisplay(Bone *bone, DecorativeDisplay *decoDisplay, DisplayData *displayData);

View File

@ -28,6 +28,7 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CCDecorativeDisplay.h"
#include "cocostudio/CCDatas.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -37,7 +38,7 @@ class Bone;
* @js NA
* @lua NA
*/
class DisplayManager : public cocos2d::Ref
class CC_STUDIO_DLL DisplayManager : public cocos2d::Ref
{
public:
static DisplayManager *create(Bone *bone);

View File

@ -31,6 +31,7 @@ THE SOFTWARE.
#include "base/ccTypes.h"
#include "base/CCEventKeyboard.h"
#include "base/CCEventListener.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocos2d {
class __Set;
@ -41,7 +42,7 @@ namespace cocostudio {
/**
* @lua NA
*/
class InputDelegate
class CC_STUDIO_DLL InputDelegate
{
protected:
/**

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CCDatas.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -50,7 +51,7 @@ enum AnimationType
* @js NA
* @lua NA
*/
class ProcessBase : public cocos2d::Ref
class CC_STUDIO_DLL ProcessBase : public cocos2d::Ref
{
public:
ProcessBase(void);

View File

@ -29,6 +29,7 @@ THE SOFTWARE.
#include "cocostudio/DictionaryHelper.h"
#include "WidgetReader/WidgetReaderProtocol.h"
#include "base/ObjectFactory.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -41,7 +42,7 @@ namespace cocostudio {
typedef void (cocos2d::Ref::*SEL_ParseEvent)(const std::string&, cocos2d::Ref*, const rapidjson::Value&);
#define parseselector(_SELECTOR) (SEL_ParseEvent)(&_SELECTOR)
class GUIReader : public cocos2d::Ref
class CC_STUDIO_DLL GUIReader : public cocos2d::Ref
{
public:
CC_DEPRECATED_ATTRIBUTE static GUIReader* shareReader() { return GUIReader::getInstance(); };
@ -89,7 +90,7 @@ public:
};
class WidgetPropertiesReader : public cocos2d::Ref
class CC_STUDIO_DLL WidgetPropertiesReader : public cocos2d::Ref
{
public:
virtual cocos2d::ui::Widget* createWidget(const rapidjson::Value& dic, const char* fullPath, const char* fileName)=0;
@ -124,7 +125,7 @@ protected:
};
class WidgetPropertiesReader0250 : public WidgetPropertiesReader
class CC_STUDIO_DLL WidgetPropertiesReader0250 : public WidgetPropertiesReader
{
@ -171,7 +172,7 @@ public:
const rapidjson::Value& customOptions);
};
class WidgetPropertiesReader0300 : public WidgetPropertiesReader
class CC_STUDIO_DLL WidgetPropertiesReader0300 : public WidgetPropertiesReader
{

View File

@ -26,12 +26,12 @@ THE SOFTWARE.
#define __CCSSCENEREADER_H__
#include "cocostudio/DictionaryHelper.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
class SceneReader
class CC_STUDIO_DLL SceneReader
{
public:

View File

@ -30,10 +30,11 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CCBone.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
class Skin : public cocos2d::Sprite
class CC_STUDIO_DLL Skin : public cocos2d::Sprite
{
public:
static Skin *create();

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#include "base/CCPlatformMacros.h"
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CocosStudioExport.h"
#include <stack>
#include <string>
@ -35,7 +36,7 @@ namespace cocostudio {
* @js NA
* @lua NA
*/
class SpriteFrameCacheHelper
class CC_STUDIO_DLL SpriteFrameCacheHelper
{
public:
/** @deprecated Use getInstance() instead */

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CCDatas.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -35,7 +36,7 @@ namespace cocostudio {
* @js NA
* @lua NA
*/
class TransformHelp
class CC_STUDIO_DLL TransformHelp
{
public:
TransformHelp();

View File

@ -28,6 +28,7 @@ THE SOFTWARE.
#include "cocostudio/CCProcessBase.h"
#include "2d/CCTweenFunction.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio {
@ -39,7 +40,7 @@ using cocos2d::tweenfunc::TweenType;
* @js NA
* @lua NA
*/
class Tween : public ProcessBase
class CC_STUDIO_DLL Tween : public ProcessBase
{
public:
/**

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include "2d/CCSprite.h"
#include "cocostudio/CCArmatureDefine.h"
#include "cocostudio/CocosStudioExport.h"
#include <math.h>
namespace cocostudio {
@ -37,18 +38,18 @@ namespace cocostudio {
//! hit test function
bool isSpriteContainPoint(cocos2d::Sprite *sprite, cocos2d::Vec2 point);
bool isSpriteContainPoint(cocos2d::Sprite *sprite, cocos2d::Vec2 point, cocos2d::Vec2 &outPoint);
bool CC_STUDIO_DLL isSpriteContainPoint(cocos2d::Sprite *sprite, cocos2d::Vec2 point);
bool CC_STUDIO_DLL isSpriteContainPoint(cocos2d::Sprite *sprite, cocos2d::Vec2 point, cocos2d::Vec2 &outPoint);
#define CC_SPRITE_CONTAIN_POINT(sprite, point) isSpriteContainPoint((sprite), (point))
#define CC_SPRITE_CONTAIN_POINT_WITH_RETURN(sprite, point, outPoint) isSpriteContainPoint((sprite), (point), outPoint)
//! motion curve function
cocos2d::Vec2 bezierTo(float t, cocos2d::Vec2 &point1, cocos2d::Vec2 &point2, cocos2d::Vec2 &point3);
cocos2d::Vec2 bezierTo(float t, cocos2d::Vec2 &point1, cocos2d::Vec2 &point2, cocos2d::Vec2 &point3, cocos2d::Vec2 &point4);
cocos2d::Vec2 CC_STUDIO_DLL bezierTo(float t, cocos2d::Vec2 &point1, cocos2d::Vec2 &point2, cocos2d::Vec2 &point3);
cocos2d::Vec2 CC_STUDIO_DLL bezierTo(float t, cocos2d::Vec2 &point1, cocos2d::Vec2 &point2, cocos2d::Vec2 &point3, cocos2d::Vec2 &point4);
cocos2d::Vec2 circleTo(float t, cocos2d::Vec2 &center, float radius, float fromRadian, float radianDif);
cocos2d::Vec2 CC_STUDIO_DLL circleTo(float t, cocos2d::Vec2 &center, float radius, float fromRadian, float radianDif);
}

View File

@ -31,6 +31,7 @@
#include <stdint.h>
#include "json/rapidjson.h"
#include "json/document.h"
#include "cocostudio/CocosStudioExport.h"
#pragma pack (4)
@ -38,7 +39,7 @@ namespace cocostudio{
class CocoLoader;
struct stExpCocoAttribDesc
struct CC_STUDIO_DLL stExpCocoAttribDesc
{
char m_cTypeName;
uint32_t m_szName;
@ -46,7 +47,7 @@ public:
char* GetName(CocoLoader* pCoco);
};
struct stExpCocoObjectDesc
struct CC_STUDIO_DLL stExpCocoObjectDesc
{
unsigned char m_cAttribNum;
uint32_t m_szName;
@ -57,7 +58,7 @@ public:
stExpCocoAttribDesc* GetAttribDescArray(CocoLoader* pCoco);
};
struct stExpCocoNode
struct CC_STUDIO_DLL stExpCocoNode
{
public:
int16_t m_ObjIndex;
@ -75,7 +76,7 @@ public:
void WriteJson(CocoLoader* pCoco,void* pFileName = nullptr, int vLayer = 0, bool bEndNode = false, bool bParentNodeIsArray = false);
};
struct stCocoFileHeader
struct CC_STUDIO_DLL stCocoFileHeader
{
char m_FileDesc[32];
char m_Version[32];
@ -88,7 +89,7 @@ struct stCocoFileHeader
};
class CocoLoader
class CC_STUDIO_DLL CocoLoader
{
stCocoFileHeader* m_pFileHeader;
stExpCocoNode* m_pRootNode;

View File

@ -63,5 +63,6 @@ THE SOFTWARE.
#include "cocostudio/ActionTimeline/CCFrame.h"
#include "cocostudio/ActionTimeline/CCTimeLine.h"
#include "cocostudio/ActionTimeline/CCActionTimeline.h"
#include "cocostudio/CocosStudioExport.h"
#endif

View File

@ -0,0 +1,28 @@
#ifndef __CCCOCOSSTUDIO_H__
#define __CCCOCOSSTUDIO_H__
#if defined(WIN32) && defined(_WINDOWS)
#ifdef __MINGW32__
#include <string.h>
#endif
#if defined(_USRSTUDIODLL)
#define CC_STUDIO_DLL __declspec(dllexport)
#else /* use a DLL library */
#define CC_STUDIO_DLL __declspec(dllimport)
#endif
/* Define NULL pointer value */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#else
#define CC_STUDIO_DLL
#endif
#endif /* __CCEXTENSIONEXPORT_H__*/

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __DICTIONARYHELPER_H__
#include "json/document.h"
#include "cocostudio/CocosStudioExport.h"
#define DICTOOL DictionaryHelper::getInstance()
@ -34,7 +35,7 @@ namespace cocostudio {
* @js NA
* @lua NA
*/
class DictionaryHelper
class CC_STUDIO_DLL DictionaryHelper
{
public:
DictionaryHelper();

View File

@ -30,6 +30,7 @@ THE SOFTWARE.
#include "base/ObjectFactory.h"
#include "TriggerObj.h"
#include "TriggerMng.h"
#include "cocostudio/CocosStudioExport.h"
#define DECLARE_CLASS_INFO \
@ -47,7 +48,7 @@ THE SOFTWARE.
cocos2d::ObjectFactory::TInfo className::Type(#className, &className::createInstance); \
void sendEvent(unsigned int event);
void CC_STUDIO_DLL sendEvent(unsigned int event);
#endif

View File

@ -36,7 +36,7 @@ namespace cocostudio {
class TriggerObj;
class ArmatureMovementDispatcher : public cocos2d::Ref
class CC_STUDIO_DLL ArmatureMovementDispatcher : public cocos2d::Ref
{
public:
ArmatureMovementDispatcher(void);
@ -51,7 +51,7 @@ private:
};
class TriggerMng
class CC_STUDIO_DLL TriggerMng
{
public:
TriggerMng(void);

View File

@ -35,7 +35,7 @@ class EventListenerCustom;
namespace cocostudio {
class BaseTriggerCondition : public cocos2d::Ref
class CC_STUDIO_DLL BaseTriggerCondition : public cocos2d::Ref
{
protected:
BaseTriggerCondition(void);
@ -48,7 +48,7 @@ public:
virtual void removeAll();
};
class BaseTriggerAction : public cocos2d::Ref
class CC_STUDIO_DLL BaseTriggerAction : public cocos2d::Ref
{
protected:
BaseTriggerAction(void);
@ -62,7 +62,7 @@ public:
};
class TriggerObj : public cocos2d::Ref
class CC_STUDIO_DLL TriggerObj : public cocos2d::Ref
{
public:
TriggerObj(void);

View File

@ -26,10 +26,11 @@
#define __TestCpp__ButtonReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class ButtonReader : public WidgetReader
class CC_STUDIO_DLL ButtonReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__CheckBoxReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class CheckBoxReader : public WidgetReader
class CC_STUDIO_DLL CheckBoxReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__ImageViewReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class ImageViewReader : public WidgetReader
class CC_STUDIO_DLL ImageViewReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__LayoutReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class LayoutReader : public WidgetReader
class CC_STUDIO_DLL LayoutReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__ListViewReader__
#include "../ScrollViewReader/ScrollViewReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class ListViewReader : public ScrollViewReader
class CC_STUDIO_DLL ListViewReader : public ScrollViewReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__LoadingBarReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class LoadingBarReader : public WidgetReader
class CC_STUDIO_DLL LoadingBarReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__PageViewReader__
#include "../LayoutReader/LayoutReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class PageViewReader : public LayoutReader
class CC_STUDIO_DLL PageViewReader : public LayoutReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__ScrollViewReader__
#include "../LayoutReader/LayoutReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class ScrollViewReader : public LayoutReader
class CC_STUDIO_DLL ScrollViewReader : public LayoutReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__SliderReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class SliderReader : public WidgetReader
class CC_STUDIO_DLL SliderReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__TextAtlasReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class TextAtlasReader : public WidgetReader
class CC_STUDIO_DLL TextAtlasReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__TextBMFontReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class TextBMFontReader : public WidgetReader
class CC_STUDIO_DLL TextBMFontReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__TextFieldReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class TextFieldReader : public WidgetReader
class CC_STUDIO_DLL TextFieldReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -26,10 +26,11 @@
#define __TestCpp__TextReader__
#include "../WidgetReader.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class TextReader : public WidgetReader
class CC_STUDIO_DLL TextReader : public WidgetReader
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -29,14 +29,14 @@
#include "cocostudio/CCSGUIReader.h"
#include "ui/GUIDefine.h"
#include "ui/UIWidget.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocostudio
{
class CocoLoader;
struct stExpCocoNode;
class WidgetReader : public cocos2d::Ref, public WidgetReaderProtocol
class CC_STUDIO_DLL WidgetReader : public cocos2d::Ref, public WidgetReaderProtocol
{
public:
DECLARE_CLASS_WIDGET_READER_INFO

View File

@ -27,8 +27,7 @@
#include "cocos2d.h"
#include "cocostudio/DictionaryHelper.h"
#include "cocostudio/CocosStudioExport.h"
namespace cocos2d
{
@ -43,7 +42,7 @@ namespace cocostudio
class CocoLoader;
struct stExpCocoNode;
class WidgetReaderProtocol
class CC_STUDIO_DLL WidgetReaderProtocol
{
public:
virtual ~WidgetReaderProtocol() {};

View File

@ -117,6 +117,7 @@
<ClInclude Include="..\CocoLoader.h" />
<ClInclude Include="..\CocoStudio.h" />
<ClInclude Include="..\DictionaryHelper.h" />
<ClInclude Include="..\CocosStudioExport.h" />
<ClInclude Include="..\TriggerBase.h" />
<ClInclude Include="..\TriggerMng.h" />
<ClInclude Include="..\TriggerObj.h" />
@ -142,7 +143,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
@ -152,7 +153,7 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
@ -189,7 +190,7 @@
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\win32-specific\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRSTUDIODLL;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;COCOS2DXWIN32_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
@ -197,6 +198,8 @@
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libcocos2d.lib;libExtensions.lib;libGUI.lib;libBox2d.lib;libchipmunk.lib;libzlib.lib;libAudio.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -207,7 +210,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;_USRSTUDIODLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\win32-specific\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization>
@ -216,6 +219,8 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libcocos2d.lib;libExtensions.lib;libGUI.lib;libBox2d.lib;libchipmunk.lib;libzlib.lib;libAudio.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -455,5 +455,6 @@
<ClInclude Include="..\ActionTimeline\CCTimelineMacro.h">
<Filter>TimelineAction</Filter>
</ClInclude>
<ClInclude Include="..\CocosStudioExport.h" />
</ItemGroup>
</Project>

View File

@ -118,7 +118,7 @@
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
@ -135,7 +135,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization>

View File

@ -58,7 +58,7 @@ extern "C"
return strerror(errnum);
}
#endif
#endif
//#endif
#include "png.h"
#include "tiffio.h"
#include "base/etc1.h"

View File

@ -128,7 +128,7 @@ static bool _initWithString(const char * text, Device::TextAlign align, const ch
if ([@"!?.,-= " rangeOfString:character].location != NSNotFound) {
lastBreakLocation = i + insertCount;
}
textSize = [lineBreak sizeWithAttributes:tokenAttributesDict];
//textSize = [lineBreak sizeWithAttributes:tokenAttributesDict];
if(textSize.height > info->height)
break;
if (textSize.width > info->width) {

View File

@ -31,10 +31,11 @@
#include "2d/CCNode.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
class ProtectedNode : public Node
class CC_GUI_DLL ProtectedNode : public Node
{
public:
static ProtectedNode * create(void);

View File

@ -49,12 +49,13 @@ THE SOFTWARE.
#include "ui/UIVideoPlayer.h"
#endif
#include "ui/UIDeprecated.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
namespace ui {
const char* CocosGUIVersion();
CC_GUI_DLL const char* CocosGUIVersion();
}
NS_CC_END

28
cocos/ui/GUIExport.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef __CCLIBGUI_H__
#define __CCLIBGUI_H__
#if defined(WIN32) && defined(_WINDOWS)
#ifdef __MINGW32__
#include <string.h>
#endif
#if defined(_USEGUIDLL)
#define CC_GUI_DLL __declspec(dllexport)
#else /* use a DLL library */
#define CC_GUI_DLL __declspec(dllimport)
#endif
/* Define NULL pointer value */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#else
#define CC_GUI_DLL
#endif
#endif /* __CCEXTENSIONEXPORT_H__*/

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UIBUTTON_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -37,7 +38,7 @@ namespace ui{
* @js NA
* @lua NA
*/
class Button : public Widget
class CC_GUI_DLL Button : public Widget
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UICHECKBOX_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -46,7 +47,7 @@ typedef void (Ref::*SEL_SelectedStateEvent)(Ref*,CheckBoxEventType);
* @js NA
* @lua NA
*/
class CheckBox : public Widget
class CC_GUI_DLL CheckBox : public Widget
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,12 +26,13 @@
#define __UIHBox_H__
#include "ui/UILayout.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
namespace ui {
class HBox : public Layout{
class CC_GUI_DLL HBox : public Layout{
public:

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include <string>
#include "base/CCPlatformMacros.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -38,7 +39,7 @@ namespace ui {
* @js NA
* @lua NA
*/
class Helper
class CC_GUI_DLL Helper
{
public:
/**

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UIIMAGEVIEW_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -35,7 +36,7 @@ namespace ui {
* @js NA
* @lua NA
*/
class ImageView : public Widget
class CC_GUI_DLL ImageView : public Widget
{
DECLARE_CLASS_GUI_INFO

View File

@ -948,6 +948,12 @@ Layout::Type Layout::getLayoutType() const
{
return _layoutType;
}
void Layout::forceDoLayout()
{
this->requestDoLayout();
this->doLayout();
}
void Layout::requestDoLayout()
{

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __LAYOUT_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
#include "renderer/CCCustomCommand.h"
#include "renderer/CCGroupCommand.h"
@ -40,7 +41,7 @@ namespace ui {
class LayoutManager;
class LayoutProtocol
class CC_GUI_DLL LayoutProtocol
{
public:
LayoutProtocol(){}
@ -62,7 +63,7 @@ public:
#endif
#endif
class Layout : public Widget, public LayoutProtocol
class CC_GUI_DLL Layout : public Widget, public LayoutProtocol
{
DECLARE_CLASS_GUI_INFO
@ -265,7 +266,14 @@ public:
*/
virtual void removeAllChildrenWithCleanup(bool cleanup) override;
/**
* force refresh widget layout
*/
void forceDoLayout();
/**
* request to refresh widget layout
*/
void requestDoLayout();
virtual void onEnter() override;

View File

@ -27,6 +27,7 @@
#include "base/CCRef.h"
#include "base/CCVector.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -36,7 +37,7 @@ class LayoutProtocol;
class Widget;
class RelativeLayoutParameter;
class LayoutManager : public Ref
class CC_GUI_DLL LayoutManager : public Ref
{
public:
virtual ~LayoutManager(){};
@ -47,7 +48,7 @@ public:
friend class Layout;
};
class LinearVerticalLayoutManager : public LayoutManager
class CC_GUI_DLL LinearVerticalLayoutManager : public LayoutManager
{
private:
LinearVerticalLayoutManager(){};
@ -58,7 +59,7 @@ private:
friend class Layout;
};
class LinearHorizontalLayoutManager : public LayoutManager
class CC_GUI_DLL LinearHorizontalLayoutManager : public LayoutManager
{
private:
LinearHorizontalLayoutManager(){};
@ -69,7 +70,7 @@ private:
friend class Layout;
};
class RelativeLayoutManager : public LayoutManager
class CC_GUI_DLL RelativeLayoutManager : public LayoutManager
{
private:
RelativeLayoutManager()

View File

@ -27,7 +27,7 @@
#include <string>
#include "base/CCRef.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -37,7 +37,7 @@ namespace ui {
* @js NA
* @lua NA
*/
class Margin
class CC_GUI_DLL Margin
{
public:
float left;
@ -69,7 +69,7 @@ public:
#endif
#endif
class LayoutParameter : public Ref
class CC_GUI_DLL LayoutParameter : public Ref
{
public:
enum class Type
@ -146,7 +146,7 @@ public:
* @js NA
* @lua NA
*/
class LinearLayoutParameter : public LayoutParameter
class CC_GUI_DLL LinearLayoutParameter : public LayoutParameter
{
public:
enum class LinearGravity
@ -209,7 +209,7 @@ protected:
*/
class RelativeLayoutParameter : public LayoutParameter
class CC_GUI_DLL RelativeLayoutParameter : public LayoutParameter
{
public:
enum class RelativeAlign

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#define __UILISTVIEW_H__
#include "ui/UIScrollView.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -41,7 +42,7 @@ typedef enum
typedef void (Ref::*SEL_ListViewEvent)(Ref*,ListViewEventType);
#define listvieweventselector(_SELECTOR) (SEL_ListViewEvent)(&_SELECTOR)
class ListView : public ScrollView
class CC_GUI_DLL ListView : public ScrollView
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UILOADINGBAR_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -35,7 +36,7 @@ namespace ui {
* @js NA
* @lua NA
*/
class LoadingBar : public Widget
class CC_GUI_DLL LoadingBar : public Widget
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UIPAGEVIEW_H__
#include "ui/UILayout.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -39,7 +40,7 @@ typedef enum
typedef void (Ref::*SEL_PageViewEvent)(Ref*, PageViewEventType);
#define pagevieweventselector(_SELECTOR)(SEL_PageViewEvent)(&_SELECTOR)
class PageView : public Layout
class CC_GUI_DLL PageView : public Layout
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,12 +26,13 @@
#define __UIRelativeBox_H__
#include "ui/UILayout.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
namespace ui {
class RelativeBox : public Layout{
class CC_GUI_DLL RelativeBox : public Layout{
public:

View File

@ -26,12 +26,13 @@
#define __UIRICHTEXT_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
namespace ui {
class RichElement : public Ref
class CC_GUI_DLL RichElement : public Ref
{
public:
enum class Type
@ -51,7 +52,7 @@ protected:
friend class RichText;
};
class RichElementText : public RichElement
class CC_GUI_DLL RichElementText : public RichElement
{
public:
RichElementText(){_type = Type::TEXT;};
@ -66,7 +67,7 @@ protected:
};
class RichElementImage : public RichElement
class CC_GUI_DLL RichElementImage : public RichElement
{
public:
RichElementImage(){_type = Type::IMAGE;};
@ -80,7 +81,7 @@ protected:
friend class RichText;
};
class RichElementCustomNode : public RichElement
class CC_GUI_DLL RichElementCustomNode : public RichElement
{
public:
RichElementCustomNode(){_type = Type::CUSTOM;};
@ -92,7 +93,7 @@ protected:
friend class RichText;
};
class RichText : public Widget
class CC_GUI_DLL RichText : public Widget
{
public:
RichText();

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UISCROLLVIEW_H__
#include "ui/UILayout.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -50,7 +51,7 @@ typedef void (Ref::*SEL_ScrollViewEvent)(Ref*, ScrollviewEventType);
#define scrollvieweventselector(_SELECTOR) (SEL_ScrollViewEvent)(&_SELECTOR)
class ScrollView : public Layout
class CC_GUI_DLL ScrollView : public Layout
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UISLIDER_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -45,7 +46,7 @@ typedef void (Ref::*SEL_SlidPercentChangedEvent)(Ref*,SliderEventType);
* @js NA
* @lua NA
*/
class Slider : public Widget
class CC_GUI_DLL Slider : public Widget
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UILABEL_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -38,7 +39,7 @@ namespace ui {
*@js
*@lua NA
*/
class Text : public Widget
class CC_GUI_DLL Text : public Widget
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UILABELATLAS_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -37,7 +38,7 @@ namespace ui {
* @js NA
* @lua NA
*/
class TextAtlas : public Widget
class CC_GUI_DLL TextAtlas : public Widget
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,6 +26,7 @@ THE SOFTWARE.
#define __UILABELBMFONT_H__
#include "ui/UIWidget.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -37,7 +38,7 @@ namespace ui {
* @js NA
* @lua NA
*/
class TextBMFont : public Widget
class CC_GUI_DLL TextBMFont : public Widget
{
DECLARE_CLASS_GUI_INFO

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include "ui/UIWidget.h"
#include "2d/CCTextFieldTTF.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
@ -36,7 +37,7 @@ namespace ui {
* @js NA
* @lua NA
*/
class UICCTextField: public TextFieldTTF, public TextFieldDelegate
class CC_GUI_DLL UICCTextField: public TextFieldTTF, public TextFieldDelegate
{
public:
UICCTextField();
@ -106,7 +107,7 @@ typedef void (Ref::*SEL_TextFieldEvent)(Ref*, TextFiledEventType);
* @js NA
* @lua NA
*/
class TextField : public Widget
class CC_GUI_DLL TextField : public Widget
{
DECLARE_CLASS_GUI_INFO

View File

@ -26,12 +26,13 @@
#define __UIVBox_H__
#include "ui/UILayout.h"
#include "ui/GUIExport.h"
NS_CC_BEGIN
namespace ui {
class VBox : public Layout{
class CC_GUI_DLL VBox : public Layout{
public:

Some files were not shown because too many files have changed in this diff Show More