本文整理汇总了C++中setCascadeColorEnabled函数的典型用法代码示例。如果您正苦于以下问题:C++ setCascadeColorEnabled函数的具体用法?C++ setCascadeColorEnabled怎么用?C++ setCascadeColorEnabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setCascadeColorEnabled函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setEnabled
void UIWidget::copyProperties(UIWidget *widget)
{
setEnabled(widget->isEnabled());
setVisible(widget->isVisible());
setBright(widget->isBright());
setTouchEnabled(widget->isTouchEnabled());
m_bTouchPassedEnabled = false;
setZOrder(widget->getZOrder());
setUpdateEnabled(widget->isUpdateEnabled());
setTag(widget->getTag());
setName(widget->getName());
setActionTag(widget->getActionTag());
m_bIgnoreSize = widget->m_bIgnoreSize;
m_tSize = widget->m_tSize;
m_tCustomSize = widget->m_tCustomSize;
copySpecialProperties(widget);
m_eSizeType = widget->getSizeType();
m_tSizePercent = widget->m_tSizePercent;
m_ePositionType = widget->m_ePositionType;
m_tPositionPercent = widget->m_tPositionPercent;
setPosition(widget->getPosition());
setAnchorPoint(widget->getAnchorPoint());
setScaleX(widget->getScaleX());
setScaleY(widget->getScaleY());
setRotation(widget->getRotation());
setRotationX(widget->getRotationX());
setRotationY(widget->getRotationY());
setFlipX(widget->isFlipX());
setFlipY(widget->isFlipY());
setColor(widget->getColor());
setOpacity(widget->getOpacity());
setCascadeOpacityEnabled(widget->isCascadeOpacityEnabled());
setCascadeColorEnabled(widget->isCascadeColorEnabled());
onSizeChanged();
}
示例2: setCascadeOpacityEnabled
bool CCControl::init()
{
if (CCNode::init())
{
//this->setTouchEnabled(true);
//m_bIsTouchEnabled=true;
// Initialise instance variables
m_eState=CCControlStateNormal;
setCascadeOpacityEnabled(true);
setCascadeColorEnabled(true);
setEnabled(true);
setSelected(false);
setHighlighted(false);
// Initialise the tables
m_pDispatchTable = new CCDictionary();
// Initialise the mapHandleOfControlEvents
m_mapHandleOfControlEvent.clear();
return true;
}
else
{
return false;
}
}
示例3: setEnabled
void Widget::copyProperties(Widget *widget)
{
setEnabled(widget->isEnabled());
setVisible(widget->isVisible());
setBright(widget->isBright());
setTouchEnabled(widget->isTouchEnabled());
_touchPassedEnabled = false;
setLocalZOrder(widget->getLocalZOrder());
setTag(widget->getTag());
setName(widget->getName());
setActionTag(widget->getActionTag());
_ignoreSize = widget->_ignoreSize;
_size = widget->_size;
_customSize = widget->_customSize;
copySpecialProperties(widget);
_sizeType = widget->getSizeType();
_sizePercent = widget->_sizePercent;
_positionType = widget->_positionType;
_positionPercent = widget->_positionPercent;
setPosition(widget->getPosition());
setAnchorPoint(widget->getAnchorPoint());
setScaleX(widget->getScaleX());
setScaleY(widget->getScaleY());
setRotation(widget->getRotation());
setRotationX(widget->getRotationX());
setRotationY(widget->getRotationY());
setFlipX(widget->isFlipX());
setFlipY(widget->isFlipY());
setColor(widget->getColor());
setOpacity(widget->getOpacity());
setCascadeOpacityEnabled(widget->isCascadeOpacityEnabled());
setCascadeColorEnabled(widget->isCascadeColorEnabled());
onSizeChanged();
}
示例4: log
void S9CascadeOpacityAndColor::onEnter()
{
S9SpriteTestDemo::onEnter();
auto winSize = Director::getInstance()->getWinSize();
float x = winSize.width / 2;
float y = 0 + (winSize.height / 2);
auto rgba = Layer::create();
rgba->setCascadeColorEnabled(true);
rgba->setCascadeOpacityEnabled(true);
this->addChild(rgba);
log("S9CascadeOpacityAndColor ...");
auto blocks_scaled_with_insets = Scale9Sprite::createWithSpriteFrameName("blocks9r.png");
log("... created");
blocks_scaled_with_insets->setPosition(Vec2(x, y));
log("... setPosition");
rgba->addChild(blocks_scaled_with_insets);
auto actions = Sequence::create(FadeIn::create(1),
TintTo::create(1, 0, 255, 0),
TintTo::create(1, 255, 255, 255),
FadeOut::create(1),
NULL);
auto repeat = RepeatForever::create(actions);
rgba->runAction(repeat);
log("this->addChild");
log("... S9CascadeOpacityAndColor done.");
}
示例5: createScene
Scene* BattleScene::createScene()
{
auto scene = Scene::create();
auto layer = BattleScene::create();
layer->setCascadeColorEnabled(true);
scene->addChild(layer);
return scene;
}
示例6: setCascadeColorEnabled
bool CProgressBar::init()
{
setCascadeColorEnabled(true);
setCascadeOpacityEnabled(true);
setAnchorPoint(CCWIDGET_BASIC_DEFAULT_ANCHOR_POINT);
setContentSize(CCWIDGET_BASIC_DEFAULT_CONTENT_SIZE);
return true;
}
示例7: setCascadeColorEnabled
//-------------------------------------------------------------------------
bool FKCW_UIWidget_ControlView::init()
{
setCascadeColorEnabled(true);
setCascadeOpacityEnabled(true);
setAnchorPoint(FKCW_UIWIDGET_BASIC_DEFAULT_ANCHOR_POINT);
setContentSize(FKCW_UIWIDGET_BASIC_DEFAULT_CONTENT_SIZE);
return true;
}
示例8: setCascadeColorEnabled
//-------------------------------------------------------------------------
bool FKCW_UIWidget_Layout::init()
{
setCascadeColorEnabled(true);
setCascadeOpacityEnabled(true);
setContentSize(FKCW_UIWIDGET_LAYOUT_DEFAULT_CONTENT_SIZE);
setAnchorPoint(FKCW_UIWIDGET_LAYOUT_DEFAULT_ANCHOR_POINT);
setPosition(CCPointZero);
return true;
}
示例9: setCascadeColorEnabled
bool CLayout::init()
{
setCascadeColorEnabled(true);
setCascadeOpacityEnabled(true);
setContentSize(CCWIDGET_LAYOUT_DEFAULT_CONTENT_SIZE);
setAnchorPoint(CCWIDGET_LAYOUT_DEFAULT_ANCHOR_POINT);
setPosition(Point::ZERO);
return true;
}
示例10: setDisabledColor
bool MenuItemLabel::initWithLabel(Node* label, const ccMenuCallback& callback)
{
MenuItem::initWithCallback(callback);
_originalScale = 1.0f;
_colorBackup = Color3B::WHITE;
setDisabledColor(Color3B(126,126,126));
this->setLabel(label);
setCascadeColorEnabled(true);
setCascadeOpacityEnabled(true);
return true;
}
示例11: setDisabledColor
bool CCMenuItemLabel::initWithLabel(CCNode* label, CCObject* target, SEL_MenuHandler selector)
{
CCMenuItem::initWithTarget(target, selector);
m_fOriginalScale = 1.0f;
m_tColorBackup = ccWHITE;
setDisabledColor(ccc3(126,126,126));
this->setLabel(label);
setCascadeColorEnabled(true);
setCascadeOpacityEnabled(true);
return true;
}
示例12: initRenderer
bool Widget::init()
{
if (Node::init())
{
initRenderer();
setCascadeColorEnabled(true);
setCascadeOpacityEnabled(true);
setBright(true);
ignoreContentAdaptWithSize(true);
setAnchorPoint(Point(0.5f, 0.5f));
return true;
}
return false;
}
示例13: setCascadeColorEnabled
bool MenuItemToggle::initWithItem(MenuItem *item)
{
MenuItem::initWithCallback((const ccMenuCallback&)nullptr);
if (item)
{
_subItems.pushBack(item);
}
_selectedIndex = UINT_MAX;
this->setSelectedIndex(0);
setCascadeColorEnabled(true);
setCascadeOpacityEnabled(true);
return true;
}
示例14: setCascadeOpacityEnabled
bool LayerRGBA::init()
{
if (Layer::init())
{
m_cDisplayedOpacity = m_cRealOpacity = 255;
m_tDisplayedColor = m_tRealColor = Color3B::WHITE;
setCascadeOpacityEnabled(false);
setCascadeColorEnabled(false);
return true;
}
else
{
return false;
}
}
示例15: setEnableRecursiveCascading
static void setEnableRecursiveCascading(Node* node, bool enable)
{
auto rgba = dynamic_cast<RGBAProtocol*>(node);
if (rgba)
{
rgba->setCascadeColorEnabled(enable);
rgba->setCascadeOpacityEnabled(enable);
}
Object* obj;
auto children = node->getChildren();
CCARRAY_FOREACH(children, obj)
{
auto child = static_cast<Node*>(obj);
setEnableRecursiveCascading(child, enable);
}