本文整理汇总了C++中LLTextBox::setText方法的典型用法代码示例。如果您正苦于以下问题:C++ LLTextBox::setText方法的具体用法?C++ LLTextBox::setText怎么用?C++ LLTextBox::setText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLTextBox
的用法示例。
在下文中一共展示了LLTextBox::setText方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setText
void LLViewChildren::setText(
const std::string& id, const std::string& text, bool visible)
{
LLTextBox* child = mParent.getChild<LLTextBox>(id);
if (child)
{
child->setVisible(visible);
child->setText(text);
}
}
示例2: updateMediaCurrentURL
void LLInspectObject::updateMediaCurrentURL()
{
if(!mMediaEntry)
return;
LLTextBox* textbox = getChild<LLTextBox>("object_media_url");
std::string media_url = "";
textbox->setValue(media_url);
textbox->setToolTip(media_url);
LLStringUtil::format_map_t args;
if(mMediaImpl.notNull() && mMediaImpl->hasMedia())
{
LLPluginClassMedia* media_plugin = NULL;
media_plugin = mMediaImpl->getMediaPlugin();
if(media_plugin)
{
if(media_plugin->pluginSupportsMediaTime())
{
args["[CurrentURL]"] = mMediaImpl->getMediaURL();
}
else
{
args["[CurrentURL]"] = media_plugin->getLocation();
}
media_url = LLTrans::getString("CurrentURL", args);
}
}
else if(mMediaEntry->getCurrentURL() != "")
{
args["[CurrentURL]"] = mMediaEntry->getCurrentURL();
media_url = LLTrans::getString("CurrentURL", args);
}
textbox->setText(media_url);
textbox->setToolTip(media_url);
}
示例3: updateUI
void LLFloaterBuyCurrencyUI::updateUI()
{
bool hasError = mManager.hasError();
mManager.updateUI(!hasError && !mManager.buying());
// hide most widgets - we'll turn them on as needed next
getChildView("info_buying")->setVisible(FALSE);
getChildView("info_cannot_buy")->setVisible(FALSE);
getChildView("info_need_more")->setVisible(FALSE);
getChildView("purchase_warning_repurchase")->setVisible(FALSE);
getChildView("purchase_warning_notenough")->setVisible(FALSE);
getChildView("contacting")->setVisible(FALSE);
getChildView("buy_action")->setVisible(FALSE);
if (hasError)
{
// display an error from the server
getChildView("normal_background")->setVisible(FALSE);
getChildView("error_background")->setVisible(TRUE);
getChildView("info_cannot_buy")->setVisible(TRUE);
getChildView("cannot_buy_message")->setVisible(TRUE);
getChildView("balance_label")->setVisible(FALSE);
getChildView("balance_amount")->setVisible(FALSE);
getChildView("buying_label")->setVisible(FALSE);
getChildView("buying_amount")->setVisible(FALSE);
getChildView("total_label")->setVisible(FALSE);
getChildView("total_amount")->setVisible(FALSE);
LLTextBox* message = getChild<LLTextBox>("cannot_buy_message");
if (message)
{
message->setText(mManager.errorMessage());
}
getChildView("error_web")->setVisible( !mManager.errorURI().empty());
}
else
{
// display the main Buy L$ interface
getChildView("normal_background")->setVisible(TRUE);
getChildView("error_background")->setVisible(FALSE);
getChildView("cannot_buy_message")->setVisible(FALSE);
getChildView("error_web")->setVisible(FALSE);
if (mHasTarget)
{
getChildView("info_need_more")->setVisible(TRUE);
}
else
{
getChildView("info_buying")->setVisible(TRUE);
}
if (mManager.buying())
{
getChildView("contacting")->setVisible( true);
}
else
{
if (mHasTarget)
{
getChildView("buy_action")->setVisible( true);
getChild<LLUICtrl>("buy_action")->setTextArg("[ACTION]", mTargetName);
}
}
S32 balance = gStatusBar->getBalance();
getChildView("balance_label")->setVisible(TRUE);
getChildView("balance_amount")->setVisible(TRUE);
getChild<LLUICtrl>("balance_amount")->setTextArg("[AMT]", llformat("%d", balance));
S32 buying = mManager.getAmount();
getChildView("buying_label")->setVisible(TRUE);
getChildView("buying_amount")->setVisible(TRUE);
getChild<LLUICtrl>("buying_amount")->setTextArg("[AMT]", llformat("%d", buying));
S32 total = balance + buying;
getChildView("total_label")->setVisible(TRUE);
getChildView("total_amount")->setVisible(TRUE);
getChild<LLUICtrl>("total_amount")->setTextArg("[AMT]", llformat("%d", total));
if (mHasTarget)
{
if (total >= mTargetPrice)
{
getChildView("purchase_warning_repurchase")->setVisible( true);
}
else
{
getChildView("purchase_warning_notenough")->setVisible( true);
}
}
}
getChildView("getting_data")->setVisible( !mManager.canBuy() && !hasError);
}
示例4: updateFloaterEstateOwnerName
void LLFloaterBuyLandUI::updateFloaterEstateOwnerName(const std::string& name)
{
LLTextBox* box = getChild<LLTextBox>("estate_owner_text");
if (box) box->setText(name);
}
示例5: updateFloaterLastModified
void LLFloaterBuyLandUI::updateFloaterLastModified(const std::string& text)
{
LLTextBox* editor = getChild<LLTextBox>("covenant_timestamp_text");
if (editor) editor->setText(text);
}
示例6: updateFloaterEstateName
void LLFloaterBuyLandUI::updateFloaterEstateName(const std::string& name)
{
LLTextBox* box = getChild<LLTextBox>("estate_name_text");
box->setText(name);
box->setToolTip(name);
}