本文整理汇总了C++中closeFloater函数的典型用法代码示例。如果您正苦于以下问题:C++ closeFloater函数的具体用法?C++ closeFloater怎么用?C++ closeFloater使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了closeFloater函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: closeFloater
void LLFloaterBuyContents::onClickBuy()
{
// Make sure this wasn't selected through other mechanisms
// (ie, being the default button and pressing enter.
if(!getChildView("buy_btn")->getEnabled())
{
// We shouldn't be enabled. Just close.
closeFloater();
return;
}
// We may want to wear this item
if (getChild<LLUICtrl>("wear_check")->getValue())
{
LLInventoryState::sWearNewClothing = TRUE;
}
// Put the items where we put new folders.
LLUUID category_id;
category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_ROOT_INVENTORY);
// *NOTE: doesn't work for multiple object buy, which UI does not
// currently support sale info is used for verification only, if
// it doesn't match region info then sale is canceled.
LLSelectMgr::getInstance()->sendBuy(gAgent.getID(), category_id, mSaleInfo);
// NOTE: do this here instead of on receipt of object, since contents are transfered
// via a generic BulkUpdateInventory message with no way of distinguishing it from
// other inventory operations
LLFirstUse::newInventory();
closeFloater();
}
示例2: key
void LLFloaterEditSky::onSaveConfirmed()
{
// Save current params to the selected preset.
LLWLParamKey key(getSelectedSkyPreset());
LL_DEBUGS("Windlight") << "Saving sky preset " << key.name << LL_ENDL;
LLWLParamManager& wl_mgr = LLWLParamManager::instance();
if (wl_mgr.hasParamSet(key))
{
wl_mgr.setParamSet(key, wl_mgr.mCurParams);
}
else
{
wl_mgr.addParamSet(key, wl_mgr.mCurParams);
}
wl_mgr.savePreset(key);
// Change preference if requested.
if (mMakeDefaultCheckBox->getValue())
{
LL_DEBUGS("Windlight") << key.name << " is now the new preferred sky preset" << LL_ENDL;
LLEnvManagerNew::instance().setUseSkyPreset(key.name);
}
closeFloater();
}
示例3: saveSettings
// static
void LLFloaterPreference::onBtnOK()
{
// commit any outstanding text entry
if (hasFocus())
{
LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
if (cur_focus && cur_focus->acceptsTextInput())
{
cur_focus->onCommit();
}
}
if (canClose())
{
saveSettings();
apply();
closeFloater(false);
LLUIColorTable::instance().saveUserSettings();
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
// save all settings, even if equals defaults
gCrashSettings.saveToFile(crash_settings_filename, FALSE);
}
else
{
// Show beep, pop up dialog, etc.
llinfos << "Can't close preferences!" << llendl;
}
LLPanelLogin::refreshLocation( false );
}
示例4: setToolTip
void LLTextureCtrl::setEnabled( BOOL enabled )
{
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if( enabled )
{
std::string tooltip;
if (floaterp) tooltip = floaterp->getString("choose_picture");
setToolTip( tooltip );
}
else
{
setToolTip( std::string() );
// *TODO: would be better to keep floater open and show
// disabled state.
closeFloater();
}
if( floaterp )
{
floaterp->setActive(enabled);
}
mCaption->setEnabled( enabled );
mEnable = enabled;
// <edit>
/*
LLView::setEnabled( enabled );
*/
// </edit>
}
示例5: closeFloater
void LLInspectObject::onClickMoreInfo()
{
LLSD key;
key["task"] = "task";
LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
closeFloater();
}
示例6: FADE_TIME
// virtual
void LLInspect::draw()
{
static LLCachedControl<F32> FADE_TIME(*LLUI::sSettingGroups["config"], "InspectorFadeTime", 1.f);
static LLCachedControl<F32> STAY_TIME(*LLUI::sSettingGroups["config"], "InspectorShowTime", 1.f);
if (mOpenTimer.getStarted())
{
LLFloater::draw();
if (mOpenTimer.getElapsedTimeF32() > STAY_TIME)
{
mOpenTimer.stop();
mCloseTimer.start();
}
}
else if (mCloseTimer.getStarted())
{
F32 alpha = clamp_rescale(mCloseTimer.getElapsedTimeF32(), 0.f, FADE_TIME, 1.f, 0.f);
LLViewDrawContext context(alpha);
LLFloater::draw();
if (mCloseTimer.getElapsedTimeF32() > FADE_TIME)
{
closeFloater(false);
}
}
else
{
LLFloater::draw();
}
}
示例7: closeFloater
void LLFloaterBuyCurrencyUI::onClickErrorWeb()
{
LLWeb::loadURLExternal(mManager.errorURI());
closeFloater();
// Update L$ balance
LLStatusBar::sendMoneyBalanceRequest();
}
示例8: closeFloater
void LLInspectAvatar::onClickCSR()
{
std::string name;
gCacheName->getFullName(mAvatarID, name);
LLAvatarActions::csr(mAvatarID, name);
closeFloater();
}
示例9: closeFloater
void LLInspectGroup::requestUpdate()
{
// Don't make network requests when spawning from the debug menu at the
// login screen (which is useful to work on the layout).
if (mGroupID.isNull())
{
if (LLStartUp::getStartupState() >= STATE_STARTED)
{
// once we're running we don't want to show the test floater
// for bogus LLUUID::null links
closeFloater();
}
return;
}
// Clear out old data so it doesn't flash between old and new
getChild<LLUICtrl>("group_name")->setValue("");
getChild<LLUICtrl>("group_subtitle")->setValue("");
getChild<LLUICtrl>("group_details")->setValue("");
getChild<LLUICtrl>("group_cost")->setValue("");
// Must have a visible button so the inspector can take focus
getChild<LLUICtrl>("view_profile_btn")->setVisible(true);
getChild<LLUICtrl>("leave_btn")->setVisible(false);
getChild<LLUICtrl>("join_btn")->setVisible(false);
// Make a new request for properties
delete mPropertiesRequest;
mPropertiesRequest = new LLFetchGroupData(mGroupID, this);
// Name lookup will be faster out of cache, use that
gCacheName->getGroup(mGroupID,
boost::bind(&LLInspectGroup::nameUpdatedCallback,
this, _1, _2, _3));
}
示例10: setVisible
void LLFloaterColorPicker::showUI ()
{
setVisible ( TRUE );
setFocus ( TRUE );
openFloater(getKey());
// HACK: if system color picker is required - close the SL one we made and use default system dialog
if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) )
{
LLColorSwatchCtrl* swatch = getSwatch ();
setVisible ( FALSE );
// code that will get switched in for default system color picker
if ( swatch )
{
LLColor4 curCol = swatch->get ();
send_agent_pause();
getWindow()->dialogColorPicker( &curCol [ 0 ], &curCol [ 1 ], &curCol [ 2 ] );
send_agent_resume();
setOrigRgb ( curCol [ 0 ], curCol [ 1 ], curCol [ 2 ] );
setCurRgb( curCol [ 0 ], curCol [ 1 ], curCol [ 2 ] );
LLColorSwatchCtrl::onColorChanged ( swatch, LLColorSwatchCtrl::COLOR_CHANGE );
}
closeFloater();
}
}
示例11: mute
void LLInspectRemoteObject::onClickBlock()
{
LLMute::EType mute_type = mGroupOwned ? LLMute::GROUP : LLMute::AGENT;
LLMute mute(mOwnerID, mOwner, mute_type);
LLMuteList::getInstance()->add(mute);
LLPanelBlockedList::showPanelAndSelect(mute.mID);
closeFloater();
}
示例12: closeFloater
void LLMultiFloater::tabClose()
{
if (mTabContainer->getTabCount() == 0)
{
// no more children, close myself
closeFloater();
}
}
示例13: closeFloater
void LLFloaterAuction::cleanupAndClose()
{
mImageID.setNull();
mImage = NULL;
mParcelID = -1;
mParcelHost.invalidate();
closeFloater();
}
示例14: closeFloater
void LLTextureCtrl::setVisible( BOOL visible )
{
if( !visible )
{
closeFloater();
}
LLUICtrl::setVisible( visible );
}
示例15: closeFloater
void LLInspectAvatar::requestUpdate()
{
// Don't make network requests when spawning from the debug menu at the
// login screen (which is useful to work on the layout).
if (mAvatarID.isNull())
{
if (LLStartUp::getStartupState() >= STATE_STARTED)
{
// once we're running we don't want to show the test floater
// for bogus LLUUID::null links
closeFloater();
}
return;
}
// Clear out old data so it doesn't flash between old and new
getChild<LLUICtrl>("user_name")->setValue("");
getChild<LLUICtrl>("user_subtitle")->setValue("");
getChild<LLUICtrl>("user_details")->setValue("");
// Make a new request for properties
delete mPropertiesRequest;
mPropertiesRequest = new LLFetchAvatarData(mAvatarID, this);
// You can't re-add someone as a friend if they are already your friend
bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarID) != NULL;
bool is_self = (mAvatarID == gAgentID);
if (is_self)
{
getChild<LLUICtrl>("add_friend_btn")->setVisible(false);
getChild<LLUICtrl>("im_btn")->setVisible(false);
}
else if (is_friend)
{
getChild<LLUICtrl>("add_friend_btn")->setVisible(false);
getChild<LLUICtrl>("im_btn")->setVisible(true);
}
else
{
getChild<LLUICtrl>("add_friend_btn")->setVisible(true);
getChild<LLUICtrl>("im_btn")->setVisible(false);
}
// Use an avatar_icon even though the image id will come down with the
// avatar properties because the avatar_icon code maintains a cache of icons
// and this may result in the image being visible sooner.
// *NOTE: This may generate a duplicate avatar properties request, but that
// will be suppressed internally in the avatar properties processor.
//remove avatar id from cache to get fresh info
LLAvatarIconIDCache::getInstance()->remove(mAvatarID);
childSetValue("avatar_icon", LLSD(mAvatarID) );
gCacheName->get(mAvatarID, FALSE,
boost::bind(&LLInspectAvatar::nameUpdatedCallback,
this, _1, _2, _3, _4));
}