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


C++ LLPanel::setMakeVisibleControlVariable方法代码示例

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


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

示例1: onToggleShowMinimap

// Checked: 2010-02-28 (RLVa-1.4.0a) | Added: RLVa-1.2.0a
void RlvUIEnabler::onToggleShowMinimap()
{
    bool fEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP);

    // Start or stop filtering showing the mini-map floater
    if (!fEnable)
        addGenericFloaterFilter("mini_map");
    else
        removeGenericFloaterFilter("mini_map");

    // Hide the mini-map floater if it's currently visible (or restore it if it was previously visible)
    static bool fPrevVisibile = false;
    if ( (!fEnable) && ((fPrevVisibile = LLFloaterReg::instanceVisible("mini_map"))) )
        LLFloaterReg::hideInstance("mini_map");
    else if ( (fEnable) && (fPrevVisibile) )
        LLFloaterReg::showInstance("mini_map");

    // Break/reestablish the visibility connection for the nearby people panel embedded minimap instance
    LLPanel* pPeoplePanel = LLFloaterSidePanelContainer::getPanel("people", "panel_people");
    LLPanel* pNetMapPanel = (pPeoplePanel) ? pPeoplePanel->getChild<LLPanel>("minimaplayout", TRUE) : NULL;  //AO: firestorm specific
    RLV_ASSERT( (pPeoplePanel) && (pNetMapPanel) );
    if (pNetMapPanel)
    {
        pNetMapPanel->setMakeVisibleControlVariable( (fEnable) ? gSavedSettings.getControl("ShowRadarMinimap").get() : NULL);
        // Reestablishing the visiblity connection will show the panel if needed so we only need to take care of hiding it when needed
        if ( (!fEnable) && (pNetMapPanel->getVisible()) )
            pNetMapPanel->setVisible(false);
    }

    // Break/reestablish the visibility connection for the radar panel embedded minimap instance
    LLFloater* pRadarFloater = LLFloaterReg::getInstance("fs_radar");
    LLPanel* pRadarNetMapPanel = (pRadarFloater) ? pRadarFloater->getChild<LLPanel>("minimaplayout", TRUE) : NULL;  //AO: firestorm specific
    RLV_ASSERT( (pRadarFloater) && (pRadarNetMapPanel) );
    if (pRadarNetMapPanel)
    {
        pRadarNetMapPanel->setMakeVisibleControlVariable( (fEnable) ? gSavedSettings.getControl("ShowRadarMinimap").get() : NULL);
        // Reestablishing the visiblity connection will show the panel if needed so we only need to take care of hiding it when needed
        if ( (!fEnable) && (pRadarNetMapPanel->getVisible()) )
            pRadarNetMapPanel->setVisible(false);
    }
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:42,代码来源:rlvui.cpp


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