mirror of https://github.com/axmolengine/axmol.git
issue #2129:use capital words for static const member variables
This commit is contained in:
parent
cf96ec079e
commit
87125e4b2a
|
@ -87,7 +87,7 @@ bool AtlasNode::initWithTexture(Texture2D* texture, unsigned int tileWidth, unsi
|
|||
_itemWidth = tileWidth;
|
||||
_itemHeight = tileHeight;
|
||||
|
||||
_colorUnmodified = Color3B::white;
|
||||
_colorUnmodified = Color3B::WHITE;
|
||||
_isOpacityModifyRGB = true;
|
||||
|
||||
_blendFunc.src = CC_BLEND_SRC;
|
||||
|
|
|
@ -1349,8 +1349,8 @@ void Node::removeAllComponents()
|
|||
NodeRGBA::NodeRGBA()
|
||||
: _displayedOpacity(255)
|
||||
, _realOpacity(255)
|
||||
, _displayedColor(Color3B::white)
|
||||
, _realColor(Color3B::white)
|
||||
, _displayedColor(Color3B::WHITE)
|
||||
, _realColor(Color3B::WHITE)
|
||||
, _cascadeColorEnabled(false)
|
||||
, _cascadeOpacityEnabled(false)
|
||||
{}
|
||||
|
@ -1362,7 +1362,7 @@ bool NodeRGBA::init()
|
|||
if (Node::init())
|
||||
{
|
||||
_displayedOpacity = _realOpacity = 255;
|
||||
_displayedColor = _realColor = Color3B::white;
|
||||
_displayedColor = _realColor = Color3B::WHITE;
|
||||
_cascadeOpacityEnabled = _cascadeColorEnabled = false;
|
||||
return true;
|
||||
}
|
||||
|
@ -1439,7 +1439,7 @@ void NodeRGBA::setColor(const Color3B& color)
|
|||
|
||||
if (_cascadeColorEnabled)
|
||||
{
|
||||
Color3B parentColor = Color3B::white;
|
||||
Color3B parentColor = Color3B::WHITE;
|
||||
RGBAProtocol *parent = dynamic_cast<RGBAProtocol*>(_parent);
|
||||
if (parent && parent->isCascadeColorEnabled())
|
||||
{
|
||||
|
|
|
@ -26,15 +26,15 @@
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
const Color3B Color3B::white(255,255,255);
|
||||
const Color3B Color3B::yellow(255,255,0);
|
||||
const Color3B Color3B::green(0,255,0);
|
||||
const Color3B Color3B::blue(0,0,255);
|
||||
const Color3B Color3B::red(255,0,0);
|
||||
const Color3B Color3B::magenta(255,0,255);
|
||||
const Color3B Color3B::black(0,0,0);
|
||||
const Color3B Color3B::orange(255,127,0);
|
||||
const Color3B Color3B::gray(166,166,166);
|
||||
const Color3B Color3B::WHITE(255,255,255);
|
||||
const Color3B Color3B::YELLOW(255,255,0);
|
||||
const Color3B Color3B::GREEN(0,255,0);
|
||||
const Color3B Color3B::BLUE(0,0,255);
|
||||
const Color3B Color3B::RED(255,0,0);
|
||||
const Color3B Color3B::MAGENTA(255,0,255);
|
||||
const Color3B Color3B::BLACK(0,0,0);
|
||||
const Color3B Color3B::ORANGE(255,127,0);
|
||||
const Color3B Color3B::GRAY(166,166,166);
|
||||
|
||||
Color4B::Color4B(const Color4F &color4F)
|
||||
: r((GLubyte)(color4F.r * 255.0f)),
|
||||
|
@ -43,6 +43,6 @@ Color4B::Color4B(const Color4F &color4F)
|
|||
a((GLubyte)(color4F.a * 255.0f))
|
||||
{}
|
||||
|
||||
const BlendFunc BlendFunc::blendFuncDisable = {GL_ONE, GL_ZERO};
|
||||
const BlendFunc BlendFunc::BLEND_FUNC_DISABLE = {GL_ONE, GL_ZERO};
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -58,15 +58,15 @@ struct Color3B
|
|||
GLubyte g;
|
||||
GLubyte b;
|
||||
|
||||
const static Color3B white;
|
||||
const static Color3B yellow;
|
||||
const static Color3B blue;
|
||||
const static Color3B green;
|
||||
const static Color3B red;
|
||||
const static Color3B magenta;
|
||||
const static Color3B black;
|
||||
const static Color3B orange;
|
||||
const static Color3B gray;
|
||||
const static Color3B WHITE;
|
||||
const static Color3B YELLOW;
|
||||
const static Color3B BLUE;
|
||||
const static Color3B GREEN;
|
||||
const static Color3B RED;
|
||||
const static Color3B MAGENTA;
|
||||
const static Color3B BLACK;
|
||||
const static Color3B ORANGE;
|
||||
const static Color3B GRAY;
|
||||
};
|
||||
|
||||
struct Color4F;
|
||||
|
@ -301,7 +301,7 @@ struct BlendFunc
|
|||
//! destination blend function
|
||||
GLenum dst;
|
||||
|
||||
const static BlendFunc blendFuncDisable;
|
||||
const static BlendFunc BLEND_FUNC_DISABLE;
|
||||
};
|
||||
|
||||
// XXX: If any of these enums are edited and/or reordered, update Texture2D.m
|
||||
|
@ -393,7 +393,7 @@ public:
|
|||
|
||||
FontDefinition(): _alignment(kTextAlignmentCenter),
|
||||
_vertAlignment(kVerticalTextAlignmentTop),
|
||||
_fontFillColor(Color3B::white)
|
||||
_fontFillColor(Color3B::WHITE)
|
||||
{ _dimensions = CCSizeMake(0,0); }
|
||||
|
||||
// font name
|
||||
|
|
|
@ -507,7 +507,7 @@ bool LabelBMFont::initWithString(const char *theString, const char *fntFile, flo
|
|||
_alignment = alignment;
|
||||
|
||||
_displayedOpacity = _realOpacity = 255;
|
||||
_displayedColor = _realColor = Color3B::white;
|
||||
_displayedColor = _realColor = Color3B::WHITE;
|
||||
_cascadeOpacityEnabled = true;
|
||||
_cascadeColorEnabled = true;
|
||||
|
||||
|
@ -540,8 +540,8 @@ LabelBMFont::LabelBMFont()
|
|||
, _reusedChar(NULL)
|
||||
, _displayedOpacity(255)
|
||||
, _realOpacity(255)
|
||||
, _displayedColor(Color3B::white)
|
||||
, _realColor(Color3B::white)
|
||||
, _displayedColor(Color3B::WHITE)
|
||||
, _realColor(Color3B::WHITE)
|
||||
, _cascadeColorEnabled(true)
|
||||
, _cascadeOpacityEnabled(true)
|
||||
, _isOpacityModifyRGB(false)
|
||||
|
@ -803,7 +803,7 @@ void LabelBMFont::setColor(const Color3B& color)
|
|||
_displayedColor = _realColor = color;
|
||||
|
||||
if( _cascadeColorEnabled ) {
|
||||
Color3B parentColor = Color3B::white;
|
||||
Color3B parentColor = Color3B::WHITE;
|
||||
RGBAProtocol* pParent = dynamic_cast<RGBAProtocol*>(_parent);
|
||||
if (pParent && pParent->isCascadeColorEnabled())
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ LabelTTF::LabelTTF()
|
|||
, _string("")
|
||||
, _shadowEnabled(false)
|
||||
, _strokeEnabled(false)
|
||||
, _textFillColor(Color3B::white)
|
||||
, _textFillColor(Color3B::WHITE)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -557,8 +557,8 @@ void Layer::ccTouchesCancelled(Set *pTouches, Event *pEvent)
|
|||
LayerRGBA::LayerRGBA()
|
||||
: _displayedOpacity(255)
|
||||
, _realOpacity (255)
|
||||
, _displayedColor(Color3B::white)
|
||||
, _realColor(Color3B::white)
|
||||
, _displayedColor(Color3B::WHITE)
|
||||
, _realColor(Color3B::WHITE)
|
||||
, _cascadeOpacityEnabled(false)
|
||||
, _cascadeColorEnabled(false)
|
||||
{}
|
||||
|
@ -570,7 +570,7 @@ bool LayerRGBA::init()
|
|||
if (Layer::init())
|
||||
{
|
||||
_displayedOpacity = _realOpacity = 255;
|
||||
_displayedColor = _realColor = Color3B::white;
|
||||
_displayedColor = _realColor = Color3B::WHITE;
|
||||
setCascadeOpacityEnabled(false);
|
||||
setCascadeColorEnabled(false);
|
||||
|
||||
|
@ -625,7 +625,7 @@ void LayerRGBA::setColor(const Color3B& color)
|
|||
|
||||
if (_cascadeColorEnabled)
|
||||
{
|
||||
Color3B parentColor = Color3B::white;
|
||||
Color3B parentColor = Color3B::WHITE;
|
||||
RGBAProtocol* parent = dynamic_cast<RGBAProtocol*>(_parent);
|
||||
if (parent && parent->isCascadeColorEnabled())
|
||||
{
|
||||
|
|
|
@ -1189,7 +1189,7 @@ TransitionFade * TransitionFade::create(float duration, Scene *scene, const Colo
|
|||
|
||||
TransitionFade* TransitionFade::create(float duration,Scene* scene)
|
||||
{
|
||||
return TransitionFade::create(duration, scene, Color3B::black);
|
||||
return TransitionFade::create(duration, scene, Color3B::BLACK);
|
||||
}
|
||||
|
||||
bool TransitionFade::initWithDuration(float duration, Scene *scene, const Color3B& color)
|
||||
|
@ -1206,7 +1206,7 @@ bool TransitionFade::initWithDuration(float duration, Scene *scene, const Color3
|
|||
|
||||
bool TransitionFade::initWithDuration(float t, Scene *scene)
|
||||
{
|
||||
this->initWithDuration(t, scene, Color3B::black);
|
||||
this->initWithDuration(t, scene, Color3B::BLACK);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ bool MenuItemLabel::initWithLabel(Node* label, const ccMenuCallback& callback)
|
|||
{
|
||||
MenuItem::initWithCallback(callback);
|
||||
_originalScale = 1.0f;
|
||||
_colorBackup = Color3B::white;
|
||||
_colorBackup = Color3B::WHITE;
|
||||
setDisabledColor(Color3B(126,126,126));
|
||||
this->setLabel(label);
|
||||
|
||||
|
|
|
@ -455,7 +455,7 @@ bool Texture2D::initWithString(const char *text, const char *fontName, float fon
|
|||
tempDef._dimensions = dimensions;
|
||||
tempDef._alignment = hAlignment;
|
||||
tempDef._vertAlignment = vAlignment;
|
||||
tempDef._fontFillColor = Color3B::white;
|
||||
tempDef._fontFillColor = Color3B::WHITE;
|
||||
|
||||
return initWithString(text, tempDef);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ enum
|
|||
|
||||
ControlButton::ControlButton()
|
||||
: _currentTitle(NULL)
|
||||
, _currentTitleColor(Color3B::white)
|
||||
, _currentTitleColor(Color3B::WHITE)
|
||||
, _doesAdjustBackgroundImage(false)
|
||||
, _titleLabel(NULL)
|
||||
, _backgroundSprite(NULL)
|
||||
|
@ -323,7 +323,7 @@ void ControlButton::setTitleForState(String* title, ControlState state)
|
|||
|
||||
const Color3B ControlButton::getTitleColorForState(ControlState state)
|
||||
{
|
||||
Color3B returnColor = Color3B::white;
|
||||
Color3B returnColor = Color3B::WHITE;
|
||||
do
|
||||
{
|
||||
CC_BREAK_IF(NULL == _titleColorDispatchTable);
|
||||
|
|
|
@ -231,7 +231,7 @@ float ControlPotentiometer::angleInDegreesBetweenLineFromPoint_toPoint_toLineFro
|
|||
void ControlPotentiometer::potentiometerBegan(Point location)
|
||||
{
|
||||
setSelected(true);
|
||||
getThumbSprite()->setColor(Color3B::gray);
|
||||
getThumbSprite()->setColor(Color3B::GRAY);
|
||||
}
|
||||
|
||||
void ControlPotentiometer::potentiometerMoved(Point location)
|
||||
|
@ -259,7 +259,7 @@ void ControlPotentiometer::potentiometerMoved(Point location)
|
|||
|
||||
void ControlPotentiometer::potentiometerEnded(Point location)
|
||||
{
|
||||
getThumbSprite()->setColor(Color3B::white);
|
||||
getThumbSprite()->setColor(Color3B::WHITE);
|
||||
setSelected(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ void ControlSlider::needsLayout()
|
|||
void ControlSlider::sliderBegan(Point location)
|
||||
{
|
||||
this->setSelected(true);
|
||||
this->getThumbSprite()->setColor(Color3B::gray);
|
||||
this->getThumbSprite()->setColor(Color3B::GRAY);
|
||||
setValue(valueForLocation(location));
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ void ControlSlider::sliderEnded(Point location)
|
|||
{
|
||||
setValue(valueForLocation(_thumbSprite->getPosition()));
|
||||
}
|
||||
this->getThumbSprite()->setColor(Color3B::white);
|
||||
this->getThumbSprite()->setColor(Color3B::WHITE);
|
||||
this->setSelected(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -255,21 +255,21 @@ void ControlStepper::updateLayoutUsingTouchLocation(Point location)
|
|||
{
|
||||
_touchedPart = kControlStepperPartMinus;
|
||||
|
||||
_minusSprite->setColor(Color3B::gray);
|
||||
_plusSprite->setColor(Color3B::white);
|
||||
_minusSprite->setColor(Color3B::GRAY);
|
||||
_plusSprite->setColor(Color3B::WHITE);
|
||||
} else if (location.x >= _minusSprite->getContentSize().width
|
||||
&& _value < _maximumValue)
|
||||
{
|
||||
_touchedPart = kControlStepperPartPlus;
|
||||
|
||||
_minusSprite->setColor(Color3B::white);
|
||||
_plusSprite->setColor(Color3B::gray);
|
||||
_minusSprite->setColor(Color3B::WHITE);
|
||||
_plusSprite->setColor(Color3B::GRAY);
|
||||
} else
|
||||
{
|
||||
_touchedPart = kControlStepperPartNone;
|
||||
|
||||
_minusSprite->setColor(Color3B::white);
|
||||
_plusSprite->setColor(Color3B::white);
|
||||
_minusSprite->setColor(Color3B::WHITE);
|
||||
_plusSprite->setColor(Color3B::WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,8 +316,8 @@ void ControlStepper::ccTouchMoved(Touch *pTouch, Event *pEvent)
|
|||
|
||||
_touchedPart = kControlStepperPartNone;
|
||||
|
||||
_minusSprite->setColor(Color3B::white);
|
||||
_plusSprite->setColor(Color3B::white);
|
||||
_minusSprite->setColor(Color3B::WHITE);
|
||||
_plusSprite->setColor(Color3B::WHITE);
|
||||
|
||||
if (_autorepeat)
|
||||
{
|
||||
|
@ -328,8 +328,8 @@ void ControlStepper::ccTouchMoved(Touch *pTouch, Event *pEvent)
|
|||
|
||||
void ControlStepper::ccTouchEnded(Touch *pTouch, Event *pEvent)
|
||||
{
|
||||
_minusSprite->setColor(Color3B::white);
|
||||
_plusSprite->setColor(Color3B::white);
|
||||
_minusSprite->setColor(Color3B::WHITE);
|
||||
_plusSprite->setColor(Color3B::WHITE);
|
||||
|
||||
if (_autorepeat)
|
||||
{
|
||||
|
|
|
@ -400,7 +400,7 @@ bool ControlSwitch::ccTouchBegan(Touch *pTouch, Event *pEvent)
|
|||
|
||||
_initialTouchXPosition = location.x - _switchSprite->getSliderXPosition();
|
||||
|
||||
_switchSprite->getThumbSprite()->setColor(Color3B::gray);
|
||||
_switchSprite->getThumbSprite()->setColor(Color3B::GRAY);
|
||||
_switchSprite->needsLayout();
|
||||
|
||||
return true;
|
||||
|
@ -420,7 +420,7 @@ void ControlSwitch::ccTouchEnded(Touch *pTouch, Event *pEvent)
|
|||
{
|
||||
Point location = this->locationFromTouch(pTouch);
|
||||
|
||||
_switchSprite->getThumbSprite()->setColor(Color3B::white);
|
||||
_switchSprite->getThumbSprite()->setColor(Color3B::WHITE);
|
||||
|
||||
if (hasMoved())
|
||||
{
|
||||
|
@ -436,7 +436,7 @@ void ControlSwitch::ccTouchCancelled(Touch *pTouch, Event *pEvent)
|
|||
{
|
||||
Point location = this->locationFromTouch(pTouch);
|
||||
|
||||
_switchSprite->getThumbSprite()->setColor(Color3B::white);
|
||||
_switchSprite->getThumbSprite()->setColor(Color3B::WHITE);
|
||||
|
||||
if (hasMoved())
|
||||
{
|
||||
|
|
|
@ -62,7 +62,7 @@ Scale9Sprite::Scale9Sprite()
|
|||
, _bottomRight(NULL)
|
||||
, _opacityModifyRGB(false)
|
||||
, _opacity(255)
|
||||
, _color(Color3B::white)
|
||||
, _color(Color3B::WHITE)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@ EditBox::EditBox(void)
|
|||
, _keyboardReturnType(kKeyboardReturnTypeDefault)
|
||||
, _fontSize(-1)
|
||||
, _placeholderFontSize(-1)
|
||||
, _colText(Color3B::white)
|
||||
, _colPlaceHolder(Color3B::gray)
|
||||
, _colText(Color3B::WHITE)
|
||||
, _colPlaceHolder(Color3B::GRAY)
|
||||
, _maxLength(0)
|
||||
, _adjustHeight(0.0f)
|
||||
, _scriptEditBoxHandler(0)
|
||||
|
|
|
@ -46,8 +46,8 @@ EditBoxImplAndroid::EditBoxImplAndroid(EditBox* pEditText)
|
|||
, _editBoxInputMode(kEditBoxInputModeSingleLine)
|
||||
, _editBoxInputFlag(kEditBoxInputFlagInitialCapsAllCharacters)
|
||||
, _keyboardReturnType(kKeyboardReturnTypeDefault)
|
||||
, _colText(Color3B::white)
|
||||
, _colPlaceHolder(Color3B::gray)
|
||||
, _colText(Color3B::WHITE)
|
||||
, _colPlaceHolder(Color3B::GRAY)
|
||||
, _maxLength(-1)
|
||||
{
|
||||
|
||||
|
|
|
@ -309,14 +309,14 @@ void EditBoxImplIOS::initInactiveLabels(const Size& size)
|
|||
|
||||
_label = LabelTTF::create("", "", 0.0f);
|
||||
_label->setAnchorPoint(ccp(0, 0.5f));
|
||||
_label->setColor(Color3B::white);
|
||||
_label->setColor(Color3B::WHITE);
|
||||
_label->setVisible(false);
|
||||
_editBox->addChild(_label, kLabelZOrder);
|
||||
|
||||
_labelPlaceHolder = LabelTTF::create("", "", 0.0f);
|
||||
// align the text vertically center
|
||||
_labelPlaceHolder->setAnchorPoint(ccp(0, 0.5f));
|
||||
_labelPlaceHolder->setColor(Color3B::gray);
|
||||
_labelPlaceHolder->setColor(Color3B::GRAY);
|
||||
_editBox->addChild(_labelPlaceHolder, kLabelZOrder);
|
||||
|
||||
setFont(pDefaultFontName, size.height*2/3);
|
||||
|
|
|
@ -47,8 +47,8 @@ EditBoxImplTizen::EditBoxImplTizen(EditBox* pEditText)
|
|||
, _editBoxInputMode(kEditBoxInputModeSingleLine)
|
||||
, _editBoxInputFlag(kEditBoxInputFlagInitialCapsAllCharacters)
|
||||
, _keyboardReturnType(kKeyboardReturnTypeDefault)
|
||||
, _colText(Color3B::white)
|
||||
, _colPlaceHolder(Color3B::gray)
|
||||
, _colText(Color3B::WHITE)
|
||||
, _colPlaceHolder(Color3B::GRAY)
|
||||
, _maxLength(-1)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -43,8 +43,8 @@ EditBoxImplWin::EditBoxImplWin(EditBox* pEditText)
|
|||
, _editBoxInputMode(kEditBoxInputModeSingleLine)
|
||||
, _editBoxInputFlag(kEditBoxInputFlagInitialCapsAllCharacters)
|
||||
, _keyboardReturnType(kKeyboardReturnTypeDefault)
|
||||
, _colText(Color3B::white)
|
||||
, _colPlaceHolder(Color3B::gray)
|
||||
, _colText(Color3B::WHITE)
|
||||
, _colPlaceHolder(Color3B::GRAY)
|
||||
, _maxLength(-1)
|
||||
{
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ void ActionManual::onEnter()
|
|||
_grossini->setColor( Color3B( 255,0,0));
|
||||
|
||||
_kathia->setPosition( ccp(s.width-100, s.height/2));
|
||||
_kathia->setColor( Color3B::blue);
|
||||
_kathia->setColor( Color3B::BLUE);
|
||||
}
|
||||
|
||||
std::string ActionManual::subtitle()
|
||||
|
|
|
@ -27,11 +27,11 @@ bool QuestionContainerSprite::init()
|
|||
static int a = 0;
|
||||
|
||||
if (a == 0)
|
||||
label->setColor(Color3B::blue);
|
||||
label->setColor(Color3B::BLUE);
|
||||
else
|
||||
{
|
||||
CCLog("Color changed");
|
||||
label->setColor(Color3B::red);
|
||||
label->setColor(Color3B::RED);
|
||||
}
|
||||
a++;
|
||||
addChild(layer);
|
||||
|
|
|
@ -34,7 +34,7 @@ void Bug624Layer::switchLayer(float dt)
|
|||
|
||||
Scene *scene = Scene::create();
|
||||
scene->addChild(Bug624Layer2::create(), 0);
|
||||
Director::sharedDirector()->replaceScene(TransitionFade::create(2.0f, scene, Color3B::white));
|
||||
Director::sharedDirector()->replaceScene(TransitionFade::create(2.0f, scene, Color3B::WHITE));
|
||||
}
|
||||
|
||||
void Bug624Layer::didAccelerate(Acceleration* acceleration)
|
||||
|
@ -71,7 +71,7 @@ void Bug624Layer2::switchLayer(float dt)
|
|||
|
||||
Scene *scene = Scene::create();
|
||||
scene->addChild(Bug624Layer::create(), 0);
|
||||
Director::sharedDirector()->replaceScene(TransitionFade::create(2.0f, scene, Color3B::red));
|
||||
Director::sharedDirector()->replaceScene(TransitionFade::create(2.0f, scene, Color3B::RED));
|
||||
}
|
||||
|
||||
void Bug624Layer2::didAccelerate(Acceleration* acceleration)
|
||||
|
|
|
@ -103,7 +103,7 @@ ControlButton *ControlButtonTest_HelloVariableSize::standardButtonWithTitle(cons
|
|||
|
||||
ControlButton *button = ControlButton::create(titleButton, backgroundButton);
|
||||
button->setBackgroundSpriteForState(backgroundHighlightedButton, ControlStateHighlighted);
|
||||
button->setTitleColorForState(Color3B::white, ControlStateHighlighted);
|
||||
button->setTitleColorForState(Color3B::WHITE, ControlStateHighlighted);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ bool ControlButtonTest_Event::init()
|
|||
|
||||
ControlButton *controlButton = ControlButton::create(titleButton, backgroundButton);
|
||||
controlButton->setBackgroundSpriteForState(backgroundHighlightedButton, ControlStateHighlighted);
|
||||
controlButton->setTitleColorForState(Color3B::white, ControlStateHighlighted);
|
||||
controlButton->setTitleColorForState(Color3B::WHITE, ControlStateHighlighted);
|
||||
|
||||
controlButton->setAnchorPoint(ccp(0.5f, 1));
|
||||
controlButton->setPosition(ccp(screenSize.width / 2.0f, screenSize.height / 2.0f));
|
||||
|
@ -270,7 +270,7 @@ ControlButton *ControlButtonTest_Styling::standardButtonWithTitle(const char *ti
|
|||
|
||||
ControlButton *button = ControlButton::create(titleButton, backgroundButton);
|
||||
button->setBackgroundSpriteForState(backgroundHighlightedButton, ControlStateHighlighted);
|
||||
button->setTitleColorForState(Color3B::white, ControlStateHighlighted);
|
||||
button->setTitleColorForState(Color3B::WHITE, ControlStateHighlighted);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ EditBoxTest::EditBoxTest()
|
|||
_editName->setFontName("fonts/Paint Boy.ttf");
|
||||
#endif
|
||||
_editName->setFontSize(25);
|
||||
_editName->setFontColor(Color3B::red);
|
||||
_editName->setFontColor(Color3B::RED);
|
||||
_editName->setPlaceHolder("Name:");
|
||||
_editName->setPlaceholderFontColor(Color3B::white);
|
||||
_editName->setPlaceholderFontColor(Color3B::WHITE);
|
||||
_editName->setMaxLength(8);
|
||||
_editName->setReturnType(kKeyboardReturnTypeDone);
|
||||
_editName->setDelegate(this);
|
||||
|
@ -60,7 +60,7 @@ EditBoxTest::EditBoxTest()
|
|||
#else
|
||||
_editPassword->setFont("fonts/American Typewriter.ttf", 30);
|
||||
#endif
|
||||
_editPassword->setFontColor(Color3B::green);
|
||||
_editPassword->setFontColor(Color3B::GREEN);
|
||||
_editPassword->setPlaceHolder("Password:");
|
||||
_editPassword->setMaxLength(6);
|
||||
_editPassword->setInputFlag(kEditBoxInputFlagPassword);
|
||||
|
|
|
@ -299,7 +299,7 @@ LabelAtlasColorTest::LabelAtlasColorTest()
|
|||
LabelAtlas* label2 = LabelAtlas::create("0123456789", "fonts/tuffy_bold_italic-charmap.png", 48, 64, ' ');
|
||||
addChild(label2, 0, kTagSprite2);
|
||||
label2->setPosition( ccp(10,200) );
|
||||
label2->setColor( Color3B::red );
|
||||
label2->setColor( Color3B::RED );
|
||||
|
||||
ActionInterval* fade = FadeOut::create(1.0f);
|
||||
ActionInterval* fade_in = fade->reverse();
|
||||
|
@ -417,7 +417,7 @@ Atlas3::Atlas3()
|
|||
LabelBMFont *label2 = LabelBMFont::create("Test", "fonts/bitmapFontTest2.fnt");
|
||||
// testing anchors
|
||||
label2->setAnchorPoint( ccp(0.5f, 0.5f) );
|
||||
label2->setColor( Color3B::red );
|
||||
label2->setColor( Color3B::RED );
|
||||
addChild(label2, 0, kTagBitmapAtlas2);
|
||||
label2->runAction( repeat->clone() );
|
||||
|
||||
|
@ -646,7 +646,7 @@ AtlasBitmapColor::AtlasBitmapColor()
|
|||
|
||||
LabelBMFont* label = NULL;
|
||||
label = LabelBMFont::create("Blue", "fonts/bitmapFontTest5.fnt");
|
||||
label->setColor( Color3B::blue );
|
||||
label->setColor( Color3B::BLUE );
|
||||
addChild(label);
|
||||
label->setPosition( ccp(s.width/2, s.height/4) );
|
||||
label->setAnchorPoint( ccp(0.5f, 0.5f) );
|
||||
|
@ -655,13 +655,13 @@ AtlasBitmapColor::AtlasBitmapColor()
|
|||
addChild(label);
|
||||
label->setPosition( ccp(s.width/2, 2*s.height/4) );
|
||||
label->setAnchorPoint( ccp(0.5f, 0.5f) );
|
||||
label->setColor( Color3B::red );
|
||||
label->setColor( Color3B::RED );
|
||||
|
||||
label = LabelBMFont::create("G", "fonts/bitmapFontTest5.fnt");
|
||||
addChild(label);
|
||||
label->setPosition( ccp(s.width/2, 3*s.height/4) );
|
||||
label->setAnchorPoint( ccp(0.5f, 0.5f) );
|
||||
label->setColor( Color3B::green );
|
||||
label->setColor( Color3B::GREEN );
|
||||
label->setString("Green");
|
||||
}
|
||||
|
||||
|
@ -1161,7 +1161,7 @@ BitmapFontMultiLineAlignment::BitmapFontMultiLineAlignment()
|
|||
Menu *stringMenu = Menu::create(longSentences, lineBreaks, mixed, NULL);
|
||||
stringMenu->alignItemsVertically();
|
||||
|
||||
longSentences->setColor(Color3B::red);
|
||||
longSentences->setColor(Color3B::RED);
|
||||
_lastSentenceItem = longSentences;
|
||||
longSentences->setTag(LongSentences);
|
||||
lineBreaks->setTag(LineBreaks);
|
||||
|
@ -1175,7 +1175,7 @@ BitmapFontMultiLineAlignment::BitmapFontMultiLineAlignment()
|
|||
Menu *alignmentMenu = Menu::create(left, center, right, NULL);
|
||||
alignmentMenu->alignItemsHorizontallyWithPadding(alignmentItemPadding);
|
||||
|
||||
center->setColor(Color3B::red);
|
||||
center->setColor(Color3B::RED);
|
||||
_lastAlignmentItem = center;
|
||||
left->setTag(LeftAlign);
|
||||
center->setTag(CenterAlign);
|
||||
|
@ -1222,8 +1222,8 @@ std::string BitmapFontMultiLineAlignment::subtitle()
|
|||
void BitmapFontMultiLineAlignment::stringChanged(cocos2d::Object *sender)
|
||||
{
|
||||
MenuItemFont *item = (MenuItemFont*)sender;
|
||||
item->setColor(Color3B::red);
|
||||
this->_lastAlignmentItem->setColor(Color3B::white);
|
||||
item->setColor(Color3B::RED);
|
||||
this->_lastAlignmentItem->setColor(Color3B::WHITE);
|
||||
this->_lastAlignmentItem = item;
|
||||
|
||||
switch(item->getTag())
|
||||
|
@ -1248,8 +1248,8 @@ void BitmapFontMultiLineAlignment::stringChanged(cocos2d::Object *sender)
|
|||
void BitmapFontMultiLineAlignment::alignmentChanged(cocos2d::Object *sender)
|
||||
{
|
||||
MenuItemFont *item = (MenuItemFont*)sender;
|
||||
item->setColor(Color3B::red);
|
||||
this->_lastAlignmentItem->setColor(Color3B::white);
|
||||
item->setColor(Color3B::RED);
|
||||
this->_lastAlignmentItem->setColor(Color3B::WHITE);
|
||||
this->_lastAlignmentItem = item;
|
||||
|
||||
switch(item->getTag())
|
||||
|
@ -1328,7 +1328,7 @@ LabelTTFA8Test::LabelTTFA8Test()
|
|||
// LabelBMFont
|
||||
LabelTTF *label1 = LabelTTF::create("Testing A8 Format", "Marker Felt", 48);
|
||||
addChild(label1);
|
||||
label1->setColor(Color3B::red);
|
||||
label1->setColor(Color3B::RED);
|
||||
label1->setPosition(ccp(s.width/2, s.height/2));
|
||||
|
||||
FadeOut *fadeOut = FadeOut::create(2);
|
||||
|
|
|
@ -34,7 +34,7 @@ void MotionStreakTest1::onEnter()
|
|||
_target->setPosition(ccp(s.width/4, 0));
|
||||
|
||||
// create the streak object and add it to the scene
|
||||
streak = MotionStreak::create(2, 3, 32, Color3B::green, s_streak);
|
||||
streak = MotionStreak::create(2, 3, 32, Color3B::GREEN, s_streak);
|
||||
addChild(streak);
|
||||
// schedule an update on each frame so we can syncronize the streak with the target
|
||||
schedule(schedule_selector(MotionStreakTest1::onUpdate));
|
||||
|
@ -84,7 +84,7 @@ void MotionStreakTest2::onEnter()
|
|||
Size s = Director::sharedDirector()->getWinSize();
|
||||
|
||||
// create the streak object and add it to the scene
|
||||
streak = MotionStreak::create(3, 3, 64, Color3B::white, s_streak );
|
||||
streak = MotionStreak::create(3, 3, 64, Color3B::WHITE, s_streak );
|
||||
addChild(streak);
|
||||
|
||||
streak->setPosition( ccp(s.width/2, s.height/2) );
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
|
||||
static Color3B s_TouchColors[CC_MAX_TOUCHES] = {
|
||||
Color3B::yellow,
|
||||
Color3B::blue,
|
||||
Color3B::green,
|
||||
Color3B::red,
|
||||
Color3B::magenta
|
||||
Color3B::YELLOW,
|
||||
Color3B::BLUE,
|
||||
Color3B::GREEN,
|
||||
Color3B::RED,
|
||||
Color3B::MAGENTA
|
||||
};
|
||||
|
||||
class TouchPoint : public Node
|
||||
|
|
|
@ -659,7 +659,7 @@ CameraCenterTest::CameraCenterTest()
|
|||
sprite = Sprite::create("Images/white-512x512.png");
|
||||
addChild( sprite, 0);
|
||||
sprite->setPosition(ccp(s.width/5*1, s.height/5*1));
|
||||
sprite->setColor(Color3B::red);
|
||||
sprite->setColor(Color3B::RED);
|
||||
sprite->setTextureRect(CCRectMake(0, 0, 120, 50));
|
||||
orbit = OrbitCamera::create(10, 1, 0, 0, 360, 0, 0);
|
||||
sprite->runAction(RepeatForever::create( orbit ));
|
||||
|
@ -671,7 +671,7 @@ CameraCenterTest::CameraCenterTest()
|
|||
sprite = Sprite::create("Images/white-512x512.png");
|
||||
addChild( sprite, 0, 40);
|
||||
sprite->setPosition(ccp(s.width/5*1, s.height/5*4));
|
||||
sprite->setColor(Color3B::blue);
|
||||
sprite->setColor(Color3B::BLUE);
|
||||
sprite->setTextureRect(CCRectMake(0, 0, 120, 50));
|
||||
orbit = OrbitCamera::create(10, 1, 0, 0, 360, 0, 0);
|
||||
sprite->runAction(RepeatForever::create( orbit ));
|
||||
|
@ -681,7 +681,7 @@ CameraCenterTest::CameraCenterTest()
|
|||
sprite = Sprite::create("Images/white-512x512.png");
|
||||
addChild( sprite, 0);
|
||||
sprite->setPosition(ccp(s.width/5*4, s.height/5*1));
|
||||
sprite->setColor(Color3B::yellow);
|
||||
sprite->setColor(Color3B::YELLOW);
|
||||
sprite->setTextureRect(CCRectMake(0, 0, 120, 50));
|
||||
orbit = OrbitCamera::create(10, 1, 0, 0, 360, 0, 0);
|
||||
sprite->runAction(RepeatForever::create( orbit) );
|
||||
|
@ -691,7 +691,7 @@ CameraCenterTest::CameraCenterTest()
|
|||
sprite = Sprite::create("Images/white-512x512.png");
|
||||
addChild( sprite, 0, 40);
|
||||
sprite->setPosition(ccp(s.width/5*4, s.height/5*4));
|
||||
sprite->setColor(Color3B::green);
|
||||
sprite->setColor(Color3B::GREEN);
|
||||
sprite->setTextureRect(CCRectMake(0, 0, 120, 50));
|
||||
orbit = OrbitCamera::create(10, 1, 0, 0, 360, 0, 0);
|
||||
sprite->runAction( RepeatForever::create( orbit ) );
|
||||
|
@ -700,7 +700,7 @@ CameraCenterTest::CameraCenterTest()
|
|||
sprite = Sprite::create("Images/white-512x512.png");
|
||||
addChild( sprite, 0, 40);
|
||||
sprite->setPosition(ccp(s.width/2, s.height/2));
|
||||
sprite->setColor(Color3B::white);
|
||||
sprite->setColor(Color3B::WHITE);
|
||||
sprite->setTextureRect(CCRectMake(0, 0, 120, 50));
|
||||
orbit = OrbitCamera::create(10, 1, 0, 0, 360, 0, 0);
|
||||
sprite->runAction(RepeatForever::create( orbit ) );
|
||||
|
@ -825,7 +825,7 @@ NodeNonOpaqueTest::NodeNonOpaqueTest()
|
|||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
background = Sprite::create("Images/background1.jpg");
|
||||
background->setBlendFunc(BlendFunc::blendFuncDisable);
|
||||
background->setBlendFunc(BlendFunc::BLEND_FUNC_DISABLE);
|
||||
background->setAnchorPoint(PointZero);
|
||||
addChild(background);
|
||||
}
|
||||
|
|
|
@ -640,7 +640,7 @@ void RadiusMode1::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -724,7 +724,7 @@ void RadiusMode2::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -808,7 +808,7 @@ void Issue704::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -900,7 +900,7 @@ void Issue870::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -941,7 +941,7 @@ void DemoParticleFromFile::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1211,7 +1211,7 @@ void ParticleBatchHybrid::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1259,7 +1259,7 @@ void ParticleBatchMultipleEmitters::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1302,7 +1302,7 @@ void ParticleReorder::onEnter()
|
|||
ParticleDemo::onEnter();
|
||||
|
||||
_order = 0;
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1472,7 +1472,7 @@ void Issue1201::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1502,7 +1502,7 @@ void MultipleParticleSystems::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1557,7 +1557,7 @@ void MultipleParticleSystemsBatched::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1619,7 +1619,7 @@ void AddAndDeleteParticleSystems::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1708,7 +1708,7 @@ void ReorderParticleSystems::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
removeChild(_background ,true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1854,7 +1854,7 @@ void PremultipliedAlphaTest::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::blue);
|
||||
_color->setColor(Color3B::BLUE);
|
||||
this->removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
@ -1886,7 +1886,7 @@ void PremultipliedAlphaTest2::onEnter()
|
|||
{
|
||||
ParticleDemo::onEnter();
|
||||
|
||||
_color->setColor(Color3B::black);
|
||||
_color->setColor(Color3B::BLACK);
|
||||
this->removeChild(_background, true);
|
||||
_background = NULL;
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ RenderTextureSave::RenderTextureSave()
|
|||
// create a brush image to draw into the texture with
|
||||
_brush = Sprite::create("Images/fire.png");
|
||||
_brush->retain();
|
||||
_brush->setColor(Color3B::red);
|
||||
_brush->setColor(Color3B::RED);
|
||||
_brush->setOpacity(20);
|
||||
this->setTouchEnabled(true);
|
||||
|
||||
|
@ -348,7 +348,7 @@ RenderTextureZbuffer::RenderTextureZbuffer()
|
|||
sp9->setVertexZ(-400);
|
||||
|
||||
sp9->setScale(2);
|
||||
sp9->setColor(Color3B::yellow);
|
||||
sp9->setColor(Color3B::YELLOW);
|
||||
}
|
||||
|
||||
string RenderTextureZbuffer::title()
|
||||
|
@ -425,7 +425,7 @@ void RenderTextureZbuffer::renderScreenShot()
|
|||
sprite->setOpacity(182);
|
||||
sprite->setFlipY(1);
|
||||
this->addChild(sprite, 999999);
|
||||
sprite->setColor(Color3B::green);
|
||||
sprite->setColor(Color3B::GREEN);
|
||||
|
||||
sprite->runAction(Sequence::create(FadeTo::create(2, 0),
|
||||
Hide::create(),
|
||||
|
|
|
@ -1 +1 @@
|
|||
0a20e584160edbced8ef614c066d758913ecdce9
|
||||
68cd6c48fec5f50c0f98d427b8e677fb956a41eb
|
|
@ -9,7 +9,7 @@ class FadeWhiteTransition : public TransitionFade
|
|||
public:
|
||||
static TransitionScene* create(float t, Scene* s)
|
||||
{
|
||||
return TransitionFade::create(t, s, Color3B::white);
|
||||
return TransitionFade::create(t, s, Color3B::WHITE);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ end
|
|||
-- sp9:setVertexZ(-400)
|
||||
|
||||
-- sp9:setScale(2)
|
||||
-- sp9:setColor(Color3B::yellow)
|
||||
-- sp9:setColor(Color3B::YELLOW)
|
||||
-- end
|
||||
|
||||
-- local function title()
|
||||
|
@ -348,7 +348,7 @@ end
|
|||
-- sprite:setOpacity(182)
|
||||
-- sprite:setFlipY(1)
|
||||
-- this:addChild(sprite, 999999)
|
||||
-- sprite:setColor(Color3B::green)
|
||||
-- sprite:setColor(Color3B::GREEN)
|
||||
|
||||
-- sprite:runAction(CCSequence:create(CCFadeTo:create(2, 0),
|
||||
-- CCHide:create(),
|
||||
|
|
|
@ -2158,7 +2158,7 @@ JSBool jsval_to_FontDefinition( JSContext *cx, jsval vp, FontDefinition *out )
|
|||
out->_stroke._strokeEnabled = false;
|
||||
|
||||
// white text by default
|
||||
out->_fontFillColor = Color3B::white;
|
||||
out->_fontFillColor = Color3B::WHITE;
|
||||
|
||||
// font name
|
||||
jsval jsr;
|
||||
|
@ -2302,7 +2302,7 @@ JSBool jsval_to_FontDefinition( JSContext *cx, jsval vp, FontDefinition *out )
|
|||
{
|
||||
// default stroke values
|
||||
out->_stroke._strokeSize = 1;
|
||||
out->_stroke._strokeColor = Color3B::blue;
|
||||
out->_stroke._strokeColor = Color3B::BLUE;
|
||||
|
||||
// stroke color
|
||||
JS_HasProperty(cx, jsobj, "strokeColor", &hasProperty);
|
||||
|
|
|
@ -1 +1 @@
|
|||
c612bfc9280e6cfe3c8a9831ce557d73088c3ecd
|
||||
31392ef10420646188c050f7be0dde0440c5a596
|
|
@ -307,7 +307,7 @@ TOLUA_API int tolua_Cocos2d_open (lua_State* tolua_S);]], [[]])
|
|||
[[unsigned int* tolua_ret = (unsigned int*) self->getTiles();]])
|
||||
|
||||
replace([[Color3B color = *((Color3B*) tolua_tousertype(tolua_S,4,(void*)&(const Color3B)ccBLACK));]],
|
||||
[[const Color3B clr = Color3B::black;
|
||||
[[const Color3B clr = Color3B::BLACK;
|
||||
Color3B color = *((Color3B*) tolua_tousertype(tolua_S,4,(void*)&clr));]])
|
||||
|
||||
replace([[tolua_usertype(tolua_S,"LUA_FUNCTION");]], [[]])
|
||||
|
|
Loading…
Reference in New Issue