From 0c687c3aaca31d602fcef65cd75009fa078d7265 Mon Sep 17 00:00:00 2001 From: Walzer Date: Wed, 17 Nov 2010 07:24:50 +0000 Subject: [PATCH] jump a messagebox when load image failed in uphone. --- cocos2dx/platform/uphone/CCXUIImage_uphone.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cocos2dx/platform/uphone/CCXUIImage_uphone.cpp b/cocos2dx/platform/uphone/CCXUIImage_uphone.cpp index e28148b5b9..21d358f064 100644 --- a/cocos2dx/platform/uphone/CCXUIImage_uphone.cpp +++ b/cocos2dx/platform/uphone/CCXUIImage_uphone.cpp @@ -146,6 +146,16 @@ bool UIImage::initWithContentsOfFile(const string &strPath, tImageFormat imageTy } } + if (!bRet) + { + std::string strErr = "Load "; + strErr += strPath; + strErr += " failed!"; + TUChar szText[256] = { 0 }; + TUString::StrUtf8ToStrUnicode(szText,(Char*)strErr.c_str()); + TApplication::GetCurrentApplication()->MessageBox(szText,NULL,WMB_OK); + } + return bRet; }