本文整理汇总了C++中LLParcel::getObscureMusic方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcel::getObscureMusic方法的具体用法?C++ LLParcel::getObscureMusic怎么用?C++ LLParcel::getObscureMusic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcel
的用法示例。
在下文中一共展示了LLParcel::getObscureMusic方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refresh
// public
void LLPanelLandAudio::refresh()
{
LLParcel *parcel = mParcel->getParcel();
if (!parcel)
{
clearCtrls();
}
else
{
// something selected, hooray!
// Display options
BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
mCheckSoundLocal->set( parcel->getSoundLocal() );
mCheckSoundLocal->setEnabled( can_change_media );
mMusicUrlCheck->set( parcel->getObscureMusic() );
mMusicUrlCheck->setEnabled( can_change_media );
bool allow_voice = parcel->getParcelFlagAllowVoice();
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if (region && region->isVoiceEnabled())
{
mCheckEstateDisabledVoice->setVisible(false);
mCheckParcelEnableVoice->setVisible(true);
mCheckParcelEnableVoice->setEnabled( can_change_media );
mCheckParcelEnableVoice->set(allow_voice);
mCheckParcelVoiceLocal->setEnabled( can_change_media && allow_voice );
}
else
{
// Voice disabled at estate level, overrides parcel settings
// Replace the parcel voice checkbox with a disabled one
// labelled with an explanatory message
mCheckEstateDisabledVoice->setVisible(true);
mCheckParcelEnableVoice->setVisible(false);
mCheckParcelEnableVoice->setEnabled(false);
mCheckParcelVoiceLocal->setEnabled(false);
}
mCheckParcelEnableVoice->set(allow_voice);
mCheckParcelVoiceLocal->set(!parcel->getParcelFlagUseEstateVoiceChannel());
// don't display urls if you're not able to change it
// much requested change in forums so people can't 'steal' urls
// NOTE: bug#2009 means this is still vunerable - however, bug
// should be closed since this bug opens up major security issues elsewhere.
bool obscure_music = ! can_change_media && parcel->getObscureMusic();
mMusicURLEdit->setDrawAsterixes(obscure_music);
mMusicURLEdit->setText(parcel->getMusicURL());
mMusicURLEdit->setEnabled( can_change_media );
}
}
示例2: refresh
// public
void LLPanelLandAudio::refresh()
{
LLParcel *parcel = mParcel->getParcel();
if (!parcel)
{
clearCtrls();
}
else
{
// something selected, hooray!
// Display options
BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
mMusicURLEdit->setText(parcel->getMusicURL());
mMusicURLEdit->setEnabled( can_change_media );
mMusicUrlCheck->set( parcel->getObscureMusic() );
mMusicUrlCheck->setEnabled( can_change_media );
bool obscure_music = ! can_change_media && parcel->getObscureMusic();
mMusicURLEdit->setDrawAsterixes( obscure_music );
mCheckSoundLocal->set( parcel->getSoundLocal() );
mCheckSoundLocal->setEnabled( can_change_media );
if(parcel->getParcelFlagAllowVoice())
{
if(parcel->getParcelFlagUseEstateVoiceChannel())
mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatEstate);
else
mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatPrivate);
}
else
{
mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatDisable);
}
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
mRadioVoiceChat->setEnabled( region && region->isVoiceEnabled() && can_change_media );
}
}