本文整理汇总了C++中LLParcel::setMusicURL方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcel::setMusicURL方法的具体用法?C++ LLParcel::setMusicURL怎么用?C++ LLParcel::setMusicURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcel
的用法示例。
在下文中一共展示了LLParcel::setMusicURL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onCommitAny
// static
void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata)
{
LLPanelLandAudio *self = (LLPanelLandAudio *)userdata;
LLParcel* parcel = self->mParcel->getParcel();
if (!parcel)
{
return;
}
// Extract data from UI
BOOL sound_local = self->mCheckSoundLocal->get();
std::string music_url = self->mMusicURLEdit->getText();
U8 obscure_music = self->mMusicUrlCheck->get();
BOOL voice_enabled = self->mCheckParcelEnableVoice->get();
BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get();
// Remove leading/trailing whitespace (common when copying/pasting)
LLStringUtil::trim(music_url);
// Push data into current parcel
parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled);
parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan);
parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local);
parcel->setMusicURL(music_url);
parcel->setObscureMusic(obscure_music);
// Send current parcel data upstream to server
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
// Might have changed properties, so let's redraw!
self->refresh();
}
示例2: onCommitAny
// static
void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata)
{
LLPanelLandAudio *self = (LLPanelLandAudio *)userdata;
LLParcel* parcel = self->mParcel->getParcel();
if (!parcel)
{
return;
}
// Extract data from UI
BOOL sound_local = self->mCheckSoundLocal->get();
std::string music_url = self->mMusicURLEdit->getText();
BOOL voice_enabled = self->mCheckParcelEnableVoice->get();
BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get();
BOOL any_av_sound = self->mCheckAVSoundAny->get();
BOOL group_av_sound = TRUE; // If set to "Everyone" then group is checked as well
if (!any_av_sound)
{ // If "Everyone" is off, use the value from the checkbox
group_av_sound = self->mCheckAVSoundGroup->get();
}
// Remove leading/trailing whitespace (common when copying/pasting)
LLStringUtil::trim(music_url);
// Push data into current parcel
parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled);
parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan);
parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local);
parcel->setMusicURL(music_url);
parcel->setAllowAnyAVSounds(any_av_sound);
parcel->setAllowGroupAVSounds(group_av_sound);
// Send current parcel data upstream to server
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
// Might have changed properties, so let's redraw!
self->refresh();
}