• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ setCascadeColorEnabled函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setCascadeColorEnabled函数的典型用法代码示例。如果您正苦于以下问题:C++ setCascadeColorEnabled函数的具体用法?C++ setCascadeColorEnabled怎么用?C++ setCascadeColorEnabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setCascadeColorEnabled函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:mcodegeeks,项目名称:OpenKODE-Framework,代码行数:35,代码来源:UIWidget.cpp


示例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;
    }
}
开发者ID:yinjimmy,项目名称:qmm,代码行数:26,代码来源:CCControl.cpp


示例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();
}
开发者ID:12white,项目名称:CocoStudioSamples,代码行数:34,代码来源:UIWidget.cpp


示例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.");
}
开发者ID:289997171,项目名称:cocos2d-x,代码行数:31,代码来源:Scale9SpriteTest.cpp


示例5: createScene

Scene* BattleScene::createScene()
{
	auto scene = Scene::create();
	auto layer = BattleScene::create();
	layer->setCascadeColorEnabled(true);
	scene->addChild(layer);
	return scene;
}
开发者ID:WhatTeam,项目名称:FantasyLand,代码行数:8,代码来源:BattleScene.cpp


示例6: setCascadeColorEnabled

bool CProgressBar::init()
{
	setCascadeColorEnabled(true);
	setCascadeOpacityEnabled(true);

	setAnchorPoint(CCWIDGET_BASIC_DEFAULT_ANCHOR_POINT);
	setContentSize(CCWIDGET_BASIC_DEFAULT_CONTENT_SIZE);

	return true;
}
开发者ID:Coolxiaoo,项目名称:CocosWidget,代码行数:10,代码来源:ProgressBar.cpp


示例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;
}
开发者ID:duzhi5368,项目名称:FKCocos2dxWrapper_2.x,代码行数:11,代码来源:FKCW_UIWidget_ControlView.cpp


示例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;
}
开发者ID:duzhi5368,项目名称:FKCocos2dxWrapper_2.x,代码行数:12,代码来源:FKCW_UIWidget_Layout.cpp


示例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;
}
开发者ID:Eason-Xi,项目名称:Tui-x,代码行数:11,代码来源:Layout.cpp


示例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;
}
开发者ID:Ratel13,项目名称:WarriorQuest,代码行数:13,代码来源:CCMenuItem.cpp


示例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;
}
开发者ID:fordream,项目名称:quick,代码行数:13,代码来源:CCMenuItem.cpp


示例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;
}
开发者ID:12white,项目名称:CocoStudioSamples,代码行数:14,代码来源:UIWidget.cpp


示例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;
}
开发者ID:Ratel13,项目名称:WarriorQuest,代码行数:16,代码来源:CCMenuItem.cpp


示例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;
    }
}
开发者ID:mcodegeeks,项目名称:OpenKODE-Framework,代码行数:16,代码来源:CCLayer.cpp


示例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);
    }
开发者ID:FlavioFalcao,项目名称:NautiPlot,代码行数:16,代码来源:LayerTest.cpp


示例16: m_pBaseBoard

NS_CC_WIDGET_BEGIN

CControlView::CControlView()
: m_pBaseBoard(NULL)
, m_pJoystick(NULL)
, m_fRadius(100.0f)
, m_tCenterPoint(CCPointZero)
, m_bRelocateWithAnimation(true)
, m_bAnimationUpdate(false)
, m_bExecuteEventUpdate(false)
, m_tLastPoint(CCPointZero)
{
	setThisObject(this);
	setCascadeColorEnabled(true);
	setCascadeOpacityEnabled(true);
}
开发者ID:Lewis2012,项目名称:CocosWidget,代码行数:16,代码来源:ControlView.cpp


示例17: setCascadeOpacityEnabled

bool CCLayerRGBA::init()
{
    if (CCLayer::init())
    {
        _displayedOpacity = _realOpacity = 255;
        _displayedColor = _realColor = ccWHITE;
        setCascadeOpacityEnabled(false);
        setCascadeColorEnabled(false);

        return true;
    }
    else
    {
        return false;
    }
}
开发者ID:BetaS,项目名称:cocos2d-x,代码行数:16,代码来源:CCLayer.cpp


示例18: m_pNormal

NS_CC_WIDGET_BEGIN

CCheckBox::CCheckBox()
: m_pNormal(NULL)
, m_pNormalPress(NULL)
, m_pChecked(NULL)
, m_pCheckedPress(NULL)
, m_pDisabledNormal(NULL)
, m_pDisabledChecked(NULL)
{
	setThisObject(this);
	setCascadeColorEnabled(true);
	setCascadeOpacityEnabled(true);

	setAnchorPoint(CCWIDGET_BASIC_DEFAULT_ANCHOR_POINT);
	setContentSize(CCWIDGET_BASIC_DEFAULT_CONTENT_SIZE);
}
开发者ID:54993306,项目名称:Classes,代码行数:17,代码来源:CheckBox.cpp


示例19: getTexture

bool Scale9Sprite::init(cocos2d::Texture2D *tex, cocos2d::Rect rect, cocos2d::Rect capInsets) {
	if (!DynamicBatchNode::init(tex)) {
		return false;
	}

	if (rect.equals(cocos2d::Rect::ZERO)) {
		rect.size = getTexture()->getContentSize();
	}
	_textureRect = rect;
	_capInsets = capInsets;
	_contentSize = _textureRect.size;
	
	setCascadeColorEnabled(true);
	setCascadeOpacityEnabled(true);
	
	return true;
}
开发者ID:SBKarr,项目名称:stappler,代码行数:17,代码来源:SPScale9Sprite.cpp


示例20: setNormalImage

bool MenuItemSprite::initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, const ccMenuCallback& callback)
{
    MenuItem::initWithCallback(callback);
    setNormalImage(normalSprite);
    setSelectedImage(selectedSprite);
    setDisabledImage(disabledSprite);

    if(_normalImage)
    {
        this->setContentSize(_normalImage->getContentSize());
    }

    setCascadeColorEnabled(true);
    setCascadeOpacityEnabled(true);

    return true;
}
开发者ID:Ratel13,项目名称:WarriorQuest,代码行数:17,代码来源:CCMenuItem.cpp



注:本文中的setCascadeColorEnabled函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setCentralWidget函数代码示例发布时间:2022-05-30
下一篇:
C++ setCaption函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap