fix win32 & win8 compile error

This commit is contained in:
andyque 2014-07-09 16:38:26 +08:00
parent eec40ff2a8
commit f76f71eb5d
6 changed files with 41 additions and 2 deletions

View File

@ -103,7 +103,14 @@ namespace cocostudio
std::string fontName = DICTOOL->getStringValue_json(options, P_FontName, "微软雅黑");
std::string fontFilePath = jsonPath.append(fontName);
label->setFontName(fontFilePath);
if (FileUtils::getInstance()->isFileExist(fontFilePath))
{
label->setFontName(fontFilePath);
}
else{
label->setFontName(fontName);
}
bool aw = DICTOOL->checkObjectExist_json(options, P_AreaWidth);
bool ah = DICTOOL->checkObjectExist_json(options, P_AreaHeight);

View File

@ -54,7 +54,7 @@ bool AppDelegate::applicationDidFinishLaunching()
auto director = Director::getInstance();
auto glview = director->getOpenGLView();
if(!glview) {
glview = GLView::createWithRect("Cpp Tests",Rect(100,100,960,640));
glview = GLView::create("Cpp Tests");
director->setOpenGLView(glview);
}

View File

@ -187,6 +187,8 @@
<ClCompile Include="..\Classes\TileMapTest\TileMapTest2.cpp" />
<ClCompile Include="..\Classes\UITest\CocoStudioGUITest\CocosGUIScene.cpp" />
<ClCompile Include="..\Classes\UITest\CocoStudioGUITest\CocoStudioGUITest.cpp" />
<ClCompile Include="..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest.cpp" />
<ClCompile Include="..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest\CocostudioParserJsonTest.cpp" />
<ClCompile Include="..\Classes\UITest\CocoStudioGUITest\CustomGUIScene.cpp" />
<ClCompile Include="..\Classes\UITest\CocoStudioGUITest\CustomTest\CustomImageTest\CustomImageTest.cpp" />
<ClCompile Include="..\Classes\UITest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest\CustomParticleWidgetTest.cpp" />
@ -370,6 +372,8 @@
<ClInclude Include="..\Classes\TileMapTest\TileMapTest2.h" />
<ClInclude Include="..\Classes\UITest\CocoStudioGUITest\CocosGUIScene.h" />
<ClInclude Include="..\Classes\UITest\CocoStudioGUITest\CocoStudioGUITest.h" />
<ClInclude Include="..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest.h" />
<ClInclude Include="..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest\CocostudioParserJsonTest.h" />
<ClInclude Include="..\Classes\UITest\CocoStudioGUITest\CustomGUIScene.h" />
<ClInclude Include="..\Classes\UITest\CocoStudioGUITest\CustomTest\CustomImageTest\CustomImageTest.h" />
<ClInclude Include="..\Classes\UITest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest\CustomParticleWidgetTest.h" />

View File

@ -849,6 +849,12 @@
<ClCompile Include="..\Classes\TileMapTest\TileMapTest2.cpp">
<Filter>Classes\TileMapTest</Filter>
</ClCompile>
<ClCompile Include="..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest\CocostudioParserJsonTest.cpp">
<Filter>Classes\UITest\CocostudioGUISceneTest</Filter>
</ClCompile>
<ClCompile Include="..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest.cpp">
<Filter>Classes\UITest\CocostudioGUISceneTest</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="main.h">
@ -1568,5 +1574,11 @@
<ClInclude Include="..\Classes\TileMapTest\TileMapTest2.h">
<Filter>Classes\TileMapTest</Filter>
</ClInclude>
<ClInclude Include="..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest\CocostudioParserJsonTest.h">
<Filter>Classes\UITest\CocostudioGUISceneTest</Filter>
</ClInclude>
<ClInclude Include="..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest.h">
<Filter>Classes\UITest\CocostudioGUISceneTest</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -233,6 +233,8 @@
<ClCompile Include="..\..\Classes\TileMapTest\TileMapTest2.cpp" />
<ClCompile Include="..\..\Classes\UITest\CocoStudioGUITest\CocosGUIScene.cpp" />
<ClCompile Include="..\..\Classes\UITest\CocoStudioGUITest\CocoStudioGUITest.cpp" />
<ClCompile Include="..\..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest.cpp" />
<ClCompile Include="..\..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest\CocostudioParserJsonTest.cpp" />
<ClCompile Include="..\..\Classes\UITest\CocoStudioGUITest\CustomGUIScene.cpp" />
<ClCompile Include="..\..\Classes\UITest\CocoStudioGUITest\CustomTest\CustomImageTest\CustomImageTest.cpp" />
<ClCompile Include="..\..\Classes\UITest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest\CustomParticleWidgetTest.cpp" />
@ -431,6 +433,8 @@
<ClInclude Include="..\..\Classes\TileMapTest\TileMapTest2.h" />
<ClInclude Include="..\..\Classes\UITest\CocoStudioGUITest\CocosGUIScene.h" />
<ClInclude Include="..\..\Classes\UITest\CocoStudioGUITest\CocoStudioGUITest.h" />
<ClInclude Include="..\..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest.h" />
<ClInclude Include="..\..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest\CocostudioParserJsonTest.h" />
<ClInclude Include="..\..\Classes\UITest\CocoStudioGUITest\CustomGUIScene.h" />
<ClInclude Include="..\..\Classes\UITest\CocoStudioGUITest\CustomTest\CustomImageTest\CustomImageTest.h" />
<ClInclude Include="..\..\Classes\UITest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest\CustomParticleWidgetTest.h" />

View File

@ -849,6 +849,12 @@
<ClCompile Include="..\..\Classes\TileMapTest\TileMapTest2.cpp">
<Filter>Classes\TileMapTest</Filter>
</ClCompile>
<ClCompile Include="..\..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest\CocostudioParserJsonTest.cpp">
<Filter>Classes\UITest\CocosStudioGUITest</Filter>
</ClCompile>
<ClCompile Include="..\..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest.cpp">
<Filter>Classes\UITest\CocosStudioGUITest</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Classes\AppDelegate.h">
@ -1572,6 +1578,12 @@
<ClInclude Include="..\..\Classes\TileMapTest\TileMapTest2.h">
<Filter>Classes\TileMapTest</Filter>
</ClInclude>
<ClInclude Include="..\..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest\CocostudioParserJsonTest.h">
<Filter>Classes\UITest\CocosStudioGUITest</Filter>
</ClInclude>
<ClInclude Include="..\..\Classes\UITest\CocoStudioGUITest\CocostudioParserTest.h">
<Filter>Classes\UITest\CocosStudioGUITest</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\..\external\curl\prebuilt\wp8\arm\libcurl.dll" />