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


C++ DynamicRibbonWidget::setText方法代码示例

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


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

示例1: buildTrackList


//.........这里部分代码省略.........
                if(!curr->isSoccer()                     ||
                  (!(curr->hasNavMesh()                  ||
                  race_manager->getNumLocalPlayers() > 1 ||
                  UserConfigParams::m_artist_debug_mode)))
                {
                    if (curr->isSoccer())
                        m_unsupported_arena.insert(n);
                    continue;
                }
            }
            else
            {
                if(curr->isArena() && curr->hasNavMesh() && !arenas_have_navmesh)
                    arenas_have_navmesh = true;

                if(!curr->isArena()                      ||
                  (!(curr->hasNavMesh()                  ||
                  race_manager->getNumLocalPlayers() > 1 ||
                  UserConfigParams::m_artist_debug_mode)))
                {
                    if (curr->isArena())
                        m_unsupported_arena.insert(n);
                    continue;
                }
            }

            if (PlayerManager::getCurrentPlayer()->isLocked(curr->getIdent()))
            {
                w->addItem( _("Locked : solve active challenges to gain access to more!"),
                           "locked", curr->getScreenshotFile(), LOCKED_BADGE );
            }
            else
            {
                w->addItem( translations->fribidize(curr->getName()), curr->getIdent(), curr->getScreenshotFile(), 0,
                           IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
            }
        }

    }
    else
    {
        const std::vector<int>& currArenas = track_manager->getArenasInGroup(curr_group_name, soccer_mode);
        const int track_amount = (int)currArenas.size();

        for (int n=0; n<track_amount; n++)
        {
            Track* curr = track_manager->getTrack(currArenas[n]);
            if (soccer_mode)
            {
                if(curr->isSoccer() && curr->hasNavMesh() && !arenas_have_navmesh)
                    arenas_have_navmesh = true;

                if(!curr->isSoccer()                     ||
                  (!(curr->hasNavMesh()                  ||
                  race_manager->getNumLocalPlayers() > 1 ||
                  UserConfigParams::m_artist_debug_mode)))
                {
                    if (curr->isSoccer())
                        m_unsupported_arena.insert(currArenas[n]);
                    continue;
                }
            }
            else
            {
                if(curr->isArena() && curr->hasNavMesh() && !arenas_have_navmesh)
                    arenas_have_navmesh = true;

                if(!curr->isArena()                      ||
                  (!(curr->hasNavMesh()                  ||
                  race_manager->getNumLocalPlayers() > 1 ||
                  UserConfigParams::m_artist_debug_mode)))
                {
                    if (curr->isArena())
                        m_unsupported_arena.insert(currArenas[n]);
                    continue;
                }
            }

            if (PlayerManager::getCurrentPlayer()->isLocked(curr->getIdent()))
            {
                w->addItem( _("Locked : solve active challenges to gain access to more!"),
                           "locked", curr->getScreenshotFile(), LOCKED_BADGE );
            }
            else
            {
                w->addItem( translations->fribidize(curr->getName()), curr->getIdent(), curr->getScreenshotFile(), 0,
                           IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
            }
        }
    }
    if (arenas_have_navmesh || race_manager->getNumLocalPlayers() > 1 ||
        UserConfigParams::m_artist_debug_mode)
        w->addItem(_("Random Arena"), "random_track", "/gui/icons/track_random.png");
    w->updateItemDisplay();

    if (m_unsupported_arena.size() > 0)
        w->setText( _P("%d arena unavailable in single player.",
                       "%d arenas unavailable in single player.",
                       (int)m_unsupported_arena.size()) );
}
开发者ID:devnexen,项目名称:stk-code,代码行数:101,代码来源:arenas_screen.cpp


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