本文整理汇总了C++中LLComboBox类的典型用法代码示例。如果您正苦于以下问题:C++ LLComboBox类的具体用法?C++ LLComboBox怎么用?C++ LLComboBox使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLComboBox类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: closePickTool
// static
void LLFloaterReporter::onClickSend(void *userdata)
{
LLFloaterReporter *self = (LLFloaterReporter *)userdata;
if (self->mPicking)
{
closePickTool(self);
}
if(self->validateReport())
{
// only show copyright alert for abuse reports
if ( self->mReportType != BUG_REPORT )
{
const int IP_CONTENT_REMOVAL = 66;
const int IP_PERMISSONS_EXPLOIT = 37;
LLComboBox* combo = self->getChild<LLComboBox>( "category_combo");
int category_value = combo->getSelectedValue().asInteger();
if ( ! self->mCopyrightWarningSeen )
{
std::string details_lc = self->childGetText("details_edit");
LLStringUtil::toLower( details_lc );
std::string summary_lc = self->childGetText("summary_edit");
LLStringUtil::toLower( summary_lc );
if ( details_lc.find( "copyright" ) != std::string::npos ||
summary_lc.find( "copyright" ) != std::string::npos ||
category_value == IP_CONTENT_REMOVAL ||
category_value == IP_PERMISSONS_EXPLOIT)
{
LLNotifications::instance().add("HelpReportAbuseContainsCopyright");
self->mCopyrightWarningSeen = TRUE;
return;
}
}
else if (category_value == IP_CONTENT_REMOVAL)
{
// IP_CONTENT_REMOVAL *always* shows the dialog -
// ergo you can never send that abuse report type.
LLNotifications::instance().add("HelpReportAbuseContainsCopyright");
return;
}
}
LLUploadDialog::modalUploadDialog("Uploading...\n\nReport");
// *TODO don't upload image if checkbox isn't checked
std::string url = gAgent.getRegion()->getCapability("SendUserReport");
std::string sshot_url = gAgent.getRegion()->getCapability("SendUserReportWithScreenshot");
if(!url.empty() || !sshot_url.empty())
{
self->sendReportViaCaps(url, sshot_url, self->gatherReport());
self->close();
}
else
{
if(self->childGetValue("screen_check"))
{
self->childDisable("send_btn");
self->childDisable("cancel_btn");
// the callback from uploading the image calls sendReportViaLegacy()
self->uploadImage();
}
else
{
self->sendReportViaLegacy(self->gatherReport());
LLUploadDialog::modalUploadFinished();
self->close();
}
}
}
}
示例2: gatherReport
LLSD LLFloaterReporter::gatherReport()
{
LLViewerRegion *regionp = gAgent.getRegion();
if (!regionp) return LLSD(); // *TODO handle this failure case more gracefully
// reset flag in case the next report also contains this text
mCopyrightWarningSeen = FALSE;
std::ostringstream summary;
if (!LLViewerLogin::getInstance()->isInProductionGrid())
{
summary << "Preview ";
}
std::string category_name;
LLComboBox* combo = getChild<LLComboBox>( "category_combo");
if (combo)
{
category_name = combo->getSelectedItemLabel(); // want label, not value
}
#if LL_WINDOWS
const char* platform = "Win";
const char* short_platform = "O:W";
#elif LL_DARWIN
const char* platform = "Mac";
const char* short_platform = "O:M";
#elif LL_LINUX
const char* platform = "Lnx";
const char* short_platform = "O:L";
#elif LL_SOLARIS
const char* platform = "Sol";
const char* short_platform = "O:S";
#else
const char* platform = "???";
const char* short_platform = "O:?";
#endif
if ( mReportType == BUG_REPORT)
{
summary << short_platform << " V" << LL_VERSION_MAJOR << "."
<< LL_VERSION_MINOR << "."
<< LL_VERSION_PATCH << "."
<< LL_VIEWER_BUILD
<< " (" << regionp->getName() << ")"
<< "[" << category_name << "] "
<< "\"" << childGetValue("summary_edit").asString() << "\"";
}
else
{
summary << ""
<< " |" << regionp->getName() << "|" // region reporter is currently in.
<< " (" << childGetText("abuse_location_edit") << ")" // region abuse occured in (freeform text - no LLRegionPicker tool)
<< " [" << category_name << "] " // updated category
<< " {" << childGetText("abuser_name_edit") << "} " // name of abuse entered in report (chosen using LLAvatarPicker)
<< " \"" << childGetValue("summary_edit").asString() << "\""; // summary as entered
};
std::ostringstream details;
if (mReportType != BUG_REPORT)
{
details << "V" << LL_VERSION_MAJOR << "." // client version moved to body of email for abuse reports
<< LL_VERSION_MINOR << "."
<< LL_VERSION_PATCH << "."
<< LL_VIEWER_BUILD << std::endl << std::endl;
}
std::string object_name = childGetText("object_name");
std::string owner_name = childGetText("owner_name");
if (!object_name.empty() && !owner_name.empty())
{
details << "Object: " << object_name << "\n";
details << "Owner: " << owner_name << "\n";
}
if ( mReportType != BUG_REPORT )
{
details << "Abuser name: " << childGetText("abuser_name_edit") << " \n";
details << "Abuser location: " << childGetText("abuse_location_edit") << " \n";
};
details << childGetValue("details_edit").asString();
std::string version_string;
version_string = llformat(
"%d.%d.%d %s %s %s %s",
LL_VERSION_MAJOR,
LL_VERSION_MINOR,
LL_VERSION_PATCH,
platform,
gSysCPU.getFamily().c_str(),
gGLManager.mGLRenderer.c_str(),
gGLManager.mDriverVersionVendorString.c_str());
// only send a screenshot ID if we're asked to and the email is
// going to LL - Estate Owners cannot see the screenshot asset
LLUUID screenshot_id = LLUUID::null;
if (childGetValue("screen_check"))
{
if ( mReportType != BUG_REPORT )
//.........这里部分代码省略.........
示例3: commit_grid_mode
void commit_grid_mode(LLUICtrl *ctrl, void *data)
{
LLComboBox* combo = (LLComboBox*)ctrl;
LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
}
示例4: childSetVisible
void LLPreviewTexture::init()
{
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_texture.xml");
childSetVisible("desc", !mCopyToInv); // Hide description field for embedded textures
childSetVisible("desc txt", !mCopyToInv);
childSetVisible("Copy To Inventory", mCopyToInv);
childSetVisible("Keep", mShowKeepDiscard);
childSetVisible("Discard", mShowKeepDiscard);
if (mCopyToInv)
{
childSetAction("Copy To Inventory",LLPreview::onBtnCopyToInv,this);
}
else if (mShowKeepDiscard)
{
childSetAction("Keep",onKeepBtn,this);
childSetAction("Discard",onDiscardBtn,this);
}
else
{
// If the buttons are hidden move stuff down to use the space.
LLRect keep_rect, old_rect, new_rect;
S32 diff;
childGetRect("Keep", keep_rect);
childGetRect("combo_aspect_ratio", old_rect);
diff = old_rect.mBottom - keep_rect.mBottom;
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff,
old_rect.getWidth(), old_rect.getHeight());
childSetRect("combo_aspect_ratio", new_rect);
childGetRect("aspect_ratio", old_rect);
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff,
old_rect.getWidth(), old_rect.getHeight());
childSetRect("aspect_ratio", new_rect);
childGetRect("dimensions", old_rect);
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff,
old_rect.getWidth(), old_rect.getHeight());
childSetRect("dimensions", new_rect);
}
if (!mCopyToInv)
{
const LLInventoryItem* item = getItem();
if (item)
{
childSetCommitCallback("desc", LLPreview::onText, this);
childSetText("desc", item->getDescription());
childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
}
}
childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this);
LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
combo->setCurrentByIndex(0);
}
示例5: onClickConnect
// static
void LLPanelLogin::onClickConnect(void *)
{
if (sInstance && sInstance->mCallback)
{
// JC - Make sure the fields all get committed.
sInstance->setFocus(FALSE);
LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
LLSD combo_val = combo->getSelectedValue();
if (combo_val.isUndefined())
{
combo_val = combo->getValue();
}
if(combo_val.isUndefined())
{
LLNotificationsUtil::add("StartRegionEmpty");
return;
}
std::string new_combo_value = combo_val.asString();
if (!new_combo_value.empty())
{
std::string match = "://";
size_t found = new_combo_value.find(match);
if (found != std::string::npos)
new_combo_value.erase( 0,found+match.length());
}
try
{
LLGridManager::getInstance()->setGridChoice(new_combo_value);
}
catch (LLInvalidGridName ex)
{
LLSD args;
args["GRID"] = ex.name();
LLNotificationsUtil::add("InvalidGrid", args);
return;
}
updateStartSLURL();
std::string username = sInstance->getChild<LLUICtrl>("username_combo")->getValue().asString();
gSavedSettings.setString("UserLoginInfo", credential_name());
LLSD blocked = FSData::getInstance()->allowed_login();
if (!blocked.isMap()) //hack for testing for an empty LLSD
{
if(username.empty())
{
LLSD args;
args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel();
// user must type in something into the username field
LLNotificationsUtil::add("MustHaveAccountToLogIn", args);
}
else
{
LLPointer<LLCredential> cred;
BOOL remember;
getFields(cred, remember);
std::string identifier_type;
cred->identifierType(identifier_type);
LLSD allowed_credential_types;
LLGridManager::getInstance()->getLoginIdentifierTypes(allowed_credential_types);
// check the typed in credential type against the credential types expected by the server.
for(LLSD::array_iterator i = allowed_credential_types.beginArray();
i != allowed_credential_types.endArray();
i++)
{
if(i->asString() == identifier_type)
{
// yay correct credential type
sInstance->mCallback(0, sInstance->mCallbackData);
return;
}
}
// Right now, maingrid is the only thing that is picky about
// credential format, as it doesn't yet allow account (single username)
// format creds. - Rox. James, we wanna fix the message when we change
// this.
LLNotificationsUtil::add("InvalidCredentialFormat");
}
}
}
}
示例6: onClickConnect
// static
void LLPanelLogin::onClickConnect(void *)
{
if (sInstance && sInstance->mCallback)
{
// tell the responder we're not here anymore
if ( gResponsePtr )
gResponsePtr->setParent( 0 );
// JC - Make sure the fields all get committed.
sInstance->setFocus(FALSE);
LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
LLSD combo_val = combo->getSelectedValue();
if (combo_val.isUndefined())
{
combo_val = combo->getValue();
}
if(combo_val.isUndefined())
{
LLNotificationsUtil::add("StartRegionEmpty");
return;
}
if(!LLGridManager::getInstance()->setGridChoice(combo_val.asString()))
{
LLSD args;
args["GRID"] = combo_val.asString();
LLNotificationsUtil::add("InvalidGrid", args);
return;
}
updateStartSLURL();
std::string username = sInstance->getChild<LLUICtrl>("username_combo")->getValue().asString();
LLSD blocked = FSData::allowed_login();
if (!blocked.isMap()) //hack for testing for an empty LLSD
{
if(username.empty())
{
// user must type in something into the username field
LLNotificationsUtil::add("MustHaveAccountToLogIn");
}
else
{
LLPointer<LLCredential> cred;
BOOL remember;
getFields(cred, remember);
std::string identifier_type;
cred->identifierType(identifier_type);
LLSD allowed_credential_types;
LLGridManager::getInstance()->getLoginIdentifierTypes(allowed_credential_types);
// check the typed in credential type against the credential types expected by the server.
for(LLSD::array_iterator i = allowed_credential_types.beginArray();
i != allowed_credential_types.endArray();
i++)
{
if(i->asString() == identifier_type)
{
// yay correct credential type
sInstance->mCallback(0, sInstance->mCallbackData);
return;
}
}
// Right now, maingrid is the only thing that is picky about
// credential format, as it doesn't yet allow account (single username)
// format creds. - Rox. James, we wanna fix the message when we change
// this.
LLNotificationsUtil::add("InvalidCredentialFormat");
}
}
else
{
LLNotificationsUtil::add("BlockLoginInfo", blocked);
}
}
}
示例7: llformat
//.........这里部分代码省略.........
if (message)
{
message->setVisible(true);
message->setWrappedText(
!mCanBuy ? mCannotBuyReason : "(waiting for data)"
);
}
childSetVisible("error_web",
mCannotBuyIsError && !mCannotBuyURI.empty());
}
else
{
childHide("step_error");
childHide("error_message");
childHide("error_web");
}
// section one: account
if (!showingError)
{
mChildren.setBadge(std::string("step_1"),
mSiteMembershipUpgrade
? LLViewChildren::BADGE_NOTE
: LLViewChildren::BADGE_OK);
childSetText("account_action", mSiteMembershipAction);
childSetText("account_reason",
mSiteMembershipUpgrade
? getString("must_upgrade")
: getString("cant_own_land")
);
LLComboBox* levels = getChild<LLComboBox>( "account_level");
if (levels)
{
levels->setVisible(mSiteMembershipUpgrade);
levels->removeall();
for(std::vector<std::string>::const_iterator i
= mSiteMembershipPlanNames.begin();
i != mSiteMembershipPlanNames.end();
++i)
{
levels->add(*i);
}
levels->setCurrentByIndex(mUserPlanChoice);
}
childShow("step_1");
childShow("account_action");
childShow("account_reason");
}
else
{
childHide("step_1");
childHide("account_action");
childHide("account_reason");
childHide("account_level");
}
// section two: land use fees
if (!showingError)
{
mChildren.setBadge(std::string("step_2"),
示例8: catch
// static
void LLPanelLogin::onSelectServer(LLUICtrl*, void*)
{
// *NOTE: The paramters for this method are ignored.
// LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*)
// calls this method.
// The user twiddled with the grid choice ui.
// apply the selection to the grid setting.
// LLPointer<LLCredential> credential; <- SA: is this ever used?
LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
LLSD combo_val = combo->getSelectedValue();
if (combo_val.isUndefined())
{
combo_val = combo->getValue();
}
// <AW: opensim>
std::string new_combo_value = combo_val.asString();
if (!new_combo_value.empty())
{
std::string match = "://";
size_t found = new_combo_value.find(match);
if (found != std::string::npos)
new_combo_value.erase( 0,found+match.length());
}
// e.g user clicked into loginpage
if(LLGridManager::getInstance()->getGrid() == new_combo_value)
{
return;
}
try
{
LLGridManager::getInstance()->setGridChoice(new_combo_value);
}
catch (LLInvalidGridName ex)
{
// do nothing
}
// </AW: opensim>
//Clear the PW for security reasons, if the Grid changed manually.
sInstance->getChild<LLLineEditor>("password_edit")->clear();
LL_INFOS("AppInit") << "onSelectServer " << new_combo_value << LL_ENDL;
combo = sInstance->getChild<LLComboBox>("start_location_combo");
// combo->setCurrentByIndex(1); <- SA: Why???
LLStartUp::setStartSLURL(LLSLURL(gSavedSettings.getString("LoginLocation")));
// This new selection will override preset uris
// from the command line.
updateServer();
updateLoginPanelLinks();
}
示例9: syncMenu
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;
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
// Fixes LL "bug" (preset name isn't kept synchronized)
LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
if (comboBox->getSelectedItemLabel() != currentParams.mName)
{
comboBox->setSimple(currentParams.mName);
}
// [/RLVa:KB]
// 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
//.........这里部分代码省略.........
示例10: newPromptCallback
void LLFloaterWindLight::newPromptCallback(S32 option, const std::string& text, void* userData)
{
if(text == "")
{
return;
}
if(option == 0) {
LLComboBox* comboBox = sWindLight->getChild<LLComboBox>(
"WLPresetsCombo");
LLFloaterDayCycle* sDayCycle = NULL;
LLComboBox* keyCombo = NULL;
if(LLFloaterDayCycle::isOpen())
{
sDayCycle = LLFloaterDayCycle::instance();
keyCombo = sDayCycle->getChild<LLComboBox>(
"WLKeyPresets");
}
// add the current parameters to the list
// see if it's there first
std::map<std::string, LLWLParamSet>::iterator mIt =
LLWLParamManager::instance()->mParamList.find(text);
// if not there, add a new one
if(mIt == LLWLParamManager::instance()->mParamList.end())
{
LLWLParamManager::instance()->addParamSet(text,
LLWLParamManager::instance()->mCurParams);
comboBox->add(text);
comboBox->sortByName();
// add a blank to the bottom
comboBox->selectFirstItem();
if(comboBox->getSimple() == "")
{
comboBox->remove(0);
}
comboBox->add(LLStringUtil::null);
comboBox->setSelectedByValue(text, true);
if(LLFloaterDayCycle::isOpen())
{
keyCombo->add(text);
keyCombo->sortByName();
}
LLWLParamManager::instance()->savePreset(text);
// otherwise, send a message to the user
}
else
{
gViewerWindow->alertXml("ExistsSkyPresetAlert");
}
}
}
示例11: initHelpBtn
//.........这里部分代码省略.........
initHelpBtn("WLCloudDensityHelp", "HelpCloudDensity");
initHelpBtn("WLCloudCoverageHelp", "HelpCloudCoverage");
initHelpBtn("WLCloudScaleHelp", "HelpCloudScale");
initHelpBtn("WLCloudScrollXHelp", "HelpCloudScrollX");
initHelpBtn("WLCloudScrollYHelp", "HelpCloudScrollY");
initHelpBtn("WLClassicCloudsHelp", "HelpClassicClouds");
LLWLParamManager * param_mgr = LLWLParamManager::instance();
// blue horizon
childSetCommitCallback("WLBlueHorizonR", onColorControlRMoved, ¶m_mgr->mBlueHorizon);
childSetCommitCallback("WLBlueHorizonG", onColorControlGMoved, ¶m_mgr->mBlueHorizon);
childSetCommitCallback("WLBlueHorizonB", onColorControlBMoved, ¶m_mgr->mBlueHorizon);
childSetCommitCallback("WLBlueHorizonI", onColorControlIMoved, ¶m_mgr->mBlueHorizon);
// haze density, horizon, mult, and altitude
childSetCommitCallback("WLHazeDensity", onColorControlRMoved, ¶m_mgr->mHazeDensity);
childSetCommitCallback("WLHazeHorizon", onColorControlRMoved, ¶m_mgr->mHazeHorizon);
childSetCommitCallback("WLDensityMult", onFloatControlMoved, ¶m_mgr->mDensityMult);
childSetCommitCallback("WLMaxAltitude", onFloatControlMoved, ¶m_mgr->mMaxAlt);
// blue density
childSetCommitCallback("WLBlueDensityR", onColorControlRMoved, ¶m_mgr->mBlueDensity);
childSetCommitCallback("WLBlueDensityG", onColorControlGMoved, ¶m_mgr->mBlueDensity);
childSetCommitCallback("WLBlueDensityB", onColorControlBMoved, ¶m_mgr->mBlueDensity);
childSetCommitCallback("WLBlueDensityI", onColorControlIMoved, ¶m_mgr->mBlueDensity);
// Lighting
// sunlight
childSetCommitCallback("WLSunlightR", onColorControlRMoved, ¶m_mgr->mSunlight);
childSetCommitCallback("WLSunlightG", onColorControlGMoved, ¶m_mgr->mSunlight);
childSetCommitCallback("WLSunlightB", onColorControlBMoved, ¶m_mgr->mSunlight);
childSetCommitCallback("WLSunlightI", onColorControlIMoved, ¶m_mgr->mSunlight);
// glow
childSetCommitCallback("WLGlowR", onGlowRMoved, ¶m_mgr->mGlow);
childSetCommitCallback("WLGlowB", onGlowBMoved, ¶m_mgr->mGlow);
// ambient
childSetCommitCallback("WLAmbientR", onColorControlRMoved, ¶m_mgr->mAmbient);
childSetCommitCallback("WLAmbientG", onColorControlGMoved, ¶m_mgr->mAmbient);
childSetCommitCallback("WLAmbientB", onColorControlBMoved, ¶m_mgr->mAmbient);
childSetCommitCallback("WLAmbientI", onColorControlIMoved, ¶m_mgr->mAmbient);
// time of day
childSetCommitCallback("WLSunAngle", onSunMoved, ¶m_mgr->mLightnorm);
childSetCommitCallback("WLEastAngle", onSunMoved, ¶m_mgr->mLightnorm);
// Clouds
// Cloud Color
childSetCommitCallback("WLCloudColorR", onColorControlRMoved, ¶m_mgr->mCloudColor);
childSetCommitCallback("WLCloudColorG", onColorControlGMoved, ¶m_mgr->mCloudColor);
childSetCommitCallback("WLCloudColorB", onColorControlBMoved, ¶m_mgr->mCloudColor);
childSetCommitCallback("WLCloudColorI", onColorControlIMoved, ¶m_mgr->mCloudColor);
// Cloud
childSetCommitCallback("WLCloudX", onColorControlRMoved, ¶m_mgr->mCloudMain);
childSetCommitCallback("WLCloudY", onColorControlGMoved, ¶m_mgr->mCloudMain);
childSetCommitCallback("WLCloudDensity", onColorControlBMoved, ¶m_mgr->mCloudMain);
// Cloud Detail
childSetCommitCallback("WLCloudDetailX", onColorControlRMoved, ¶m_mgr->mCloudDetail);
childSetCommitCallback("WLCloudDetailY", onColorControlGMoved, ¶m_mgr->mCloudDetail);
childSetCommitCallback("WLCloudDetailDensity", onColorControlBMoved, ¶m_mgr->mCloudDetail);
// Cloud extras
childSetCommitCallback("WLCloudCoverage", onFloatControlMoved, ¶m_mgr->mCloudCoverage);
childSetCommitCallback("WLCloudScale", onFloatControlMoved, ¶m_mgr->mCloudScale);
childSetCommitCallback("WLCloudLockX", onCloudScrollXToggled, NULL);
childSetCommitCallback("WLCloudLockY", onCloudScrollYToggled, NULL);
childSetCommitCallback("WLCloudScrollX", onCloudScrollXMoved, NULL);
childSetCommitCallback("WLCloudScrollY", onCloudScrollYMoved, NULL);
childSetCommitCallback("WLDistanceMult", onFloatControlMoved, ¶m_mgr->mDistanceMult);
childSetCommitCallback("DrawClassicClouds", LLSavedSettingsGlue::setBOOL, (void*)"SkyUseClassicClouds");
// WL Top
childSetAction("WLDayCycleMenuButton", onOpenDayCycle, NULL);
// Load/save
LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
//childSetAction("WLLoadPreset", onLoadPreset, comboBox);
childSetAction("WLNewPreset", onNewPreset, comboBox);
childSetAction("WLSavePreset", onSavePreset, comboBox);
childSetAction("WLDeletePreset", onDeletePreset, comboBox);
comboBox->setCommitCallback(onChangePresetName);
// Dome
childSetCommitCallback("WLGamma", onFloatControlMoved, ¶m_mgr->mWLGamma);
childSetCommitCallback("WLStarAlpha", onStarAlphaMoved, NULL);
// next/prev buttons
childSetAction("next", onClickNext, this);
childSetAction("prev", onClickPrev, this);
}
示例12: postBuild
BOOL LLPreviewGesture::postBuild()
{
LLLineEditor* edit;
LLComboBox* combo;
LLButton* btn;
LLScrollListCtrl* list;
LLTextBox* text;
LLCheckBoxCtrl* check;
edit = getChild<LLLineEditor>("trigger_editor");
edit->setKeystrokeCallback(onKeystrokeCommit);
edit->setCommitCallback(onCommitSetDirty);
edit->setCommitOnFocusLost(TRUE);
edit->setCallbackUserData(this);
edit->setIgnoreTab(TRUE);
mTriggerEditor = edit;
text = getChild<LLTextBox>("replace_text");
text->setEnabled(FALSE);
mReplaceText = text;
edit = getChild<LLLineEditor>("replace_editor");
edit->setEnabled(FALSE);
edit->setKeystrokeCallback(onKeystrokeCommit);
edit->setCommitCallback(onCommitSetDirty);
edit->setCommitOnFocusLost(TRUE);
edit->setCallbackUserData(this);
edit->setIgnoreTab(TRUE);
mReplaceEditor = edit;
combo = getChild<LLComboBox>( "modifier_combo");
combo->setCommitCallback(onCommitSetDirty);
combo->setCallbackUserData(this);
mModifierCombo = combo;
combo = getChild<LLComboBox>( "key_combo");
combo->setCommitCallback(onCommitSetDirty);
combo->setCallbackUserData(this);
mKeyCombo = combo;
list = getChild<LLScrollListCtrl>("library_list");
list->setCommitCallback(onCommitLibrary);
list->setDoubleClickCallback(onClickAdd);
list->setCallbackUserData(this);
mLibraryList = list;
btn = getChild<LLButton>( "add_btn");
btn->setClickedCallback(onClickAdd);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mAddBtn = btn;
btn = getChild<LLButton>( "up_btn");
btn->setClickedCallback(onClickUp);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mUpBtn = btn;
btn = getChild<LLButton>( "down_btn");
btn->setClickedCallback(onClickDown);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mDownBtn = btn;
btn = getChild<LLButton>( "delete_btn");
btn->setClickedCallback(onClickDelete);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mDeleteBtn = btn;
list = getChild<LLScrollListCtrl>("step_list");
list->setCommitCallback(onCommitStep);
list->setCallbackUserData(this);
mStepList = list;
// Options
text = getChild<LLTextBox>("options_text");
text->setBorderVisible(TRUE);
mOptionsText = text;
combo = getChild<LLComboBox>( "animation_list");
combo->setVisible(FALSE);
combo->setCommitCallback(onCommitAnimation);
combo->setCallbackUserData(this);
mAnimationCombo = combo;
LLRadioGroup* group;
group = getChild<LLRadioGroup>("animation_trigger_type");
group->setVisible(FALSE);
group->setCommitCallback(onCommitAnimationTrigger);
group->setCallbackUserData(this);
mAnimationRadio = group;
combo = getChild<LLComboBox>( "sound_list");
combo->setVisible(FALSE);
combo->setCommitCallback(onCommitSound);
combo->setCallbackUserData(this);
mSoundCombo = combo;
edit = getChild<LLLineEditor>("chat_editor");
//.........这里部分代码省略.........