本文整理汇总了C++中LLParcel::getParcelFlagAllowVoice方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcel::getParcelFlagAllowVoice方法的具体用法?C++ LLParcel::getParcelFlagAllowVoice怎么用?C++ LLParcel::getParcelFlagAllowVoice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcel
的用法示例。
在下文中一共展示了LLParcel::getParcelFlagAllowVoice方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
mCheckSoundLocal->set( parcel->getSoundLocal() );
mCheckSoundLocal->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());
mMusicURLEdit->setText(parcel->getMusicURL());
mMusicURLEdit->setEnabled( can_change_media );
BOOL can_change_av_sounds = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS) && parcel->getHaveNewParcelLimitData();
mCheckAVSoundAny->set(parcel->getAllowAnyAVSounds());
mCheckAVSoundAny->setEnabled(can_change_av_sounds);
mCheckAVSoundGroup->set(parcel->getAllowGroupAVSounds() || parcel->getAllowAnyAVSounds()); // On if "Everyone" is on
mCheckAVSoundGroup->setEnabled(can_change_av_sounds && !parcel->getAllowAnyAVSounds()); // Enabled if "Everyone" is off
}
}
示例3: 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 );
}
}
示例4: refresh
//.........这里部分代码省略.........
{
no_scripts = TRUE;
}
if (no_scripts)
{
// No scripts
childSetVisible("no_scripts", TRUE);
childGetRect( "no_scripts", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "no_scripts", r );
x += buttonRect.getWidth();
}
else
{
// Yes scripts
childSetVisible("no_scripts", FALSE);
}
BOOL no_region_push = (region && region->getRestrictPushObject());
BOOL no_push = no_region_push || (parcel && parcel->getRestrictPushObject());
if (no_push)
{
childSetVisible("restrictpush", TRUE);
childGetRect( "restrictpush", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "restrictpush", r );
x += buttonRect.getWidth();
}
else
{
childSetVisible("restrictpush", FALSE);
}
BOOL have_voice = parcel && parcel->getParcelFlagAllowVoice();
if (have_voice)
{
childSetVisible("status_no_voice", FALSE);
}
else
{
childSetVisible("status_no_voice", TRUE);
childGetRect( "status_no_voice", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "status_no_voice", r );
x += buttonRect.getWidth();
}
// TODO: disable buy land button when connected to non-SL grids
// that don't support currency.
// TODO: make this brandable -- MC
BOOL canBuyLand = parcel
&& !parcel->isPublic()
&& LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, false);
childSetVisible("buyland", canBuyLand);
if (canBuyLand)
{
//HACK: layout tweak until this is all xml
x += 9;
childGetRect( "buyland", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "buyland", r );
x += buttonRect.getWidth();
}
std::string location_name;
if (region)
示例5: refresh
//.........这里部分代码省略.........
{
no_scripts = TRUE;
}
if (no_scripts)
{
// No scripts
childSetVisible("no_scripts", TRUE);
childGetRect( "no_scripts", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "no_scripts", r );
x += buttonRect.getWidth();
}
else
{
// Yes scripts
childSetVisible("no_scripts", FALSE);
}
BOOL no_region_push = (region && region->getRestrictPushObject());
BOOL no_push = no_region_push || (parcel && parcel->getRestrictPushObject());
if (no_push)
{
childSetVisible("restrictpush", TRUE);
childGetRect( "restrictpush", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "restrictpush", r );
x += buttonRect.getWidth();
}
else
{
childSetVisible("restrictpush", FALSE);
}
BOOL have_voice = parcel && parcel->getParcelFlagAllowVoice();
if (have_voice)
{
childSetVisible("status_no_voice", FALSE);
}
else
{
childSetVisible("status_no_voice", TRUE);
childGetRect( "status_no_voice", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "status_no_voice", r );
x += buttonRect.getWidth();
}
bool no_see_avs = parcel && !parcel->getSeeAVs();
childSetVisible("status_SeeAV", no_see_avs);
if (no_see_avs)
{
childGetRect( "status_SeeAV", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "status_SeeAV", r );
x += buttonRect.getWidth();
}
if (region)
{
bool pf_disabled = !region->dynamicPathfindingEnabled();
getChild<LLUICtrl>("pf_dirty")->setVisible(!pf_disabled && mIsNavMeshDirty);
getChild<LLUICtrl>("pf_disabled")->setVisible(pf_disabled);
const std::string pf_icon = pf_disabled ? "pf_disabled" : mIsNavMeshDirty ? "pf_dirty" : "";
if (!pf_icon.empty())
{
x += 6;
示例6: refresh
//.........这里部分代码省略.........
{
no_scripts = TRUE;
}
if (no_scripts)
{
// No scripts
childSetVisible("no_scripts", TRUE);
childGetRect( "no_scripts", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "no_scripts", r );
x += buttonRect.getWidth();
}
else
{
// Yes scripts
childSetVisible("no_scripts", FALSE);
}
BOOL no_region_push = (region && region->getRestrictPushObject());
BOOL no_push = no_region_push || (parcel && parcel->getRestrictPushObject());
if (no_push)
{
childSetVisible("restrictpush", TRUE);
childGetRect( "restrictpush", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "restrictpush", r );
x += buttonRect.getWidth();
}
else
{
childSetVisible("restrictpush", FALSE);
}
BOOL have_voice = parcel && parcel->getParcelFlagAllowVoice();
if (have_voice)
{
childSetVisible("status_no_voice", FALSE);
}
else
{
childSetVisible("status_no_voice", TRUE);
childGetRect( "status_no_voice", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "status_no_voice", r );
x += buttonRect.getWidth();
}
BOOL canBuyLand = parcel
&& !parcel->isPublic()
&& LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, false);
childSetVisible("buyland", canBuyLand);
if (canBuyLand)
{
//HACK: layout tweak until this is all xml
x += 9;
childGetRect( "buyland", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "buyland", r );
x += buttonRect.getWidth();
}
std::string location_name;
if (region)
{
const LLVector3& agent_pos_region = gAgent.getPositionAgent();
S32 pos_x = lltrunc( agent_pos_region.mV[VX] );
示例7: refresh
//.........这里部分代码省略.........
}
if ((region
&& (region->getRegionFlag(REGION_FLAGS_SKIP_SCRIPTS)
|| region->getRegionFlag(REGION_FLAGS_ESTATE_SKIP_SCRIPTS)))
|| (parcel && !parcel->getAllowOtherScripts()))
{
// No scripts
mNoScripts->setVisible(true);
const LLRect& buttonRect(mNoScripts->getRect());
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
mNoScripts->setRect(r);
x += buttonRect.getWidth();
}
else
{
// Yes scripts
mNoScripts->setVisible(false);
}
if ((region && region->getRestrictPushObject()) || (parcel && parcel->getRestrictPushObject()))
{
mRestrictPush->setVisible(true);
const LLRect& buttonRect(mRestrictPush->getRect());
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
mRestrictPush->setRect(r);
x += buttonRect.getWidth();
}
else
{
mRestrictPush->setVisible(false);
}
if (parcel && parcel->getParcelFlagAllowVoice())
{
mStatusNoVoice->setVisible(false);
}
else
{
mStatusNoVoice->setVisible(true);
const LLRect& buttonRect(mStatusNoVoice->getRect());
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
mStatusNoVoice->setRect(r);
x += buttonRect.getWidth();
}
if (parcel && !parcel->getSeeAVs())
{
mStatusSeeAV->setVisible(true);
const LLRect& buttonRect(mStatusSeeAV->getRect());
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
mStatusSeeAV->setRect(r);
x += buttonRect.getWidth();
}
else mStatusSeeAV->setVisible(false);
if (region)
{
bool pf_disabled = !region->dynamicPathfindingEnabled();
mPFDirty->setVisible(!pf_disabled && mIsNavMeshDirty);
mPFDisabled->setVisible(pf_disabled);
if (LLView* pf_icon = pf_disabled ? mPFDisabled : mIsNavMeshDirty ? mPFDirty : NULL)
{
x += 6;
const LLRect& buttonRect(pf_icon->getRect());
r.setOriginAndSize(x, y, buttonRect.getWidth(), buttonRect.getHeight());