当前位置: 首页>>代码示例>>C++>>正文


C++ LLComboBox::setSimple方法代码示例

本文整理汇总了C++中LLComboBox::setSimple方法的典型用法代码示例。如果您正苦于以下问题:C++ LLComboBox::setSimple方法的具体用法?C++ LLComboBox::setSimple怎么用?C++ LLComboBox::setSimple使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLComboBox的用法示例。


在下文中一共展示了LLComboBox::setSimple方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: refreshBeamLists

void FSPanelPrefs::refreshBeamLists()
{
	static const std::string off_label = getString("BeamsOffLabel");

	LLComboBox* comboBox = findChild<LLComboBox>("FSBeamShape_combo");

	if (comboBox)
	{
		comboBox->removeall();
		comboBox->add(off_label, LLSD(""));

		string_vec_t names = gLggBeamMaps.getFileNames();
		for (string_vec_t::iterator it = names.begin(); it != names.end(); ++it)
		{
			comboBox->add(*it, LLSD(*it));
		}
		comboBox->setSimple(gSavedSettings.getString("FSBeamShape"));
	}

	comboBox = findChild<LLComboBox>("BeamColor_combo");
	if (comboBox)
	{
		comboBox->removeall();
		comboBox->add(off_label, LLSD(""));
		string_vec_t names = gLggBeamMaps.getColorsFileNames();
		for (string_vec_t::iterator it = names.begin(); it != names.end(); ++it)
		{
			comboBox->add(*it, LLSD(*it));
		}
		comboBox->setSimple(gSavedSettings.getString("FSBeamColorFile"));
	}
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:32,代码来源:fspanelprefs.cpp

示例2: addServer

// static
void LLPanelLogin::addServer(const std::string& server)
{
	if (!sInstance)
	{
		llwarns << "Attempted addServer with no login view shown" << llendl;
		return;
	}

	const std::string &defaultGrid = gHippoGridManager->getDefaultGridNick();

	LLComboBox *grids = sInstance->getChild<LLComboBox>("server_combo");
	S32 selectIndex = -1, i = 0;
	grids->removeall();
	if (defaultGrid != "") {
		grids->add(defaultGrid);
		selectIndex = i++;
	}
	HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid();
	for (it = gHippoGridManager->beginGrid(); it != end; ++it) {
		const std::string &grid = it->second->getGridNick();
		if (grid != defaultGrid) {
			grids->add(grid);
			//if (grid == mCurGrid) selectIndex = i;
			i++;
		}
	}
	
	// when you first login select the default, otherwise last connected
	if (gDisconnected)
	{
		grids->setSimple(gHippoGridManager->getCurrentGrid()->getGridNick());
	}
	else
	{
		std::string last_grid = gSavedSettings.getString("CmdLineGridChoice");//imprudence TODO:errorcheck
		std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString();
		if (!last_grid.empty()&& cmd_line_login_uri.empty())//don't use --grid if --loginuri is also given
		{
			 //give user chance to change their mind, even with --grid set
			gSavedSettings.setString("CmdLineGridChoice","");
		}
		else if (!cmd_line_login_uri.empty())
		{
			last_grid = cmd_line_login_uri;
			 //also clear --grid no matter if it was given
			gSavedSettings.setString("CmdLineGridChoice","");
		}
		else if (last_grid.empty())
		{
			last_grid = gSavedSettings.getString("LastSelectedGrid");
		}
		if (last_grid.empty()) last_grid = defaultGrid;
		grids->setSimple(last_grid);
	}

	//LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
	//combo->add(server, LLSD(domain_name) );
	//combo->setCurrentByIndex(0);
}
开发者ID:ArminW,项目名称:imprudence,代码行数:60,代码来源:llpanellogin.cpp

示例3: onTextCommit

//static 
void LLComboBox::onTextCommit(LLUICtrl* caller, void* user_data)
{
	LLComboBox* self = (LLComboBox*)user_data;
	std::string text = self->mTextEntry->getText();
	self->setSimple(text);
	self->onCommit();
	self->mTextEntry->selectAll();
}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:9,代码来源:llcombobox.cpp

示例4: refreshQuickFilter

//static
void LLInventoryView::refreshQuickFilter(LLUICtrl* ctrl)
{
	LLInventoryView* view = (LLInventoryView*)(ctrl->getParent());
	if (!view->mActivePanel)
	{
		return;
	}

	LLComboBox* quickfilter = view->getChild<LLComboBox>("Quick Filter");
	if (!quickfilter)
	{
		return;
	}

	U32 filter_type = view->mActivePanel->getFilterObjectTypes();

	if(!LLFilterDictionary::instanceExists())
		LLFilterDictionary::instance().init(view);

	// Mask to extract only the bit fields we care about.
	// *TODO: There's probably a cleaner way to construct this mask.
	U32 filter_mask = 0;
	for (LLFilterDictionary::const_iterator_t dictionary_iter =  LLFilterDictionary::instance().map_t::begin(); 
		dictionary_iter != LLFilterDictionary::instance().map_t::end(); dictionary_iter++)
	{
		if(dictionary_iter->first != 0xffffffff)
			filter_mask |= dictionary_iter->first;
	}
 
	filter_type &= filter_mask;

  //llinfos << "filter_type: " << filter_type << llendl;
	std::string selection;

	if (filter_type == filter_mask)
	{
		selection = view->getString("filter_type_all");
	}
	else
	{
		const FilterEntry *entry = LLFilterDictionary::instance().lookup(filter_type);
		if(entry)
			selection = entry->mName;
		else
			selection = view->getString("filter_type_custom");
	}

	// Select the chosen item by label text
	BOOL result = quickfilter->setSimple( (selection) );

	if( !result )
	{
		llinfos << "The item didn't exist: " << selection << llendl;
	}
}
开发者ID:ichibo,项目名称:SingularityViewer,代码行数:56,代码来源:llpanelmaininventory.cpp

示例5: postBuild

BOOL LLWindlightRemoteCtrl::postBuild()
{
	
	childSetAction("Environment", onClickToggleEnvironment, this);
	childSetAction("Popup", onClickPopupBtn, this);

	LLComboBox*	presetsCombo = getChild<LLComboBox>("Presets");
	if (presetsCombo)
	{
		presetsCombo->setSimple(LLWLParamManager::instance()->mCurParams.mName);
		presetsCombo->setCommitCallback(onCommitPreset);
		presetsCombo->setCallbackUserData(this);

		// set up observer to follow changes
		mObserver = new LLWindlightRemoteObserver(this);
		LLWLParamManager::addObserver(mObserver);

		// refresh list from current presets
		refreshPresets();
	}

	return TRUE;
}
开发者ID:Drakeo,项目名称:Drakeo-inWorldz-Viewer,代码行数:23,代码来源:llwindlightremotectrl.cpp

示例6: updateGridCombo

// static
void LLPanelLogin::updateGridCombo(std::string grid_nick)
{
	LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");

	if (grid_nick.empty())
	{
		// The user twiddled with the grid choice ui.
		// apply the selection to the grid setting.
		//std::string grid_label;
		//S32 grid_index;
		
		grid_nick = combo->getValue().asString();
		
		// HippoGridInfo *gridInfo = gHippoGridManager->getGrid(mCurGrid);
		// if (gridInfo) {
		// 	//childSetText("gridnick", gridInfo->getGridNick());
		// 	//platform->setCurrentByIndex(gridInfo->getPlatform());
		// 	//childSetText("gridname", gridInfo->getGridName());
		// 	LLPanelLogin::setFields( gridInfo->getFirstName(), gridInfo->getLastName(), gridInfo->getAvatarPassword(), 1 );
		// }
	}
	else
	{
		combo->setSimple(grid_nick);
	}
	
	gHippoGridManager->setCurrentGrid(grid_nick);

	llinfos << "current grid set to " << grid_nick << llendl;

	// grid changed so show new splash screen (possibly)
	loadLoginPage();

	// save grid choice to settings
	gSavedSettings.setString("LastSelectedGrid", grid_nick);
}
开发者ID:ArminW,项目名称:imprudence,代码行数:37,代码来源:llpanellogin.cpp

示例7: refresh

// Update controls based on current settings
void LLPrefsAscentChat::refresh()
{
    //Chat --------------------------------------------------------------------------------
    // time format combobox
    LLComboBox* combo = getChild<LLComboBox>("time_format_combobox");
    if (combo)
    {
        combo->setCurrentByIndex(mTimeFormat);
    }

    // date format combobox
    combo = getChild<LLComboBox>("date_format_combobox");
    if (combo)
    {
        combo->setCurrentByIndex(mDateFormat);
    }

    childSetValue("AscentInstantMessageResponseAnyone",  mIMResponseAnyone);
    childSetValue("AscentInstantMessageResponseFriends", mIMResponseFriends);
    childSetValue("AscentInstantMessageResponseMuted",   mIMResponseMuted);
    childSetValue("AscentInstantMessageShowOnTyping",    mIMShowOnTyping);
    childSetValue("AscentInstantMessageShowResponded",   mIMShowResponded);
    childSetValue("AscentInstantMessageResponseRepeat",  mIMResponseRepeat);
    childSetValue("AscentInstantMessageResponseItem",    mIMResponseItem);

    LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("AscentInstantMessageResponse") );
    LLWStringUtil::replaceChar(auto_response, '^', '\n');
    LLWStringUtil::replaceChar(auto_response, '%', ' ');
    childSetText("im_response", wstring_to_utf8str(auto_response));

    //Text Options ------------------------------------------------------------------------
    combo = getChild<LLComboBox>("SpellBase");

    if (combo != NULL) 
    {
        combo->removeall();
        std::vector<std::string> names = glggHunSpell->getDicts();

        for (int i = 0; i < (int)names.size(); i++) 
        {
            combo->add(names[i]);
        }

        combo->setSimple(gSavedSettings.getString("SpellBase"));
    }

    combo = getChild<LLComboBox>("EmSpell_Avail");

    if (combo != NULL) 
    {
        combo->removeall();

        combo->add("");
        std::vector<std::string> names = glggHunSpell->getAvailDicts();

        for (int i = 0; i < (int)names.size(); i++) 
        {
            combo->add(names[i]);
        }

        combo->setSimple(std::string(""));
    }

    combo = getChild<LLComboBox>("EmSpell_Installed");

    if (combo != NULL) 
    {
        combo->removeall();

        combo->add("");
        std::vector<std::string> names = glggHunSpell->getInstalledDicts();

        for (int i = 0; i < (int)names.size(); i++) 
        {
            combo->add(names[i]);
        }

        combo->setSimple(std::string(""));
    }

    childSetEnabled("KeywordsList",        mKeywordsOn);
    childSetEnabled("KeywordsInChat",      mKeywordsOn);
    childSetEnabled("KeywordsInIM",        mKeywordsOn);
    childSetEnabled("KeywordsChangeColor", mKeywordsOn);
    childSetEnabled("KeywordsColor",       mKeywordsOn);
    childSetEnabled("KeywordsPlaySound",   mKeywordsOn);
    childSetEnabled("KeywordsSound",       mKeywordsOn);

    childSetValue("KeywordsOn",          mKeywordsOn);
    childSetValue("KeywordsList",        mKeywordsList);
    childSetValue("KeywordsInChat",      mKeywordsInChat);
    childSetValue("KeywordsInIM",        mKeywordsInIM);
    childSetValue("KeywordsChangeColor", mKeywordsChangeColor);

    LLColorSwatchCtrl* colorctrl = getChild<LLColorSwatchCtrl>("KeywordsColor");
    colorctrl->set(LLColor4(mKeywordsColor),TRUE);

    childSetValue("KeywordsPlaySound",   mKeywordsPlaySound);
    childSetValue("KeywordsSound",       mKeywordsSound);
//.........这里部分代码省略.........
开发者ID:samiam123,项目名称:SingularityViewer,代码行数:101,代码来源:ascentprefschat.cpp

示例8: 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
//.........这里部分代码省略.........
开发者ID:meta7,项目名称:Meta7-Viewer-Imprud-refactor,代码行数:101,代码来源:llfloaterwindlight.cpp

示例9: syncMenu

void LLFloaterWater::syncMenu()
{
	bool err;

	LLWaterParamManager * param_mgr = LLWaterParamManager::instance();

	LLWaterParamSet & current_params = param_mgr->mCurParams;

	LLComboBox* comboBox = getChild<LLComboBox>("WaterPresetsCombo");
	if (comboBox->getSelectedItemLabel() != current_params.mName)
	{
		comboBox->setSimple(current_params.mName);
	}

	// blue horizon
	param_mgr->mFogColor = current_params.getVector4(param_mgr->mFogColor.mName, err);

	LLColor4 col = param_mgr->getFogColor();
	childSetValue("WaterGlow", col.mV[3]);
	col.mV[3] = 1.0f;
	LLColorSwatchCtrl* colCtrl = sWaterMenu->getChild<LLColorSwatchCtrl>("WaterFogColor");

	colCtrl->set(col);

	// fog and wavelets
	param_mgr->mFogDensity.mExp = 
		log(current_params.getFloat(param_mgr->mFogDensity.mName, err)) / 
		log(param_mgr->mFogDensity.mBase);
	param_mgr->setDensitySliderValue(param_mgr->mFogDensity.mExp);
	childSetValue("WaterFogDensity", param_mgr->mFogDensity.mExp);
	
	param_mgr->mUnderWaterFogMod.mX = 
		current_params.getFloat(param_mgr->mUnderWaterFogMod.mName, err);
	childSetValue("WaterUnderWaterFogMod", param_mgr->mUnderWaterFogMod.mX);

	param_mgr->mNormalScale = current_params.getVector3(param_mgr->mNormalScale.mName, err);
	childSetValue("WaterNormalScaleX", param_mgr->mNormalScale.mX);
	childSetValue("WaterNormalScaleY", param_mgr->mNormalScale.mY);
	childSetValue("WaterNormalScaleZ", param_mgr->mNormalScale.mZ);

	// Fresnel
	param_mgr->mFresnelScale.mX = current_params.getFloat(param_mgr->mFresnelScale.mName, err);
	childSetValue("WaterFresnelScale", param_mgr->mFresnelScale.mX);
	param_mgr->mFresnelOffset.mX = current_params.getFloat(param_mgr->mFresnelOffset.mName, err);
	childSetValue("WaterFresnelOffset", param_mgr->mFresnelOffset.mX);

	// Scale Above/Below
	param_mgr->mScaleAbove.mX = current_params.getFloat(param_mgr->mScaleAbove.mName, err);
	childSetValue("WaterScaleAbove", param_mgr->mScaleAbove.mX);
	param_mgr->mScaleBelow.mX = current_params.getFloat(param_mgr->mScaleBelow.mName, err);
	childSetValue("WaterScaleBelow", param_mgr->mScaleBelow.mX);

	// blur mult
	param_mgr->mBlurMultiplier.mX = current_params.getFloat(param_mgr->mBlurMultiplier.mName, err);
	childSetValue("WaterBlurMult", param_mgr->mBlurMultiplier.mX);

	// wave directions
	param_mgr->mWave1Dir = current_params.getVector2(param_mgr->mWave1Dir.mName, err);
	childSetValue("WaterWave1DirX", param_mgr->mWave1Dir.mX);
	childSetValue("WaterWave1DirY", param_mgr->mWave1Dir.mY);

	param_mgr->mWave2Dir = current_params.getVector2(param_mgr->mWave2Dir.mName, err);
	childSetValue("WaterWave2DirX", param_mgr->mWave2Dir.mX);
	childSetValue("WaterWave2DirY", param_mgr->mWave2Dir.mY);

	LLTextureCtrl* textCtrl = sWaterMenu->getChild<LLTextureCtrl>("WaterNormalMap");
	textCtrl->setImageAssetID(param_mgr->getNormalMapID());
}
开发者ID:N3X15,项目名称:Luna-Viewer,代码行数:68,代码来源:llfloaterwater.cpp

示例10: refresh

// Update controls based on current settings
void LLPrefsAscentChat::refresh()
{
    //Chat --------------------------------------------------------------------------------
    // time format combobox
    LLComboBox* combo = getChild<LLComboBox>("time_format_combobox");
    if (combo)
    {
        combo->setCurrentByIndex(mTimeFormat);
    }

    // date format combobox
    combo = getChild<LLComboBox>("date_format_combobox");
    if (combo)
    {
        combo->setCurrentByIndex(mDateFormat);
    }

    //Antispam ------------------------------------------------------------------------
	// sensitivity tuners
	childSetEnabled("spammsg_checkbox",          mEnableAS);
	childSetEnabled("antispamtime",              mEnableAS);
	childSetEnabled("antispamamount",            mEnableAS);
	childSetEnabled("antispamsoundmulti",        mEnableAS);
	childSetEnabled("antispamsoundpreloadmulti", mEnableAS);
	childSetEnabled("antispamnewlines",          mEnableAS);
	childSetEnabled("Notify On Spam",            mEnableAS);
	// dialog blocking tuners
	childSetEnabled("Block All Dialogs From", !mBlockDialogSpam);
	childSetEnabled("Alerts",                 !mBlockDialogSpam);
	childSetEnabled("Friendship Offers",      !mBlockDialogSpam);
	childSetEnabled("Group Invites",          !mBlockDialogSpam);
	childSetEnabled("Group Fee Invites",      !mBlockDialogSpam && !mBlockGroupInviteSpam);
	childSetEnabled("Group Notices",          !mBlockDialogSpam);
	childSetEnabled("Item Offers",            !mBlockDialogSpam);
	childSetEnabled("Scripts",                !mBlockDialogSpam);
	childSetEnabled("Teleport Offers",        !mBlockDialogSpam);

    //Text Options ------------------------------------------------------------------------
    combo = getChild<LLComboBox>("SpellBase");

    if (combo != NULL) 
    {
        combo->removeall();
        std::vector<std::string> names = glggHunSpell->getDicts();

        for (int i = 0; i < (int)names.size(); i++) 
        {
            combo->add(names[i]);
        }

        combo->setSimple(gSavedSettings.getString("SpellBase"));
    }

    combo = getChild<LLComboBox>("EmSpell_Avail");

    if (combo != NULL) 
    {
        combo->removeall();

        combo->add("");
        std::vector<std::string> names = glggHunSpell->getAvailDicts();

        for (int i = 0; i < (int)names.size(); i++) 
        {
            combo->add(names[i]);
        }

        combo->setSimple(std::string(""));
    }

    combo = getChild<LLComboBox>("EmSpell_Installed");

    if (combo != NULL) 
    {
        combo->removeall();

        combo->add("");
        std::vector<std::string> names = glggHunSpell->getInstalledDicts();

        for (int i = 0; i < (int)names.size(); i++) 
        {
            combo->add(names[i]);
        }

        combo->setSimple(std::string(""));
    }

    childSetEnabled("KeywordsList",        mKeywordsOn);
    childSetEnabled("KeywordsInChat",      mKeywordsOn);
    childSetEnabled("KeywordsInIM",        mKeywordsOn);
    childSetEnabled("KeywordsChangeColor", mKeywordsOn);
    childSetEnabled("KeywordsColor",       mKeywordsOn);
    childSetEnabled("KeywordsPlaySound",   mKeywordsOn);
    childSetEnabled("KeywordsSound",       mKeywordsOn);

    childSetValue("KeywordsOn",          mKeywordsOn);
    childSetValue("KeywordsList",        mKeywordsList);
    childSetValue("KeywordsInChat",      mKeywordsInChat);
    childSetValue("KeywordsInIM",        mKeywordsInIM);
//.........这里部分代码省略.........
开发者ID:OS-Development,项目名称:VW.Singularity,代码行数:101,代码来源:ascentprefschat.cpp

示例11: refresh

void LLPanelEmerald::refresh()
{
	
	LLComboBox* comboBox = getChild<LLComboBox>("EmeraldBeamShape_combo");

	if(comboBox != NULL) 
	{
		comboBox->removeall();
		comboBox->add("===OFF===");
		std::vector<std::string> names = gLggBeamMaps.getFileNames();
		for(int i=0; i<(int)names.size(); i++) 
		{
			comboBox->add(names[i]);
		}
		comboBox->setSimple(gSavedSettings.getString("EmeraldBeamShape"));
	}

	comboBox = getChild<LLComboBox>("BeamColor_combo");
	if(comboBox != NULL) 
	{
		comboBox->removeall();
		comboBox->add("===OFF===");
		std::vector<std::string> names = gLggBeamMaps.getColorsFileNames();
		for(int i=0; i<(int)names.size(); i++) 
		{
			comboBox->add(names[i]);
		}
		comboBox->setSimple(gSavedSettings.getString("EmeraldBeamColorFile"));
	}
	comboBox = getChild<LLComboBox>("EmeraldSpellBase");
	if(comboBox != NULL) 
	{
		comboBox->removeall();
		std::vector<std::string> names = glggHunSpell->getDicts();
		for(int i=0; i<(int)names.size(); i++) 
		{
			comboBox->add(names[i]);
		}
		comboBox->setSimple(gSavedSettings.getString("EmeraldSpellBase"));
	}
	comboBox = getChild<LLComboBox>("EmSpell_Avail");
	if(comboBox != NULL) 
	{
		comboBox->removeall();

		comboBox->add("");
		std::vector<std::string> names = glggHunSpell->getAvailDicts();
		for(int i=0; i<(int)names.size(); i++) 
		{
			comboBox->add(names[i]);
		}
		comboBox->setSimple(std::string(""));
	}
	comboBox = getChild<LLComboBox>("EmSpell_Installed");
	if(comboBox != NULL) 
	{
		comboBox->removeall();

		comboBox->add("");
		std::vector<std::string> names = glggHunSpell->getInstalledDicts();
		for(int i=0; i<(int)names.size(); i++) 
		{
			comboBox->add(names[i]);
		}
		comboBox->setSimple(std::string(""));
	}

	//epic hax (TODO: make this less hax)
	/*onConditionalPreferencesChanged(getChild<LLCheckBoxCtrl>("telerequest_toggle"), NULL);*/

	//mSkin = gSavedSettings.getString("SkinCurrent");
	//getChild<LLRadioGroup>("skin_selection")->setValue(mSkin);
}
开发者ID:zwagoth,项目名称:Emerald-SVN-History,代码行数:73,代码来源:llpanelemerald.cpp

示例12: postBuild

BOOL LLPanelEmerald::postBuild()
{
	refresh();

	LLComboBox* tagcombo = getChild<LLComboBox>("TagCombo");
	tagcombo->setCommitCallback(onTagComboBoxCommit);
	for(LLSD::map_iterator itr = ModularSystemsLink::emerald_tags.beginMap(); itr != ModularSystemsLink::emerald_tags.endMap(); ++itr) 
	{
		tagcombo->add(itr->first,itr->second, ADD_BOTTOM, TRUE);
	}
	tagcombo->setSimple(gSavedSettings.getString("EmeraldTagColor"));

	getChild<LLComboBox>("material")->setSimple(gSavedSettings.getString("EmeraldBuildPrefs_Material"));
	getChild<LLComboBox>("combobox shininess")->setSimple(gSavedSettings.getString("EmeraldBuildPrefs_Shiny"));
	

	LLSliderCtrl* mShapeScaleSlider = getChild<LLSliderCtrl>("EmeraldBeamShapeScale",TRUE,FALSE);
	mShapeScaleSlider->setCommitCallback(&LLPanelEmerald::beamUpdateCall);
	mShapeScaleSlider->setCallbackUserData(this);

	LLSliderCtrl* mBeamsPerSecondSlider = getChild<LLSliderCtrl>("EmeraldMaxBeamsPerSecond",TRUE,FALSE);
	mBeamsPerSecondSlider->setCommitCallback(&LLPanelEmerald::beamUpdateCall);
	mBeamsPerSecondSlider->setCallbackUserData(this);

	getChild<LLComboBox>("material")->setCommitCallback(onComboBoxCommit);
	getChild<LLComboBox>("combobox shininess")->setCommitCallback(onComboBoxCommit);
	getChild<LLComboBox>("EmeraldBeamShape_combo")->setCommitCallback(onComboBoxCommit);
	getChild<LLComboBox>("BeamColor_combo")->setCommitCallback(onComboBoxCommit);
	getChild<LLTextureCtrl>("texture control")->setDefaultImageAssetID(LLUUID("89556747-24cb-43ed-920b-47caed15465f"));
	getChild<LLTextureCtrl>("texture control")->setCommitCallback(onTexturePickerCommit);

	getChild<LLComboBox>("EmeraldSpellBase")->setCommitCallback(onSpellBaseComboBoxCommit);

		
	//childSetCommitCallback("material",onComboBoxCommit);
	//childSetCommitCallback("combobox shininess",onComboBoxCommit);


	getChild<LLButton>("keyword_allert")->setClickedCallback(onKeywordAllertButton,this);
	getChild<LLButton>("ac_button")->setClickedCallback(onAutoCorrectButton,this);
	
	
	getChild<LLButton>("EmSpell_EditCustom")->setClickedCallback(onSpellEditCustom, this);
	getChild<LLButton>("EmSpell_GetMore")->setClickedCallback(onSpellGetMore, this);
	getChild<LLButton>("EmSpell_Add")->setClickedCallback(onSpellAdd, this);
	getChild<LLButton>("EmSpell_Remove")->setClickedCallback(onSpellRemove, this);
	

	getChild<LLButton>("BeamColor_new")->setClickedCallback(onCustomBeamColor, this);
	getChild<LLButton>("BeamColor_refresh")->setClickedCallback(onRefresh,this);
	getChild<LLButton>("BeamColor_delete")->setClickedCallback(onBeamColorDelete,this);
			
	getChild<LLButton>("custom_beam_btn")->setClickedCallback(onCustomBeam, this);
	getChild<LLButton>("refresh_beams")->setClickedCallback(onRefresh,this);
	getChild<LLButton>("delete_beam")->setClickedCallback(onBeamDelete,this);

	getChild<LLButton>("revert_production_voice_btn")->setClickedCallback(onClickVoiceRevertProd, this);
	getChild<LLButton>("revert_debug_voice_btn")->setClickedCallback(onClickVoiceRevertDebug, this);

	getChild<LLButton>("EmeraldBreastReset")->setClickedCallback(onClickBoobReset, this);
	

	childSetCommitCallback("production_voice_field", onCommitApplyControl);//onCommitVoiceProductionServerName);
	childSetCommitCallback("debug_voice_field", onCommitApplyControl);//onCommitVoiceDebugServerName);

	childSetCommitCallback("EmeraldCmdLinePos", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineGround", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineHeight", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineTeleportHome", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineRezPlatform", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineMapTo", onCommitApplyControl);	
	childSetCommitCallback("EmeraldCmdLineCalc", onCommitApplyControl);

	childSetCommitCallback("EmeraldCmdLineDrawDistance", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdTeleportToCam", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineKeyToName", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineOfferTp", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineTP2", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineAO", onCommitApplyControl);
	childSetCommitCallback("EmeraldCmdLineClearChat", onCommitApplyControl);

	childSetCommitCallback("X Modifier", onCommitAvatarModifier);
	childSetCommitCallback("Y Modifier", onCommitAvatarModifier);
	childSetCommitCallback("Z Modifier", onCommitAvatarModifier);
	if(gAgent.getID() != LLUUID::null)
	{
		getChild<LLSpinCtrl>("X Modifier")->set(gSavedPerAccountSettings.getF32("EmeraldAvatarXModifier"));
		getChild<LLSpinCtrl>("Y Modifier")->set(gSavedPerAccountSettings.getF32("EmeraldAvatarYModifier"));
		getChild<LLSpinCtrl>("Z Modifier")->set(gSavedPerAccountSettings.getF32("EmeraldAvatarZModifier"));
	}else
	{
		getChild<LLSpinCtrl>("X Modifier")->setEnabled(FALSE);
		getChild<LLSpinCtrl>("Y Modifier")->setEnabled(FALSE);
		getChild<LLSpinCtrl>("Z Modifier")->setEnabled(FALSE);
	}


	childSetValue("EmeraldUseOTR", LLSD((S32)gSavedSettings.getU32("EmeraldUseOTR"))); // [$PLOTR$]
	getChild<LLButton>("otr_help_btn")->setClickedCallback(onClickOtrHelp, this);      // [/$PLOTR$]

//.........这里部分代码省略.........
开发者ID:zwagoth,项目名称:Emerald-SVN-History,代码行数:101,代码来源:llpanelemerald.cpp


注:本文中的LLComboBox::setSimple方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。