mirror of https://github.com/axmolengine/axmol.git
fixed warn.
This commit is contained in:
parent
72811d8869
commit
51f3833a7e
|
@ -1253,13 +1253,13 @@ void BitmapFontMultiLineAlignment::stringChanged(cocos2d::Ref *sender)
|
||||||
switch(item->getTag())
|
switch(item->getTag())
|
||||||
{
|
{
|
||||||
case LongSentences:
|
case LongSentences:
|
||||||
static_cast<LabelBMFont*>(_labelShouldRetain)->setString(LongSentencesExample);
|
_labelShouldRetain->setString(LongSentencesExample);
|
||||||
break;
|
break;
|
||||||
case LineBreaks:
|
case LineBreaks:
|
||||||
static_cast<LabelBMFont*>(_labelShouldRetain)->setString(LineBreaksExample);
|
_labelShouldRetain->setString(LineBreaksExample);
|
||||||
break;
|
break;
|
||||||
case Mixed:
|
case Mixed:
|
||||||
static_cast<LabelBMFont*>(_labelShouldRetain)->setString(MixedExample);
|
_labelShouldRetain->setString(MixedExample);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1279,13 +1279,13 @@ void BitmapFontMultiLineAlignment::alignmentChanged(cocos2d::Ref *sender)
|
||||||
switch(item->getTag())
|
switch(item->getTag())
|
||||||
{
|
{
|
||||||
case LeftAlign:
|
case LeftAlign:
|
||||||
static_cast<LabelBMFont*>(_labelShouldRetain)->setAlignment(TextHAlignment::LEFT);
|
_labelShouldRetain->setAlignment(TextHAlignment::LEFT);
|
||||||
break;
|
break;
|
||||||
case CenterAlign:
|
case CenterAlign:
|
||||||
static_cast<LabelBMFont*>(_labelShouldRetain)->setAlignment(TextHAlignment::CENTER);
|
_labelShouldRetain->setAlignment(TextHAlignment::CENTER);
|
||||||
break;
|
break;
|
||||||
case RightAlign:
|
case RightAlign:
|
||||||
static_cast<LabelBMFont*>(_labelShouldRetain)->setAlignment(TextHAlignment::RIGHT);
|
_labelShouldRetain->setAlignment(TextHAlignment::RIGHT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
#include "../testBasic.h"
|
#include "../testBasic.h"
|
||||||
#include "../BaseTest.h"
|
#include "../BaseTest.h"
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#elif _MSC_VER >= 1400 //vs 2005 or higher
|
||||||
|
#pragma warning (push)
|
||||||
|
#pragma warning (disable: 4996)
|
||||||
|
#endif
|
||||||
|
|
||||||
class AtlasDemo : public BaseTest
|
class AtlasDemo : public BaseTest
|
||||||
{
|
{
|
||||||
|
@ -236,7 +242,7 @@ private:
|
||||||
const char* getCurrentAlignment();
|
const char* getCurrentAlignment();
|
||||||
private:
|
private:
|
||||||
TextHAlignment _horizAlign;
|
TextHAlignment _horizAlign;
|
||||||
Node* _label;
|
LabelTTF* _label;
|
||||||
TextVAlignment _vertAlign;
|
TextVAlignment _vertAlign;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -285,7 +291,7 @@ public:
|
||||||
void onTouchesMoved(const std::vector<Touch*>& touches, Event *event);
|
void onTouchesMoved(const std::vector<Touch*>& touches, Event *event);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Node *_labelShouldRetain;
|
LabelBMFont *_labelShouldRetain;
|
||||||
Sprite *_arrowsBarShouldRetain;
|
Sprite *_arrowsBarShouldRetain;
|
||||||
Sprite *_arrowsShouldRetain;
|
Sprite *_arrowsShouldRetain;
|
||||||
MenuItemFont *_lastSentenceItem, *_lastAlignmentItem;
|
MenuItemFont *_lastSentenceItem, *_lastAlignmentItem;
|
||||||
|
@ -383,7 +389,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void onDraw(const kmMat4 &transform, bool transformUpdated);
|
void onDraw(const kmMat4 &transform, bool transformUpdated);
|
||||||
private:
|
private:
|
||||||
Node *label1;
|
LabelBMFont *label1;
|
||||||
CustomCommand _customCommand;
|
CustomCommand _customCommand;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -445,6 +451,11 @@ public:
|
||||||
virtual std::string subtitle() const override;
|
virtual std::string subtitle() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
||||||
|
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
|
||||||
|
#elif _MSC_VER >= 1400 //vs 2005 or higher
|
||||||
|
#pragma warning (pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
// we don't support linebreak mode
|
// we don't support linebreak mode
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue