From 76ebeb0676dd10f1fe0024d61dba99a39f532782 Mon Sep 17 00:00:00 2001 From: carlo morgantini Date: Fri, 26 Jul 2013 10:29:29 -0700 Subject: [PATCH] some more clean up for CCLabel --- cocos2dx/label_nodes/CCLabel.h | 7 +++++++ samples/Cpp/TestCpp/Classes/LabelTest/LabelTest.cpp | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/cocos2dx/label_nodes/CCLabel.h b/cocos2dx/label_nodes/CCLabel.h index 50adf8063e..1cafab5191 100644 --- a/cocos2dx/label_nodes/CCLabel.h +++ b/cocos2dx/label_nodes/CCLabel.h @@ -47,6 +47,13 @@ public: virtual ~Label(); Label(); + virtual void setAlignment(TextAlignment alignment) = 0; + virtual void setWidth(float width) = 0; + virtual void setLineBreakWithoutSpace(bool breakWithoutSpace) = 0; + virtual void setScale(float scale) = 0; + virtual void setScaleX(float scaleX) = 0; + virtual void setScaleY(float scaleY) = 0; + // needs to go - TEST STUFF ///////////////////////////////////////////////////////////////////////// static Label* createWithBMFontOLD( const char* label, const char* bmfontFilePath, int lineSize = 0); diff --git a/samples/Cpp/TestCpp/Classes/LabelTest/LabelTest.cpp b/samples/Cpp/TestCpp/Classes/LabelTest/LabelTest.cpp index 3db1ea9fa7..9a6f966938 100644 --- a/samples/Cpp/TestCpp/Classes/LabelTest/LabelTest.cpp +++ b/samples/Cpp/TestCpp/Classes/LabelTest/LabelTest.cpp @@ -40,7 +40,7 @@ Layer* restartAtlasAction(); static int sceneIdx = -1; -#define MAX_LAYER 32 +#define MAX_LAYER 31 Layer* createAtlasLayer(int nIndex) { @@ -77,9 +77,9 @@ Layer* createAtlasLayer(int nIndex) case 26: return new LabelBMFontBounds(); case 27: return new TTFFontShadowAndStroke(); case 28: return new LabelBMFontNewTest(); - case 29: return new NewLabelBMFontTestOld(); - case 30: return new NewLabelBMFontTest(); - case 31: return new NewLabelTTFTest(); + //case 29: return new NewLabelBMFontTestOld(); + case 29: return new NewLabelBMFontTest(); + case 30: return new NewLabelTTFTest(); } return NULL;