本文整理汇总了C++中childSetValue函数的典型用法代码示例。如果您正苦于以下问题:C++ childSetValue函数的具体用法?C++ childSetValue怎么用?C++ childSetValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了childSetValue函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: childSetValue
void LLFloaterWindLight::syncMenu()
{
bool err;
LLWLParamManager * param_mgr = LLWLParamManager::instance();
LLWLParamSet& currentParams = param_mgr->mCurParams;
//std::map<std::string, LLVector4> & currentParams = param_mgr->mCurParams.mParamValues;
// blue horizon
param_mgr->mBlueHorizon = currentParams.getVector(param_mgr->mBlueHorizon.mName, err);
childSetValue("WLBlueHorizonR", param_mgr->mBlueHorizon.r / 2.0);
childSetValue("WLBlueHorizonG", param_mgr->mBlueHorizon.g / 2.0);
childSetValue("WLBlueHorizonB", param_mgr->mBlueHorizon.b / 2.0);
childSetValue("WLBlueHorizonI",
std::max(param_mgr->mBlueHorizon.r / 2.0,
std::max(param_mgr->mBlueHorizon.g / 2.0,
param_mgr->mBlueHorizon.b / 2.0)));
// haze density, horizon, mult, and altitude
param_mgr->mHazeDensity = currentParams.getVector(param_mgr->mHazeDensity.mName, err);
childSetValue("WLHazeDensity", param_mgr->mHazeDensity.r);
param_mgr->mHazeHorizon = currentParams.getVector(param_mgr->mHazeHorizon.mName, err);
childSetValue("WLHazeHorizon", param_mgr->mHazeHorizon.r);
param_mgr->mDensityMult = currentParams.getVector(param_mgr->mDensityMult.mName, err);
childSetValue("WLDensityMult", param_mgr->mDensityMult.x *
param_mgr->mDensityMult.mult);
param_mgr->mMaxAlt = currentParams.getVector(param_mgr->mMaxAlt.mName, err);
childSetValue("WLMaxAltitude", param_mgr->mMaxAlt.x);
// blue density
param_mgr->mBlueDensity = currentParams.getVector(param_mgr->mBlueDensity.mName, err);
childSetValue("WLBlueDensityR", param_mgr->mBlueDensity.r / 2.0);
childSetValue("WLBlueDensityG", param_mgr->mBlueDensity.g / 2.0);
childSetValue("WLBlueDensityB", param_mgr->mBlueDensity.b / 2.0);
childSetValue("WLBlueDensityI",
std::max(param_mgr->mBlueDensity.r / 2.0,
std::max(param_mgr->mBlueDensity.g / 2.0, param_mgr->mBlueDensity.b / 2.0)));
// Lighting
// sunlight
param_mgr->mSunlight = currentParams.getVector(param_mgr->mSunlight.mName, err);
childSetValue("WLSunlightR", param_mgr->mSunlight.r / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightG", param_mgr->mSunlight.g / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightB", param_mgr->mSunlight.b / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightI",
std::max(param_mgr->mSunlight.r / WL_SUN_AMBIENT_SLIDER_SCALE,
std::max(param_mgr->mSunlight.g / WL_SUN_AMBIENT_SLIDER_SCALE, param_mgr->mSunlight.b / WL_SUN_AMBIENT_SLIDER_SCALE)));
// glow
param_mgr->mGlow = currentParams.getVector(param_mgr->mGlow.mName, err);
childSetValue("WLGlowR", 2 - param_mgr->mGlow.r / 20.0f);
childSetValue("WLGlowB", -param_mgr->mGlow.b / 5.0f);
// ambient
param_mgr->mAmbient = currentParams.getVector(param_mgr->mAmbient.mName, err);
childSetValue("WLAmbientR", param_mgr->mAmbient.r / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientG", param_mgr->mAmbient.g / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientB", param_mgr->mAmbient.b / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientI",
std::max(param_mgr->mAmbient.r / WL_SUN_AMBIENT_SLIDER_SCALE,
std::max(param_mgr->mAmbient.g / WL_SUN_AMBIENT_SLIDER_SCALE, param_mgr->mAmbient.b / WL_SUN_AMBIENT_SLIDER_SCALE)));
childSetValue("WLSunAngle", param_mgr->mCurParams.getFloat("sun_angle",err) / F_TWO_PI);
childSetValue("WLEastAngle", param_mgr->mCurParams.getFloat("east_angle",err) / F_TWO_PI);
// Clouds
// Cloud Color
param_mgr->mCloudColor = currentParams.getVector(param_mgr->mCloudColor.mName, err);
childSetValue("WLCloudColorR", param_mgr->mCloudColor.r);
childSetValue("WLCloudColorG", param_mgr->mCloudColor.g);
childSetValue("WLCloudColorB", param_mgr->mCloudColor.b);
childSetValue("WLCloudColorI",
std::max(param_mgr->mCloudColor.r,
std::max(param_mgr->mCloudColor.g, param_mgr->mCloudColor.b)));
// Cloud
param_mgr->mCloudMain = currentParams.getVector(param_mgr->mCloudMain.mName, err);
childSetValue("WLCloudX", param_mgr->mCloudMain.r);
childSetValue("WLCloudY", param_mgr->mCloudMain.g);
childSetValue("WLCloudDensity", param_mgr->mCloudMain.b);
// Cloud Detail
param_mgr->mCloudDetail = currentParams.getVector(param_mgr->mCloudDetail.mName, err);
childSetValue("WLCloudDetailX", param_mgr->mCloudDetail.r);
childSetValue("WLCloudDetailY", param_mgr->mCloudDetail.g);
childSetValue("WLCloudDetailDensity", param_mgr->mCloudDetail.b);
// Cloud extras
param_mgr->mCloudCoverage = currentParams.getVector(param_mgr->mCloudCoverage.mName, err);
param_mgr->mCloudScale = currentParams.getVector(param_mgr->mCloudScale.mName, err);
childSetValue("WLCloudCoverage", param_mgr->mCloudCoverage.x);
childSetValue("WLCloudScale", param_mgr->mCloudScale.x);
// cloud scrolling
bool lockX = !param_mgr->mCurParams.getEnableCloudScrollX();
bool lockY = !param_mgr->mCurParams.getEnableCloudScrollY();
childSetValue("WLCloudLockX", lockX);
//.........这里部分代码省略.........
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:101,代码来源:llfloaterwindlight.cpp
示例2: childSetCommitCallback
BOOL LLFloaterWorldMap::postBuild()
{
mTabs = getChild<LLTabContainer>("maptab");
if (!mTabs) return FALSE;
LLPanel *panel;
panel = mTabs->getChild<LLPanel>("objects_mapview");
if (panel)
{
mTabs->setTabChangeCallback(panel, onCommitBackground);
mTabs->setTabUserData(panel, this);
}
panel = mTabs->getChild<LLPanel>("terrain_mapview");
if (panel)
{
mTabs->setTabChangeCallback(panel, onCommitBackground);
mTabs->setTabUserData(panel, this);
}
// The following callback syncs the worlmap tabs with the images.
// Commented out since it was crashing when LLWorldMap became a singleton.
// We should be fine without it but override the onOpen method and put it
// there if it turns out to be needed. -MG
//
//onCommitBackground((void*)this, false);
childSetCommitCallback("friend combo", onAvatarComboCommit, this);
LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
if (avatar_combo)
{
avatar_combo->selectFirstItem();
avatar_combo->setPrearrangeCallback( onAvatarComboPrearrange );
avatar_combo->setTextEntryCallback( onComboTextEntry );
}
childSetAction("DoSearch", onLocationCommit, this);
childSetFocusChangedCallback("location", onLocationFocusChanged, this);
LLLineEditor *location_editor = getChild<LLLineEditor>("location");
if (location_editor)
{
location_editor->setKeystrokeCallback( onSearchTextEntry );
}
childSetCommitCallback("search_results", onCommitSearchResult, this);
childSetDoubleClickCallback("search_results", onClickTeleportBtn);
childSetCommitCallback("spin x", onCommitLocation, this);
childSetCommitCallback("spin y", onCommitLocation, this);
childSetCommitCallback("spin z", onCommitLocation, this);
childSetCommitCallback("landmark combo", onLandmarkComboCommit, this);
LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");
if (landmark_combo)
{
landmark_combo->selectFirstItem();
landmark_combo->setPrearrangeCallback( onLandmarkComboPrearrange );
landmark_combo->setTextEntryCallback( onComboTextEntry );
}
childSetAction("Go Home", onGoHome, this);
childSetAction("Teleport", onClickTeleportBtn, this);
childSetAction("Show Destination", onShowTargetBtn, this);
childSetAction("Show My Location", onShowAgentBtn, this);
childSetAction("Clear", onClearBtn, this);
childSetAction("copy_slurl", onCopySLURL, this);
mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f);
childSetValue("zoom slider", LLWorldMapView::sMapScale);
setDefaultBtn(NULL);
mZoomTimer.stop();
return TRUE;
}
开发者ID:9skunks,项目名称:imprudence,代码行数:81,代码来源:llfloaterworldmap.cpp
示例3: childSetValue
void LLFloaterWorldMap::updateLocation()
{
bool gotSimName;
LLTracker::ETrackingStatus status = LLTracker::getTrackingStatus();
// These values may get updated by a message, so need to check them every frame
// The fields may be changed by the user, so only update them if the data changes
LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
if (pos_global.isExactlyZero())
{
LLVector3d agentPos = gAgent.getPositionGlobal();
// Set to avatar's current postion if nothing is selected
if ( status == LLTracker::TRACKING_NOTHING && mSetToUserPosition )
{
// Make sure we know where we are before setting the current user position
std::string agent_sim_name;
gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal( agentPos, agent_sim_name );
if ( gotSimName )
{
mSetToUserPosition = FALSE;
// Fill out the location field
childSetValue("location", agent_sim_name);
// Figure out where user is
LLVector3d agentPos = gAgent.getPositionGlobal();
S32 agent_x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) );
S32 agent_y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) );
S32 agent_z = llround( (F32)agentPos.mdV[VZ] );
childSetValue("spin x", LLSD(agent_x) );
childSetValue("spin y", LLSD(agent_y) );
childSetValue("spin z", LLSD(agent_z) );
// Set the current SLURL
mSLURL = LLURLDispatcher::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z);
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
childSetValue("location", RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
mSLURL.clear();
}
// [/RLVa:KB]
}
}
return; // invalid location
}
std::string sim_name;
gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal( pos_global, sim_name );
if ((status != LLTracker::TRACKING_NOTHING) &&
(status != mTrackedStatus || pos_global != mTrackedLocation || sim_name != mTrackedSimName))
{
mTrackedStatus = status;
mTrackedLocation = pos_global;
mTrackedSimName = sim_name;
if (status == LLTracker::TRACKING_AVATAR)
{
// *HACK: Adjust Z values automatically for liaisons &
// gods so they swoop down when they click on the
// map. Requested convenience.
if(gAgent.isGodlike())
{
pos_global[2] = 200;
}
}
childSetValue("location", sim_name);
F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
childSetValue("spin x", LLSD(region_x) );
childSetValue("spin y", LLSD(region_y) );
childSetValue("spin z", LLSD((F32)pos_global.mdV[VZ]) );
// simNameFromPosGlobal can fail, so don't give the user an invalid SLURL
if ( gotSimName )
{
mSLURL = LLURLDispatcher::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ]));
}
else
{ // Empty SLURL will disable the "Copy SLURL to clipboard" button
mSLURL = "";
}
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
childSetValue("location", RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
mSLURL.clear();
}
// [/RLVa:KB]
}
}
开发者ID:9skunks,项目名称:imprudence,代码行数:99,代码来源:llfloaterworldmap.cpp
示例4: childSetVisible
//virtual
BOOL LLPanelPreference::postBuild()
{
////////////////////// PanelVoice ///////////////////
if(hasChild("voice_unavailable"))
{
BOOL voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice");
childSetVisible("voice_unavailable", voice_disabled);
childSetVisible("enable_voice_check", !voice_disabled);
}
//////////////////////PanelSkins ///////////////////
if (hasChild("skin_selection"))
{
LLFloaterPreference::refreshSkin(this);
// if skin is set to a skin that no longer exists (silver) set back to default
if (getChild<LLRadioGroup>("skin_selection")->getSelectedIndex() < 0)
{
gSavedSettings.setString("SkinCurrent", "default");
LLFloaterPreference::refreshSkin(this);
}
}
if(hasChild("online_visibility") && hasChild("send_im_to_email"))
{
childSetText("email_address",getString("log_in_to_change") );
// childSetText("busy_response", getString("log_in_to_change"));
}
//////////////////////PanelPrivacy ///////////////////
if (hasChild("media_enabled"))
{
bool media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia");
getChild<LLCheckBoxCtrl>("media_enabled")->set(media_enabled);
getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(media_enabled);
}
if (hasChild("music_enabled"))
{
getChild<LLCheckBoxCtrl>("music_enabled")->set(gSavedSettings.getBOOL("AudioStreamingMusic"));
}
if (hasChild("voice_call_friends_only_check"))
{
getChild<LLCheckBoxCtrl>("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2));
}
// Panel Advanced
if (hasChild("modifier_combo"))
{
//localizing if push2talk button is set to middle mouse
if (MIDDLE_MOUSE_CV == childGetValue("modifier_combo").asString())
{
childSetValue("modifier_combo", getString("middle_mouse"));
}
}
apply();
return true;
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:63,代码来源:llfloaterpreference.cpp
示例5: refresh
// returns false, if adding new grid failed
bool HippoPanelGridsImpl::saveCurGrid()
{
HippoGridInfo *gridInfo = 0;
gridInfo = gHippoGridManager->getGrid(mCurGrid);
//gridInfo->getGridInfo();
refresh();
std::string gridname = childGetValue("gridname");
if (gridname == "<required>") gridname = "";
std::string loginuri = childGetValue("loginuri");
if (loginuri == "<required>") loginuri = "";
if (gridname.empty() && !loginuri.empty())
this->retrieveGridInfo();
if ((mState == ADD_NEW) || (mState == ADD_COPY)) {
// check nickname
std::string gridname = childGetValue("gridname");
childSetValue("gridname", (gridname != "")? gridname: "<required>");
if (gridname == "") {
LLNotificationsUtil::add("GridsNoNick");
return false;
}
if (gHippoGridManager->getGrid(gridname)) {
LLSD args;
args["NAME"] = gridname;
LLNotificationsUtil::add("GridExists", args);
return false;
}
// check login URI
if (loginuri == "") {
LLSD args;
args["NAME"] = gridname;
LLNotificationsUtil::add("GridsNoLoginUri", args);
return false;
}
mState = NORMAL;
mCurGrid = gridname;
gridInfo = new HippoGridInfo(gridname);
gHippoGridManager->addGrid(gridInfo);
try
{
gridInfo->getGridInfo();
}
catch (AIAlert::ErrorCode const& error)
{
if (error.getCode() == HTTP_NOT_FOUND || error.getCode() == HTTP_METHOD_NOT_ALLOWED)
{
// Ignore this error; it might be a user entered entry for a grid that has no get_grid_info support.
llwarns << AIAlert::text(error) << llendl;
}
else if (error.getCode() == HTTP_OK)
{
// XML parse error.
AIAlert::add("GridInfoError", error);
}
else
{
// Append GridInfoErrorInstruction to error message.
AIAlert::add("GridInfoError", AIAlert::Error(AIAlert::Prefix(), AIAlert::not_modal, error, "GridInfoErrorInstruction"));
}
}
}
if (!gridInfo) {
llwarns << "Grid not found, ignoring changes." << llendl;
return true;
}
gridInfo->setPlatform(childGetValue("platform"));
gridInfo->setGridName(childGetValue("gridname"));
gridInfo->setLoginUri(childGetValue("loginuri"));
gridInfo->setLoginPage(childGetValue("loginpage"));
gridInfo->setHelperUri(childGetValue("helperuri"));
gridInfo->setWebSite(childGetValue("website"));
gridInfo->setSupportUrl(childGetValue("support"));
gridInfo->setRegisterUrl(childGetValue("register"));
gridInfo->setPasswordUrl(childGetValue("password"));
gridInfo->setSearchUrl(childGetValue("search"));
gridInfo->setRenderCompat(childGetValue("render_compat"));
refresh();
return true;
}
开发者ID:pcerioli,项目名称:SingularityViewer,代码行数:89,代码来源:hippopanelgrids.cpp
示例6: getString
void LLPanelPermissions::refresh()
{
LLButton* BtnDeedToGroup = getChild<LLButton>("button deed");
if(BtnDeedToGroup)
{
std::string deedText;
if (gSavedSettings.getWarning("DeedObject"))
{
deedText = getString("text deed continued");
}
else
{
deedText = getString("text deed");
}
BtnDeedToGroup->setLabelSelected(deedText);
BtnDeedToGroup->setLabelUnselected(deedText);
}
BOOL root_selected = TRUE;
LLSelectNode* nodep = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
S32 object_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
if(!nodep || 0 == object_count)
{
nodep = LLSelectMgr::getInstance()->getSelection()->getFirstNode();
object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
root_selected = FALSE;
}
//BOOL attachment_selected = LLSelectMgr::getInstance()->getSelection()->isAttachment();
//attachment_selected = false;
LLViewerObject* objectp = NULL;
if(nodep) objectp = nodep->getObject();
if(!nodep || !objectp)// || attachment_selected)
{
// ...nothing selected
childSetEnabled("perm_modify",false);
childSetText("perm_modify",LLStringUtil::null);
childSetEnabled("Creator:",false);
childSetText("Creator Name",LLStringUtil::null);
childSetEnabled("Creator Name",false);
childSetEnabled("button creator profile",false);
childSetEnabled("Owner:",false);
childSetText("Owner Name",LLStringUtil::null);
childSetEnabled("Owner Name",false);
childSetEnabled("button owner profile",false);
childSetEnabled("Group:",false);
childSetText("Group Name",LLStringUtil::null);
childSetEnabled("Group Name",false);
childSetEnabled("button set group",false);
childSetText("Object Name",LLStringUtil::null);
childSetEnabled("Object Name",false);
childSetEnabled("Name:",false);
childSetText("Group Name",LLStringUtil::null);
childSetEnabled("Group Name",false);
childSetEnabled("Description:",false);
childSetText("Object Description",LLStringUtil::null);
childSetEnabled("Object Description",false);
childSetEnabled("Permissions:",false);
childSetValue("checkbox share with group",FALSE);
childSetEnabled("checkbox share with group",false);
childSetEnabled("button deed",false);
childSetValue("checkbox allow everyone move",FALSE);
childSetEnabled("checkbox allow everyone move",false);
childSetValue("checkbox allow everyone copy",FALSE);
childSetEnabled("checkbox allow everyone copy",false);
//Next owner can:
childSetEnabled("Next owner can:",false);
childSetValue("checkbox next owner can modify",FALSE);
childSetEnabled("checkbox next owner can modify",false);
childSetValue("checkbox next owner can copy",FALSE);
childSetEnabled("checkbox next owner can copy",false);
childSetValue("checkbox next owner can transfer",FALSE);
childSetEnabled("checkbox next owner can transfer",false);
//checkbox for sale
childSetValue("checkbox for sale",FALSE);
childSetEnabled("checkbox for sale",false);
//checkbox include in search
childSetValue("search_check", FALSE);
childSetEnabled("search_check", false);
LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
if(RadioSaleType)
{
RadioSaleType->setSelectedIndex(-1);
RadioSaleType->setEnabled(FALSE);
}
childSetEnabled("Cost",false);
childSetText("Cost",getString("Cost Default"));
childSetText("Edit Cost",LLStringUtil::null);
childSetEnabled("Edit Cost",false);
//.........这里部分代码省略.........
开发者ID:DcLumen,项目名称:Inertia,代码行数:101,代码来源:llpanelpermissions.cpp
示例7: childSetText
//.........这里部分代码省略.........
// *TODO: Localize / translate this
time_t time_utc = item->getCreationDate();
if (0 == time_utc)
{
childSetText("LabelAcquiredDate",getString("unknown"));
}
else
{
std::string timestr;
timeToFormattedString(time_utc, gSavedSettings.getString("TimestampFormat"), timestr);
childSetText("LabelAcquiredDate", timestr);
}
///////////////////////
// OWNER PERMISSIONS //
///////////////////////
if(can_agent_manipulate)
{
childSetText("OwnerLabel",getString("you_can"));
}
else
{
childSetText("OwnerLabel",getString("owner_can"));
}
U32 base_mask = perm.getMaskBase();
U32 owner_mask = perm.getMaskOwner();
U32 group_mask = perm.getMaskGroup();
U32 everyone_mask = perm.getMaskEveryone();
U32 next_owner_mask = perm.getMaskNextOwner();
childSetEnabled("OwnerLabel",TRUE);
childSetEnabled("CheckOwnerModify",FALSE);
childSetValue("CheckOwnerModify",LLSD((BOOL)(owner_mask & PERM_MODIFY)));
childSetEnabled("CheckOwnerCopy",FALSE);
childSetValue("CheckOwnerCopy",LLSD((BOOL)(owner_mask & PERM_COPY)));
childSetEnabled("CheckOwnerTransfer",FALSE);
childSetValue("CheckOwnerTransfer",LLSD((BOOL)(owner_mask & PERM_TRANSFER)));
///////////////////////
// DEBUG PERMISSIONS //
///////////////////////
if( gSavedSettings.getBOOL("DebugPermissions") )
{
BOOL slam_perm = FALSE;
BOOL overwrite_group = FALSE;
BOOL overwrite_everyone = FALSE;
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = item->getFlags();
slam_perm = flags & LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
overwrite_everyone = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
overwrite_group = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
std::string perm_string;
perm_string = "B: ";
perm_string += mask_to_string(base_mask);
childSetText("BaseMaskDebug",perm_string);
childSetVisible("BaseMaskDebug",TRUE);
perm_string = "O: ";
perm_string += mask_to_string(owner_mask);
开发者ID:DcLumen,项目名称:Inertia,代码行数:67,代码来源:llfloaterproperties.cpp
示例8: sale_info
void LLFloaterProperties::updateSaleInfo()
{
LLViewerInventoryItem* item = (LLViewerInventoryItem*)findItem();
if(!item) return;
LLSaleInfo sale_info(item->getSaleInfo());
if(!gAgent.allowOperation(PERM_TRANSFER, item->getPermissions(), GP_OBJECT_SET_SALE))
{
childSetValue("CheckPurchase",LLSD((BOOL)FALSE));
}
if((BOOL)childGetValue("CheckPurchase"))
{
// turn on sale info
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY;
LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("RadioSaleType");
if(RadioSaleType)
{
switch (RadioSaleType->getSelectedIndex())
{
case 0:
sale_type = LLSaleInfo::FS_ORIGINAL;
break;
case 1:
sale_type = LLSaleInfo::FS_COPY;
break;
case 2:
sale_type = LLSaleInfo::FS_CONTENTS;
break;
default:
sale_type = LLSaleInfo::FS_COPY;
break;
}
}
if (sale_type == LLSaleInfo::FS_COPY
&& !gAgent.allowOperation(PERM_COPY, item->getPermissions(),
GP_OBJECT_SET_SALE))
{
sale_type = LLSaleInfo::FS_ORIGINAL;
}
LLLineEditor* EditPrice = getChild<LLLineEditor>("EditPrice");
S32 price = -1;
if(EditPrice)
{
price = atoi(EditPrice->getText().c_str());
}
// Invalid data - turn off the sale
if (price < 0)
{
sale_type = LLSaleInfo::FS_NOT;
price = 0;
}
sale_info.setSaleType(sale_type);
sale_info.setSalePrice(price);
}
else
{
sale_info.setSaleType(LLSaleInfo::FS_NOT);
}
if(sale_info != item->getSaleInfo()
&& item->isComplete())
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
// Force an update on the sale price at rez
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = new_item->getFlags();
flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE;
new_item->setFlags(flags);
}
new_item->setSaleInfo(sale_info);
if(mObjectID.isNull())
{
// This is in the agent's inventory.
new_item->updateServer(FALSE);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
else
{
// This is in an object's contents.
LLViewerObject* object = gObjectList.findObject(mObjectID);
if(object)
{
object->updateInventory(
new_item,
TASK_INVENTORY_ITEM_KEY,
false);
}
}
}
else
{
// need to make sure we don't just follow the click
//.........这里部分代码省略.........
开发者ID:DcLumen,项目名称:Inertia,代码行数:101,代码来源:llfloaterproperties.cpp
示例9: childSetAction
BOOL LLPanelDirFind::postBuild()
{
LLPanelDirBrowser::postBuild();
childSetAction("back_btn", onClickBack, this);
childSetAction("home_btn", onClickHome, this);
childSetAction("forward_btn", onClickForward, this);
childSetAction("reload_btn", onClickRefresh, this);
childSetCommitCallback("search_editor", onCommitSearch, this);
childSetAction("search_btn", onClickSearch, this);
childSetAction("?", onClickHelp, this);
// showcase doesn't have maturity flags -- it's all PG
if (hasChild("incmature"))
{
// Teens don't get mature checkbox
if (gAgent.wantsPGOnly())
{
childSetValue("incmature", FALSE);
childSetValue("incadult", FALSE);
childHide("incmature");
childHide("incadult");
childSetValue("incpg", TRUE);
childDisable("incpg");
}
if (!gAgent.canAccessMature())
{
childSetValue("incmature", FALSE);
childDisable("incmature");
}
if (!gAgent.canAccessAdult())
{
childSetValue("incadult", FALSE);
childDisable("incadult");
}
}
mWebBrowser = getChild<LLMediaCtrl>(mBrowserName);
if (mWebBrowser)
{
mWebBrowser->addObserver(this);
// new pages appear in same window as the results page now
mWebBrowser->setOpenInInternalBrowser( false );
mWebBrowser->setOpenInExternalBrowser( false );
// need to handle secondlife:///app/ URLs for direct teleports
mWebBrowser->setTrusted( true );
// redirect 404 pages from S3 somewhere else
mWebBrowser->set404RedirectUrl( getString("redirect_404_url") );
navigateToDefaultPage();
}
childSetVisible("filter_gaming", (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL));
return TRUE;
}
开发者ID:cry0,项目名称:SingularityViewer,代码行数:62,代码来源:llpaneldirfind.cpp
示例10: setTitle
void LLFloaterInventoryFinder::updateElementsFromFilter()
{
if (!mFilter)
return;
// Get data needed for filter display
U32 filter_types = mFilter->getFilterObjectTypes();
std::string filter_string = mFilter->getFilterSubString();
LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState();
U32 hours = mFilter->getHoursAgo();
// update the ui elements
setTitle(mFilter->getName());
childSetValue("check_animation", (S32) (filter_types & 0x1 << LLInventoryType::IT_ANIMATION));
childSetValue("check_calling_card", (S32) (filter_types & 0x1 << LLInventoryType::IT_CALLINGCARD));
childSetValue("check_clothing", (S32) (filter_types & 0x1 << LLInventoryType::IT_WEARABLE));
childSetValue("check_gesture", (S32) (filter_types & 0x1 << LLInventoryType::IT_GESTURE));
childSetValue("check_landmark", (S32) (filter_types & 0x1 << LLInventoryType::IT_LANDMARK));
childSetValue("check_notecard", (S32) (filter_types & 0x1 << LLInventoryType::IT_NOTECARD));
childSetValue("check_object", (S32) (filter_types & 0x1 << LLInventoryType::IT_OBJECT));
childSetValue("check_script", (S32) (filter_types & 0x1 << LLInventoryType::IT_LSL));
childSetValue("check_sound", (S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND));
childSetValue("check_texture", (S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE));
childSetValue("check_snapshot", (S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
childSetValue("check_show_empty", show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS);
childSetValue("check_since_logoff", mFilter->isSinceLogoff());
mSpinSinceHours->set((F32)(hours % 24));
mSpinSinceDays->set((F32)(hours / 24));
}
开发者ID:jimjesus,项目名称:kittyviewer,代码行数:31,代码来源:llpanelmaininventory.cpp
示例11: stripChannelNumber
void LLChatBar::sendChat( EChatType type )
{
if (mInputEditor)
{
LLWString text = mInputEditor->getConvertedText();
if (!text.empty())
{
// store sent line in history, duplicates will get filtered
if (mInputEditor) mInputEditor->updateHistory();
// Check if this is destined for another channel
S32 channel = mChanCtrlEnabled ? (S32)(mChannelControl->get()) : 0;
stripChannelNumber(text, &channel);
std::string utf8text = wstring_to_utf8str(text);
// Try to trigger a gesture, if not chat to a script.
std::string utf8_revised_text;
if (0 == channel)
{
if (gSavedSettings.getBOOL("AutoCloseOOC"))
{
// Try to find any unclosed OOC chat (i.e. an opening
// double parenthesis without a matching closing double
// parenthesis.
if (utf8text.find("((") != -1 && utf8text.find("))") == -1)
{
if (utf8text.at(utf8text.length() - 1) == ')')
{
// cosmetic: add a space first to avoid a closing triple parenthesis
utf8text += " ";
}
// add the missing closing double parenthesis.
utf8text += "))";
}
}
// Convert MU*s style poses into IRC emotes here.
if (gSavedSettings.getBOOL("AllowMUpose") && utf8text.find(":") == 0 && utf8text.length() > 3)
{
if (utf8text.find(":'") == 0)
{
utf8text.replace(0, 1, "/me");
}
else if (isalpha(utf8text.at(1))) // Do not prevent smileys and such.
{
utf8text.replace(0, 1, "/me ");
}
}
// discard returned "found" boolean
gGestureManager.triggerAndReviseString(utf8text, &utf8_revised_text);
}
else
{
utf8_revised_text = utf8text;
}
utf8_revised_text = utf8str_trim(utf8_revised_text);
if (!utf8_revised_text.empty())
if (!utf8_revised_text.empty() && cmd_line_chat(utf8_revised_text, type))
{
// Chat with animation
sendChatFromViewer(utf8_revised_text, type, TRUE);
}
}
}
childSetValue("Chat Editor", LLStringUtil::null);
gAgent.stopTyping();
// If the user wants to stop chatting on hitting return, lose focus
// and go out of chat mode.
if (gChatBar == this && gSavedSettings.getBOOL("CloseChatOnReturn"))
{
stopChat();
}
}
开发者ID:kow,项目名称:pleiaviewer,代码行数:80,代码来源:llchatbar.cpp
示例12: llassert
//.........这里部分代码省略.........
{
childSetVisible(debug_items[t],false);
}
return;
}
else // Make sure perms and sale ui elements are visible
{
for(size_t t=0; t<LL_ARRAY_SIZE(perm_and_sale_items); ++t)
{
childSetVisible(perm_and_sale_items[t],true);
}
}
///////////////////////
// OWNER PERMISSIONS //
///////////////////////
if(can_agent_manipulate)
{
childSetText("OwnerLabel",getString("you_can"));
}
else
{
childSetText("OwnerLabel",getString("owner_can"));
}
U32 base_mask = perm.getMaskBase();
U32 owner_mask = perm.getMaskOwner();
U32 group_mask = perm.getMaskGroup();
U32 everyone_mask = perm.getMaskEveryone();
U32 next_owner_mask = perm.getMaskNextOwner();
childSetEnabled("OwnerLabel",TRUE);
childSetEnabled("CheckOwnerModify",FALSE);
childSetValue("CheckOwnerModify",LLSD((BOOL)(owner_mask & PERM_MODIFY)));
childSetEnabled("CheckOwnerCopy",FALSE);
childSetValue("CheckOwnerCopy",LLSD((BOOL)(owner_mask & PERM_COPY)));
childSetEnabled("CheckOwnerTransfer",FALSE);
childSetValue("CheckOwnerTransfer",LLSD((BOOL)(owner_mask & PERM_TRANSFER)));
///////////////////////
// DEBUG PERMISSIONS //
///////////////////////
if( gSavedSettings.getBOOL("DebugPermissions") )
{
BOOL slam_perm = FALSE;
BOOL overwrite_group = FALSE;
BOOL overwrite_everyone = FALSE;
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = item->getFlags();
slam_perm = flags & LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
overwrite_everyone = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
overwrite_group = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
std::string perm_string;
perm_string = "B: ";
perm_string += mask_to_string(base_mask);
childSetText("BaseMaskDebug",perm_string);
childSetVisible("BaseMaskDebug",TRUE);
perm_string = "O: ";
perm_string += mask_to_string(owner_mask);
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:67,代码来源:llsidepaneliteminfo.cpp
示例13: deactivateAnimator
void LLFloaterWindLight::onColorControlIMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
{
deactivateAnimator();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
colorControl->i = sldrCtrl->getValueF32();
// only for sliders where we pass a name
if(colorControl->hasSliderName) {
// set it to the top
F32 maxVal = std::max(std::max(colorControl->r, colorControl->g), colorControl->b);
F32 iVal;
if(colorControl->isSunOrAmbientColor)
{
iVal = colorControl->i * 3;
}
else if(colorControl->isBlueHorizonOrDensity)
{
iVal = colorControl->i * 2;
}
else
{
iVal = colorControl->i;
}
// get the names of the other sliders
std::string rName = colorControl->mSliderName;
rName.append("R");
std::string gName = colorControl->mSliderName;
gName.append("G");
std::string bName = colorControl->mSliderName;
bName.append("B");
// handle if at 0
if(iVal == 0) {
colorControl->r = 0;
colorControl->g = 0;
colorControl->b = 0;
// if all at the start
// set them all to the intensity
} else if (maxVal == 0) {
colorControl->r = iVal;
colorControl->g = iVal;
colorControl->b = iVal;
} else {
// add delta amounts to each
F32 delta = (iVal - maxVal) / maxVal;
colorControl->r *= (1.0f + delta);
colorControl->g *= (1.0f + delta);
colorControl->b *= (1.0f + delta);
}
// divide sun color vals by three
if(colorControl->isSunOrAmbientColor)
{
childSetValue(rName, colorControl->r/3);
childSetValue(gName, colorControl->g/3);
childSetValue(bName, colorControl->b/3);
}
else if(colorControl->isBlueHorizonOrDensity)
{
childSetValue(rName, colorControl->r/2);
childSetValue(gName, colorControl->g/2);
childSetValue(bName, colorControl->b/2);
}
else
{
// set the sliders to the new vals
childSetValue(rName, colorControl->r);
childSetValue(gName, colorControl->g);
childSetValue(bName, colorControl->b);
}
}
// now update the current parameters and send them to shaders
colorControl->update(LLWLParamManager::instance()->mCurParams);
LLWLParamManager::instance()->propagateParameters();
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:86,代码来源:llfloaterwindlight.cpp
示例14: childSetValue
void LLPanelRegionTools::setPricePerMeter(S32 price)
{
childSetValue("land cost", price);
}
开发者ID:Boy,项目名称:netbook,代码行数:4,代码来源:llfloatergodtools.cpp
示例15: localRectToScreen
//.........这里部分代码省略.........
{
speaker_name = LLCacheName::getDefaultName();
}
else
{
speaker_name = speakerp->mDisplayName;
}
if (speakerp->mIsModerator)
{
speaker_name += std::string(" ") + getString("moderator_label");
}
name_cell->setValue(speaker_name);
((LLScrollListText*)name_cell)->setFontStyle(speakerp->mIsModerator ? LLFontGL::BOLD : LLFontGL::NORMAL);
}
// update speaking order column
LLScrollListCell* speaking_status_cell = itemp->getColumn(2);
if (speaking_status_cell)
{
// print speaking ordinal in a text-sorting friendly manner
speaking_status_cell->setValue(speaking_order_sort_string);
}
}
// we potentially modified the sort order by touching the list items
mSpeakerList->setSorted(FALSE);
LLPointer<LLSpeaker> selected_speakerp = mSpeakerMgr->findSpeaker(selected_id);
// update UI for selected participant
if (mMuteVoiceCtrl)
{
mMuteVoiceCtrl->setValue(LLMuteList::getInstance()->isMuted(selected_id, LLMute::flagVoiceChat));
mMuteVoiceCtrl->setEnabled(LLVoiceClient::voiceEnabled()
&& gVoiceClient->getVoiceEnabled(selected_id)
&& selected_id.notNull()
&& selected_id != gAgent.getID()
&& (selected_speakerp.notNull() && (selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT || selected_speakerp->mType == LLSpeaker::SPEAKER_EXTERNAL)));
}
if (mMuteTextCtrl)
{
mMuteTextCtrl->setValue(LLMuteList::getInstance()->isMuted(selected_id, LLMute::flagTextChat));
mMuteTextCtrl->setEnabled(selected_id.notNull()
&& selected_id != gAgent.getID()
&& selected_speakerp.notNull()
&& selected_speakerp->mType != LLSpeaker::SPEAKER_EXTERNAL
&& !LLMuteList::getInstance()->isLinden(selected_speakerp->mDisplayName));
}
childSetValue("speaker_volume", gVoiceClient->getUserVolume(selected_id));
childSetEnabled("speaker_volume", LLVoiceClient::voiceEnabled()
&& gVoiceClient->getVoiceEnabled(selected_id)
&& selected_id.notNull()
&& selected_id != gAgent.getID()
&& (selected_speakerp.notNull() && (selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT || selected_speakerp->mType == LLSpeaker::SPEAKER_EXTERNAL)));
childSetEnabled(
"moderator_controls_label",
selected_id.notNull());
childSetEnabled(
"moderator_allow_voice",
selected_id.notNull()
&& mSpeakerMgr->isVoiceActive()
&& gVoiceClient->getVoiceEnabled(selected_id));
childSetEnabled(
"moderator_allow_text",
selected_id.notNull());
if (mProfileBtn)
{
mProfileBtn->setEnabled(selected_id.notNull() && (selected_speakerp.notNull() && selected_speakerp->mType != LLSpeaker::SPEAKER_EXTERNAL) );
}
// show selected user name in large font
if (mNameText)
{
if (selected_speakerp)
{
mNameText->setValue(selected_speakerp->mDisplayName);
}
else
{
mNameText->setValue(LLStringUtil::null);
}
}
//update moderator capabilities
LLPointer<LLSpeaker> self_speakerp = mSpeakerMgr->findSpeaker(gAgent.getID());
if(self_speakerp)
{
childSetVisible("moderation_mode_panel", self_speakerp->mIsModerator && mSpeakerMgr->isVoiceActive());
childSetVisible("moderator_controls", self_speakerp->mIsModerator);
}
// keep scroll value stable
mSpeakerList->getScrollInterface()->setScrollPos(scroll_pos);
}
开发者ID:EmeraldViewer,项目名称:EmeraldViewer,代码行数:101,代码来源:llfloateractivespeakers.cpp
示例16: setColorSwatch
void LLFloaterEditSky::syncControls()
{
bool err;
LLWLParamManager * param_mgr = LLWLParamManager::getInstance();
LLWLParamSet& cur_params = param_mgr->mCurParams;
// blue horizon
param_mgr->mBlueHorizon = cur_params.getVector(param_mgr->mBlueHorizon.mName, err);
setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE);
// haze density, horizon, mult, and altitude
param_mgr->mHazeDensity = cur_params.getFloat(param_mgr->mHazeDensity.mName, err);
childSetValue("WLHazeDensity", (F32) param_mgr->mHazeDensity);
param_mgr->mHazeHorizon = cur_params.getFloat(param_mgr->mHazeHorizon.mName, err);
childSetValue("WLHazeHorizon", (F32) param_mgr->mHazeHorizon);
param_mgr->mDensityMult = cur_params.getFloat(param_mgr->mDensityMult.mName, err);
childSetValue("WLDensityMult", ((F32) param_mgr->mDensityMult) * param_mgr->mDensityMult.mult);
param_mgr->mMaxAlt = cur_params.getFloat(param_mgr->mMaxAlt.mName, err);
childSetValue("WLMaxAltitude", (F32) param_mgr->mMaxAlt);
// blue density
param_mgr->mBlueDensity = cur_params.getVector(param_mgr->mBlueDensity.mName, err);
setColorSwatch("WLBlueDensity", param_mgr->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE);
// Lighting
// sunlight
param_mgr->mSunlight = cur_params.getVector(param_mgr->mSunlight.mName, err);
setColorSwatch("WLSunlight", param_mgr->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE);
// glow
param_mgr->mGlow = cur_params.getVector(param_mgr->mGlow.mName, err);
childSetValue("WLGlowR", 2 - param_mgr->mGlow.r / 2
|
请发表评论