当前位置: 首页>>代码示例>>C++>>正文


C++ ControlButton::setPosition方法代码示例

本文整理汇总了C++中ControlButton::setPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ ControlButton::setPosition方法的具体用法?C++ ControlButton::setPosition怎么用?C++ ControlButton::setPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ControlButton的用法示例。


在下文中一共展示了ControlButton::setPosition方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: updateLayerMessageBox

void AssetsUpdateLayer::updateLayerMessageBox()
{

    SpriteFrameCache::getInstance()->addSpriteFramesWithFile("ccb/ccbResources/SystemLoading.plist");

    CCLayer* layer = CCLayer::create();
    layer->ignoreAnchorPointForPosition(false);
    layer->setContentSize(Size(960, 640));
    layer->setPosition(Point(Director::getInstance()->getWinSize().width * 0.5, Director::getInstance()->getWinSize().height * 0.5));
    layer->setScale(Director::getInstance()->getWinSize().width / 960);
    addChild(layer, 1);

    Sprite* messageboxSprite = Sprite::createWithSpriteFrameName("set_floor_v1.png");
    messageboxSprite->setPosition(Point(480, 320));
    layer->addChild(messageboxSprite, 1);

    LabelTTF* labelContent = LabelTTF::create(Localization::getInstance()->getValueByKey("Loading_warning_need_update"), "Helvetica",32);
    labelContent->setPosition(Point(480, 420));
    layer->addChild(labelContent, 1);

    ControlButton* btn = ControlButton::create(LabelTTF::create(Localization::getInstance()->getValueByKey("BUTTON_DONE"), "Helvetica", 32), Scale9Sprite::createWithSpriteFrameName("set_button2.png"));
    btn->setPreferredSize(CCSize(191,70));
    btn->setPosition(Point(480, 220));
    btn->addTargetWithActionForControlEvents(this, cccontrol_selector(AssetsUpdateLayer::GoToAppPage), Control::EventType::TOUCH_UP_INSIDE);
    layer->addChild(btn, 1);

}
开发者ID:sharpfforg,项目名称:us,代码行数:27,代码来源:AssetsUpdateLayer.cpp

示例2:

ControlButton *TDDSubMenu::createButton(const std::string &name, int tag,
                                          const Point &pos, const Size &size)
{
    Color3B colorNormal = Color3B::WHITE;
    //Color3B colorSelected = colorNormal;
    
    Scale9Sprite *bgButton = Scale9Sprite::create();
    Scale9Sprite *bgHiliButton = Scale9Sprite::create();
    
    // bgButton->setContentSize(Size(200, 50));
    Label *titleButton = Label::createWithSystemFont(name.c_str(), "Arial", 15);
    titleButton->setColor(colorNormal);
    
    
    ControlButton *button = ControlButton::create(titleButton, bgButton);
    button->setBackgroundSpriteForState(bgHiliButton, Control::State::HIGH_LIGHTED);

    TDDHelper::setAlphaPremultiplied(button);
    button->setTag(tag);
    button->setContentSize(size);
    button->setPosition(pos);
    button->setSelected(false);
    
    return button;
}
开发者ID:dwdcth,项目名称:SimpleTDD-cocos2dx,代码行数:25,代码来源:TDDSubMenu.cpp

示例3: init

bool SkillTableView::init()
{
    if (!Node::init())
        return false;

    LayerColor* bg = LayerColor::create(Color4B(255, 255, 255, 127), 450, 500);
    bg->setPosition(bg->getContentSize()/-2);
    this->addChild(bg, -1);
    
    CCLabelTTF* title = CCLabelTTF::create("技能列表", "fonts/Marker Felt.ttf", 40);
    title->setPosition(Point(bg->getContentSize().width/2, bg->getContentSize().height-30));
    bg->addChild(title);
    
    ControlButton* button = ControlButton::create(Scale9Sprite::create("ui/closed_normal.png"));
    button->setBackgroundSpriteForState(Scale9Sprite::create("ui/closed_selected.png"), Control::State::HIGH_LIGHTED);
    button->setPreferredSize(Size(57, 58));
    button->setPosition(ccpSub(ccpAdd(bg->getPosition(), bg->getContentSize()), button->getContentSize()/2));
    this->addChild(button);
    button->addTargetWithActionForControlEvents(GAME_UILAYER, cccontrol_selector(GameInfoUIController::removeSmallMenuAndButton), Control::EventType::TOUCH_UP_INSIDE);
   // button->setTouchPriority(0);
    
    m_skillTableView = TableView::create(this, Size(420, 420));
    m_skillTableView->setPosition(Point(15, 15));
   // m_skillTableView->setDirection(kCCScrollViewDirectionVertical);
    m_skillTableView->setDelegate(this);
   // m_skillTableView->setVerticalFillOrder(kCCTableViewFillTopDown);
    bg->addChild(m_skillTableView);
    m_skillTableView->reloadData();
    return true;
}
开发者ID:gujianhesong,项目名称:GujianDream,代码行数:30,代码来源:SkillTableView.cpp

示例4: init

bool PropColumnMenu::init()
{
    if (!Layer::init())
        return false;
    
    this->setTouchEnabled(true);
    
    Sprite* bg = Sprite::create("ui/prop_column.png");
    this->addChild(bg);
    
    m_propColumn = LayerColor::create(ccc4(255, 255, 255, 0), GRID_WIDTH*COL, GRID_HEIGHT*ROW);
    m_propColumn->setContentSize(Size(GRID_WIDTH*COL, GRID_HEIGHT*ROW));
    m_propColumn->setPosition(Point(PROP_X, PROP_Y));
    bg->addChild(m_propColumn);
    
    ControlButton* button = ControlButton::create(ui::Scale9Sprite::create("ui/closed_normal.png"));
    button->setBackgroundSpriteForState(ui::Scale9Sprite::create("ui/closed_selected.png"), Control::State::HIGH_LIGHTED);
    button->setPreferredSize(Size(57, 58));
    button->setPosition(ccpSub(ccpAdd(bg->getPosition(), bg->getContentSize()/2), button->getContentSize()/2));
    this->addChild(button);
    button->addTargetWithActionForControlEvents(GAME_UILAYER, cccontrol_selector(GameInfoUIController::removeSmallMenuAndButton), Control::EventType::TOUCH_UP_INSIDE);
   // button->setTouchPriority(0);
    
    for (int i=0; i<12; i++)
    {
        m_propVec[i] = PropIconShow::create(PropSystem::getPropInfo(i+1));
        m_propColumn->addChild(m_propVec[i]);
    }

    return true;
}
开发者ID:dzwdyc,项目名称:codesssssssss,代码行数:31,代码来源:PropColumn.cpp

示例5: init

bool ControlButtonTest_Event::init()
{
    if (ControlScene::init())
    {
        auto screenSize = Director::getInstance()->getWinSize();

        // Add a label in which the button events will be displayed
        setDisplayValueLabel(Label::createWithTTF("No Event", "fonts/Marker Felt.ttf", 32));
        _displayValueLabel->setAnchorPoint(Vec2(0.5f, -1));
        _displayValueLabel->setPosition(screenSize.width / 2.0f, screenSize.height / 2.0f);
        addChild(_displayValueLabel, 1);

        setDisplayBitmaskLabel(Label::createWithTTF("No bitmask event", "fonts/Marker Felt.ttf", 24));
        _displayBitmaskLabel->setAnchorPoint(Vec2(0.5f, -1));
        Vec2 bitmaskLabelPos = _displayValueLabel->getPosition() - Vec2(0, _displayBitmaskLabel->getBoundingBox().size.height);
        _displayBitmaskLabel->setPosition(bitmaskLabelPos);
        addChild(_displayBitmaskLabel, 1);

        // Add the button
        auto backgroundButton = ui::Scale9Sprite::create("extensions/button.png");
        auto backgroundHighlightedButton = ui::Scale9Sprite::create("extensions/buttonHighlighted.png");
        
        auto titleButton = Label::createWithTTF("Touch Me!", "fonts/Marker Felt.ttf", 30);

        titleButton->setColor(Color3B(159, 168, 176));
        
        ControlButton *controlButton = ControlButton::create(titleButton, backgroundButton);
        controlButton->setBackgroundSpriteForState(backgroundHighlightedButton, Control::State::HIGH_LIGHTED);
        controlButton->setTitleColorForState(Color3B::WHITE, Control::State::HIGH_LIGHTED);
        
        controlButton->setAnchorPoint(Vec2(0.5f, 1));
        controlButton->setPosition(screenSize.width / 2.0f, screenSize.height / 2.0f);
        addChild(controlButton, 1);

        // Add the black background
        auto background = ui::Scale9Sprite::create("extensions/buttonBackground.png");
        background->setContentSize(Size(300, 170));
        background->setPosition(screenSize.width / 2.0f, screenSize.height / 2.0f);
        addChild(background);
        
        // Sets up event handlers
        controlButton->addTargetWithActionForControlEvents(this, cccontrol_selector(ControlButtonTest_Event::touchDownAction), Control::EventType::TOUCH_DOWN);
        controlButton->addTargetWithActionForControlEvents(this, cccontrol_selector(ControlButtonTest_Event::touchDragInsideAction), Control::EventType::DRAG_INSIDE);
        controlButton->addTargetWithActionForControlEvents(this, cccontrol_selector(ControlButtonTest_Event::touchDragOutsideAction), Control::EventType::DRAG_OUTSIDE);
        controlButton->addTargetWithActionForControlEvents(this, cccontrol_selector(ControlButtonTest_Event::touchDragEnterAction), Control::EventType::DRAG_ENTER);
        controlButton->addTargetWithActionForControlEvents(this, cccontrol_selector(ControlButtonTest_Event::touchDragExitAction), Control::EventType::DRAG_EXIT);
        controlButton->addTargetWithActionForControlEvents(this, cccontrol_selector(ControlButtonTest_Event::touchUpInsideAction), Control::EventType::TOUCH_UP_INSIDE);
        controlButton->addTargetWithActionForControlEvents(this, cccontrol_selector(ControlButtonTest_Event::touchUpOutsideAction), Control::EventType::TOUCH_UP_OUTSIDE);
        controlButton->addTargetWithActionForControlEvents(this, cccontrol_selector(ControlButtonTest_Event::touchCancelAction), Control::EventType::TOUCH_CANCEL);
        // test for issue 2882
        controlButton->addTargetWithActionForControlEvents(this, cccontrol_selector(ControlButtonTest_Event::touchBitmaskAction),
            Control::EventType::TOUCH_DOWN | Control::EventType::DRAG_INSIDE | Control::EventType::DRAG_OUTSIDE | Control::EventType::DRAG_ENTER | Control::EventType::DRAG_EXIT | Control::EventType::TOUCH_UP_INSIDE | Control::EventType::TOUCH_UP_OUTSIDE | Control::EventType::TOUCH_CANCEL | Control::EventType::VALUE_CHANGED);

        return true;
    }
    return false;
}
开发者ID:asuo1986,项目名称:own,代码行数:57,代码来源:CCControlButtonTest.cpp

示例6: init

// on "init" you need to initialize your instance
bool HelloWorld::init()
{
    //////////////////////////////
    // 1. super init first
    if ( !Layer::init() )
    {
        return false;
    }
    
    Size visibleSize = Director::getInstance()->getVisibleSize();
//    Point origin = Director::getInstance()->getVisibleOrigin();

    /////////////////////////////
    // 2. add a menu item with "X" image, which is clicked to quit the program
    //    you may modify it.

    // add a "close" icon to exit the progress. it's an autorelease object
    auto closeItem = MenuItemImage::create(
                                           "CloseNormal.png",
                                           "CloseSelected.png",
                                           CC_CALLBACK_1(HelloWorld::menuCloseCallback, this));
    closeItem->setAnchorPoint(Point(1, 0));
    closeItem->setPosition(Point(visibleSize.width, 0));
    // create menu, it's an autorelease object
    auto menu = Menu::create(closeItem, NULL);
    menu->setPosition(Point::ZERO);
    this->addChild(menu, 1);
    
    ControlButton* ccbBtn = ControlButton::create("CCB Test", "", 50);
    ccbBtn->setPosition(visibleSize.width * 0.5f, visibleSize.height * 0.6);
    ccbBtn->addTargetWithActionForControlEvents(this, cccontrol_selector(HelloWorld::onCCBTestButtonClicked), Control::EventType::TOUCH_UP_INSIDE);
    addChild(ccbBtn);
    
    ControlButton* matchBtn = ControlButton::create("Match Server Test", "", 50);
    matchBtn->setPosition(visibleSize.width * 0.5f, visibleSize.height * 0.4);
    matchBtn->addTargetWithActionForControlEvents(this, cccontrol_selector(HelloWorld::onMatchTestButtonClicked), Control::EventType::TOUCH_UP_INSIDE);
    addChild(matchBtn);
    
    return true;
}
开发者ID:FootBallX,项目名称:FootBallXClient,代码行数:41,代码来源:HelloWorldScene.cpp

示例7: init

bool LoginScene::init()
{
    if (!Layer::init())
        return false;
    Size winSize = Director::getInstance()->getWinSize();

    auto pBckSprite = Scale9Sprite::create("green_edit.png");
    addChild(pBckSprite);
    pBckSprite->setPosition(Vec2(winSize.width / 2, winSize.height / 2 + 25));
    pBckSprite->setContentSize(Size(winSize.width / 2, 35));

    m_txtUserName = ui::TextField::create(StringResUtil::instance()->getStringForKey("username"), "Arial",30);
    
    m_txtUserName->setPlaceHolderColor(Color4B::WHITE);
    m_txtUserName->setTextColor(Color4B::WHITE);
    addChild(m_txtUserName);
    m_txtUserName->setPosition(Vec2(winSize.width / 2, winSize.height / 2 + 25));

    auto pPwdBckSprite = Scale9Sprite::create("green_edit.png");
    addChild(pPwdBckSprite);
    pPwdBckSprite->setPosition(Vec2(winSize.width / 2, winSize.height / 2 - 25));
    pPwdBckSprite->setContentSize(Size(winSize.width / 2, 35));

    m_txtPassword = ui::TextField::create(StringResUtil::instance()->getStringForKey("password"), "Arial",30);
    m_txtPassword->setPlaceHolderColor(Color4B::WHITE);
    m_txtPassword->setTextColor(Color4B::WHITE);
    m_txtPassword->setPasswordEnabled(true);
    addChild(m_txtPassword);
    m_txtPassword->setPosition(Vec2(winSize.width / 2, winSize.height / 2 - 25));

    /*auto starMenuItem = MenuItemImage::create(
        "button.png",
        "button.png", CC_CALLBACK_1(LoginScene::starMenuCallback, this));
    starMenuItem->setPosition(Point::ZERO);
    starMenuItem->setContentSize(Size(80, 30));
    auto starMenu = Menu::create(starMenuItem, NULL);
    starMenu->setPosition(Point(winSize.width / 2, winSize.height / 2 - 80));
    this->addChild(starMenu, 1);*/

    LabelTTF *label = LabelTTF::create("login", "Marker Felt", 30);
    Scale9Sprite *normalBck = Scale9Sprite::create("button.png");
    ControlButton *button = ControlButton::create(label, normalBck);
    button->setContentSize(Size(80, 30));
    button->setPosition(Point(winSize.width / 2, winSize.height / 2 - 80));
    button->addTargetWithActionForControlEvents(this, cccontrol_selector(LoginScene::touchDown), Control::EventType::TOUCH_DOWN);
    addChild(button);
    return true;
}
开发者ID:yangyong3108,项目名称:project-001,代码行数:48,代码来源:LoginScene.cpp

示例8: init

bool UndercoverGameScene::init()
{
    if ( !Layer::init() )
    {
        return false;
    }
    Size visibleSize = Director::getInstance()->getVisibleSize();
    Vec2 origin = Director::getInstance()->getVisibleOrigin();
    ControlButton* back = ControlButton::create("Back", "Arial", 40);
    back->addTargetWithActionForControlEvents(this, cccontrol_selector(UndercoverGameScene::buttonBack), Control::EventType::TOUCH_UP_INSIDE);
    back->setAnchorPoint(Point(0.5,0.5));
    back->setZoomOnTouchDown(true);
    back->setPosition(Vec2(visibleSize.width - 100,
                           visibleSize.height - 100));
    this->addChild(back, 1);
    return true;
}
开发者ID:LLF,项目名称:boardgameking-client,代码行数:17,代码来源:UndercoverGameScene.cpp

示例9: createBtn

ControlButton * createBtn(float x, float y, 
                          const char * normalBg, const char * pressBg, 
                          Ref* target, Control::Handler action)
{
    Scale9Sprite * spNormalBg = createDotaScale9Sprite(normalBg);
    Scale9Sprite * spPressBg = createDotaScale9Sprite(pressBg);

    ControlButton *btn = ControlButton::create(spNormalBg);
    if (spPressBg)
        btn->setBackgroundSpriteForState(spPressBg, Control::State::HIGH_LIGHTED);
    btn->setAnchorPoint(Vec2(0, 0));
    btn->setPosition(x, y);
    btn->setZoomOnTouchDown(false);
    btn->setPreferredSize(spNormalBg->getOriginalSize());
    if (target && action)
        btn->addTargetWithActionForControlEvents(target, action, 
            Control::EventType::TOUCH_UP_INSIDE);

    return btn;
}
开发者ID:Danewalker,项目名称:DotaSkeletonAnim,代码行数:20,代码来源:Utils.cpp

示例10: init

bool CGamePanelLayer::init()
{
    do
    {
        BREAK_IF(!Layer::init());
        
        ControlButton* btnBuild = CBaseLayer::createImageButton("huds/build.png");
        BREAK_IF(!btnBuild);
        btnBuild->setPosition(Point(240, 50));
        btnBuild->addTargetWithActionForControlEvents(this, cccontrol_selector(CGamePanelLayer::onBuild), Control::EventType::TOUCH_UP_INSIDE);
        addChild(btnBuild);
        
//        ControlButton* btnBuild2 = CBaseLayer::createImageButton("build");
//        BREAK_IF(!btnBuild2);
//        btnBuild2->setPosition(Point(270, 50));
//        btnBuild2->addTargetWithActionForControlEvents(this, cccontrol_selector(CGamePanelLayer::onBuild2), CCControlEventTouchUpInside);
//        addChild(btnBuild2);
        return true;
    } while (false);
    
    return false;
}
开发者ID:Gamex,项目名称:GameX,代码行数:22,代码来源:CGamePanelLayer.cpp

示例11: init

// 初始化
bool ChangeBGScene::init()
{
    if (!Layer::init())
    {
        return false;
    }
    Size mysize = Director::getInstance()->getVisibleSize();
    Vec2 origin = Director::getInstance()->getVisibleOrigin();

    //文字提示
    Sprite *lb = Sprite::create("changbg.png");
    lb->setPosition(Vec2(origin.x + mysize.width / 2, origin.y + mysize.height - 30));
    this->addChild(lb, 2);

    //四张背景图
    //1
    Scale9Sprite *sp1 = Scale9Sprite::create("11.png");
    ControlButton *pbt1 = ControlButton::create(sp1);
    pbt1->setPosition(Vec2(origin.x + mysize.width / 2 - 80, origin.y + mysize.height / 2 + 20));
    pbt1->setPreferredSize(Size(150, 84));
    this->addChild(pbt1, 2, 6001);
    //绑定事件
    pbt1->addTargetWithActionForControlEvents(
        this,
        cccontrol_selector(ChangeBGScene::changeBG),
        Control::EventType::TOUCH_UP_INSIDE);
    //2
    Scale9Sprite *sp2 = Scale9Sprite::create("22.png");
    ControlButton *pbt2 = ControlButton::create(sp2);
    pbt2->setPosition(Vec2(origin.x + mysize.width / 2 + 80, origin.y + mysize.height / 2 + 20));
    pbt2->setPreferredSize(Size(150, 84));
    this->addChild(pbt2, 2, 6002);
    //绑定事件
    pbt2->addTargetWithActionForControlEvents(
        this,
        cccontrol_selector(ChangeBGScene::changeBG),
        Control::EventType::TOUCH_UP_INSIDE);
    //3
    Scale9Sprite *sp3 = Scale9Sprite::create("33.png");
    ControlButton *pbt3 = ControlButton::create(sp3);
    pbt3->setPosition(Vec2(origin.x + mysize.width / 2 - 80, origin.y + mysize.height / 2 - 80));
    pbt3->setPreferredSize(Size(150, 84));
    this->addChild(pbt3, 2, 6003);
    //绑定事件
    pbt3->addTargetWithActionForControlEvents(
        this,
        cccontrol_selector(ChangeBGScene::changeBG),
        Control::EventType::TOUCH_UP_INSIDE);
    //4
    Scale9Sprite *sp4 = Scale9Sprite::create("44.png");
    ControlButton *pbt4 = ControlButton::create(sp4);
    pbt4->setPosition(Vec2(origin.x + mysize.width / 2 + 80, origin.y + mysize.height / 2 - 80));
    pbt4->setPreferredSize(Size(150, 84));
    this->addChild(pbt4, 2, 6004);
    //绑定事件
    pbt4->addTargetWithActionForControlEvents(
        this,
        cccontrol_selector(ChangeBGScene::changeBG),
        Control::EventType::TOUCH_UP_INSIDE);

    //返回菜单
    Scale9Sprite *spbk = Scale9Sprite::create("return.png");
    ControlButton *pbtbk = ControlButton::create(spbk);
    pbtbk->setPosition(Vec2(origin.x + mysize.width - 20, origin.y + mysize.height - 20));
    pbtbk->setPreferredSize(Size(36, 36));
    this->addChild(pbtbk, 2);
    //绑定事件
    pbtbk->addTargetWithActionForControlEvents(
        this,
        cccontrol_selector(ChangeBGScene::backToMenu),
        Control::EventType::TOUCH_UP_INSIDE);

    return true;
}
开发者ID:wangzhenGitHup,项目名称:cocos2d-xGame,代码行数:75,代码来源:ChangeBG.cpp

示例12: init

// 初始化
bool RankScene::init()
{
    if (!Layer::init())
    {
        return false;
    }

    selected = 3001;
    opt = "easy";
    scheduleUpdate();

    Size mysize = Director::getInstance()->getVisibleSize();
    Vec2 origin = Director::getInstance()->getVisibleOrigin();

    //背景图片
    Sprite *pbg = Sprite::create("rank_bg.png");
    pbg->setPosition(Vec2(origin.x + mysize.width / 2, origin.y + mysize.height / 2));
    this->addChild(pbg, -1);

    //返回按钮
    Scale9Sprite *spback = Scale9Sprite::create("close.png");
    ControlButton *pbtbk = ControlButton::create(spback);
    pbtbk->setPosition(Vec2(origin.x + mysize.width - 20, origin.y + mysize.height - 25));
    pbtbk->setPreferredSize(Size(36, 36));
    pbtbk->addTargetWithActionForControlEvents(
        this,
        cccontrol_selector(RankScene::backToMenu),
        Control::EventType::TOUCH_UP_INSIDE);
    this->addChild(pbtbk);

    //rank_easy , tag = 3001
    Scale9Sprite *speasy = Scale9Sprite::create("easy.png");
    ControlButton *rkeasy = ControlButton::create(speasy);
    rkeasy->setPosition(Vec2(origin.x + 40, origin.y + mysize.height / 2 + 50));
    rkeasy->setPreferredSize(Size(75, 50));
    rkeasy->addTargetWithActionForControlEvents(
        this,
        cccontrol_selector(RankScene::showRank),
        Control::EventType::TOUCH_UP_INSIDE);
    this->addChild(rkeasy, 1, 3001);

    //rank_normal , tag = 3002
    Scale9Sprite *spnormal = Scale9Sprite::create("normal.png");
    ControlButton *rknormal = ControlButton::create(spnormal);
    rknormal->setPosition(Vec2(origin.x + 40, origin.y + mysize.height / 2 - 20));
    rknormal->setPreferredSize(Size(75, 50));
    rknormal->addTargetWithActionForControlEvents(
        this,
        cccontrol_selector(RankScene::showRank),
        Control::EventType::TOUCH_UP_INSIDE);
    this->addChild(rknormal, 1, 3002);

    //rank_hard tag = 3003
    Scale9Sprite *sphard = Scale9Sprite::create("hard.png");
    ControlButton *rkhard = ControlButton::create(sphard);
    rkhard->setPosition(Vec2(origin.x + 40, origin.y + mysize.height / 2 - 90));
    rkhard->setPreferredSize(Size(75, 50));
    rkhard->addTargetWithActionForControlEvents(
        this,
        cccontrol_selector(RankScene::showRank),
        Control::EventType::TOUCH_UP_INSIDE);
    this->addChild(rkhard, 1, 3003);

    TableView * tbeasy = TableView::create(this, Size(360, 200));
    tbeasy->setDirection(ScrollView::Direction::VERTICAL);
    tbeasy->setPosition(Vec2(origin.x + 90, origin.y + 15));
    tbeasy->setDelegate(this);
    tbeasy->setVerticalFillOrder(TableView::VerticalFillOrder::TOP_DOWN);
    this->addChild(tbeasy, 1, 3005);

    return true;
}
开发者ID:PhamDinhTri,项目名称:Cocos_Sudoku,代码行数:73,代码来源:Rank.cpp


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