Merge pull request #329 from minggo/master

Fix some bug
This commit is contained in:
minggo 2011-06-27 18:23:26 -07:00
commit e8853583df
4 changed files with 16 additions and 1 deletions

View File

@ -22,6 +22,11 @@ public class Cocos2dxBitmap{
public static void createTextBitmap(String content, String fontName,
int fontSize, int alignment){
// avoid error when content is ""
if (content.compareTo("") == 0){
content = " ";
}
Paint paint = newPaint(fontName, fontSize, alignment);
TextProperty textProperty = getTextWidthAndHeight(content, paint);

View File

@ -22,6 +22,11 @@ public class Cocos2dxBitmap{
public static void createTextBitmap(String content, String fontName,
int fontSize, int alignment){
// avoid error when content is ""
if (content.compareTo("") == 0){
content = " ";
}
Paint paint = newPaint(fontName, fontSize, alignment);
TextProperty textProperty = getTextWidthAndHeight(content, paint);

View File

@ -22,6 +22,11 @@ public class Cocos2dxBitmap{
public static void createTextBitmap(String content, String fontName,
int fontSize, int alignment){
// avoid error when content is ""
if (content.compareTo("") == 0){
content = " ";
}
Paint paint = newPaint(fontName, fontSize, alignment);
TextProperty textProperty = getTextWidthAndHeight(content, paint);

View File

@ -72,7 +72,7 @@ Parallax1::Parallax1()
std::string Parallax1::title()
{
return "MotionStreak test (tap screen)";
return "Parallax: parent and 3 children";
}
//------------------------------------------------------------------