本文整理汇总了C++中LLControlVariable::getCOAActive方法的典型用法代码示例。如果您正苦于以下问题:C++ LLControlVariable::getCOAActive方法的具体用法?C++ LLControlVariable::getCOAActive怎么用?C++ LLControlVariable::getCOAActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLControlVariable
的用法示例。
在下文中一共展示了LLControlVariable::getCOAActive方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void LLFloaterSettingsDebug::draw()
{
LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
LLControlVariable* controlp = static_cast<LLControlVariable*>(settings_combo->getCurrentUserdata());
updateControl(controlp ? controlp->getCOAActive() : NULL);
LLFloater::draw();
}
示例2: onSettingSelect
//static
void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data)
{
LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
LLComboBox* combo_box = static_cast<LLComboBox*>(ctrl);
LLControlVariable* controlp = static_cast<LLControlVariable*>(combo_box->getCurrentUserdata());
floaterp->updateControl(controlp ? controlp->getCOAActive() : NULL);
}
示例3: getControlVariable
LLControlVariable* LLFloaterSettingsDebug::getControlVariable()
{
LLScrollListItem* item = mSettingsScrollList->getFirstSelected();
if (!item) return NULL;
LLControlVariable* controlp = static_cast<LLControlVariable*>(item->getUserdata());
return controlp ? controlp->getCOAActive() : NULL;
}
示例4: onClickDefault
// static
void LLFloaterSettingsDebug::onClickDefault(void* user_data)
{
LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo");
LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
if (controlp)
{
controlp = controlp->getCOAActive();
controlp->resetToDefault(true);
floaterp->updateControl(controlp);
}
}
示例5: onCommitSettings
//static
void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
{
LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo");
LLControlVariable* controlp = static_cast<LLControlVariable*>(settings_combo->getCurrentUserdata());
controlp = controlp ? controlp->getCOAActive() : NULL;
if(!controlp)//Uh oh!
return;
LLVector3 vector;
LLVector3d vectord;
LLRect rect;
LLColor4 col4;
LLColor3 col3;
LLColor4U col4U;
LLColor4 color_with_alpha;
switch(controlp->type())
{
case TYPE_U32:
controlp->set(floaterp->childGetValue("val_spinner_1"));
break;
case TYPE_S32:
controlp->set(floaterp->childGetValue("val_spinner_1"));
break;
case TYPE_F32:
controlp->set(LLSD(floaterp->childGetValue("val_spinner_1").asReal()));
break;
case TYPE_BOOLEAN:
controlp->set(floaterp->childGetValue("boolean_combo"));
break;
case TYPE_STRING:
controlp->set(LLSD(floaterp->childGetValue("val_text").asString()));
break;
case TYPE_VEC3:
vector.mV[VX] = (F32)floaterp->childGetValue("val_spinner_1").asReal();
vector.mV[VY] = (F32)floaterp->childGetValue("val_spinner_2").asReal();
vector.mV[VZ] = (F32)floaterp->childGetValue("val_spinner_3").asReal();
controlp->set(vector.getValue());
break;
case TYPE_VEC3D:
vectord.mdV[VX] = floaterp->childGetValue("val_spinner_1").asReal();
vectord.mdV[VY] = floaterp->childGetValue("val_spinner_2").asReal();
vectord.mdV[VZ] = floaterp->childGetValue("val_spinner_3").asReal();
controlp->set(vectord.getValue());
break;
case TYPE_RECT:
rect.mLeft = floaterp->childGetValue("val_spinner_1").asInteger();
rect.mRight = floaterp->childGetValue("val_spinner_2").asInteger();
rect.mBottom = floaterp->childGetValue("val_spinner_3").asInteger();
rect.mTop = floaterp->childGetValue("val_spinner_4").asInteger();
controlp->set(rect.getValue());
break;
case TYPE_COL4:
col3.setValue(floaterp->childGetValue("color_swatch"));
col4 = LLColor4(col3, (F32)floaterp->childGetValue("val_spinner_4").asReal());
controlp->set(col4.getValue());
break;
case TYPE_COL3:
controlp->set(floaterp->childGetValue("color_swatch"));
//col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC();
//col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal();
//col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal();
//controlp->set(col3.getValue());
break;
case TYPE_COL4U:
col3.setValue(floaterp->childGetValue("color_swatch"));
col4U.setVecScaleClamp(col3);
col4U.mV[VALPHA] = floaterp->childGetValue("val_spinner_4").asInteger();
controlp->set(col4U.getValue());
break;
default:
break;
}
}