本文整理汇总了C++中LLTextBox::setVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ LLTextBox::setVisible方法的具体用法?C++ LLTextBox::setVisible怎么用?C++ LLTextBox::setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLTextBox
的用法示例。
在下文中一共展示了LLTextBox::setVisible方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateCovenantText
void LLFloaterBuyLandUI::updateCovenantText(const std::string &string, const LLUUID& asset_id)
{
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("covenant_editor");
if (editor)
{
editor->setHandleEditKeysDirectly(FALSE);
editor->setText(string);
LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
LLTextBox* box = getChild<LLTextBox>("covenant_text");
if(check && box)
{
if (asset_id.isNull())
{
check->set(true);
check->setEnabled(false);
refreshUI();
// remove the line stating that you must agree
box->setVisible(FALSE);
}
else
{
check->setEnabled(true);
// remove the line stating that you must agree
box->setVisible(TRUE);
}
}
}
}
示例2: updateCovenantInfo
void LLFloaterBuyLandUI::updateCovenantInfo()
{
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if(!region) return;
LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
if (region_name)
{
region_name->setText(region->getName());
}
LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
if (resellable_clause)
{
if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL)
{
resellable_clause->setText(getString("can_not_resell"));
}
else
{
resellable_clause->setText(getString("can_resell"));
}
}
LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause");
if (changeable_clause)
{
if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES)
{
changeable_clause->setText(getString("can_change"));
}
else
{
changeable_clause->setText(getString("can_not_change"));
}
}
LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
if(check)
{
check->set(false);
check->setEnabled(true);
check->setCallbackUserData(this);
check->setCommitCallback(onChangeAgreeCovenant);
}
LLTextBox* box = getChild<LLTextBox>("covenant_text");
if(box)
{
box->setVisible(FALSE);
}
// send EstateCovenantInfo message
LLMessageSystem *msg = gMessageSystem;
msg->newMessage("EstateCovenantRequest");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
msg->sendReliable(region->getHost());
}
示例3: childSetWrappedText
void LLPanel::childSetWrappedText(const std::string& id, const std::string& text, bool visible)
{
LLTextBox* child = getChild<LLTextBox>(id);
if (child)
{
child->setVisible(visible);
child->setWrappedText(text);
}
}
示例4: 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);
}
}
示例5: updateCovenantInfo
void LLFloaterBuyLandUI::updateCovenantInfo()
{
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if(!region) return;
U8 sim_access = region->getSimAccess();
std::string rating = LLViewerRegion::accessToString(sim_access);
LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
if (region_name)
{
std::string region_name_txt = region->getName() + " ("+rating +")";
region_name->setText(region_name_txt);
LLIconCtrl* rating_icon = getChild<LLIconCtrl>("rating_icon");
LLRect rect = rating_icon->getRect();
S32 region_name_width = llmin(region_name->getRect().getWidth(), region_name->getTextBoundingRect().getWidth());
S32 icon_left_pad = region_name->getRect().mLeft + region_name_width + ICON_PAD;
region_name->setToolTip(region_name->getText());
rating_icon->setRect(rect.setOriginAndSize(icon_left_pad, rect.mBottom, rect.getWidth(), rect.getHeight()));
switch(sim_access)
{
case SIM_ACCESS_PG:
rating_icon->setValue(getString("icon_PG"));
break;
case SIM_ACCESS_ADULT:
rating_icon->setValue(getString("icon_R"));
break;
default:
rating_icon->setValue(getString("icon_M"));
}
}
LLTextBox* region_type = getChild<LLTextBox>("region_type_text");
if (region_type)
{
region_type->setText(region->getLocalizedSimProductName());
region_type->setToolTip(region->getLocalizedSimProductName());
}
LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
if (resellable_clause)
{
if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL)
{
resellable_clause->setText(getString("can_not_resell"));
}
else
{
resellable_clause->setText(getString("can_resell"));
}
}
LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause");
if (changeable_clause)
{
if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES)
{
changeable_clause->setText(getString("can_change"));
}
else
{
changeable_clause->setText(getString("can_not_change"));
}
}
LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
if(check)
{
check->set(false);
check->setEnabled(true);
check->setCommitCallback(onChangeAgreeCovenant, this);
}
LLTextBox* box = getChild<LLTextBox>("covenant_text");
if(box)
{
box->setVisible(FALSE);
}
// send EstateCovenantInfo message
LLMessageSystem *msg = gMessageSystem;
msg->newMessage("EstateCovenantRequest");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
msg->sendReliable(region->getHost());
}
示例6: refreshUI
void LLFloaterBuyLandUI::refreshUI()
{
// section zero: title area
{
LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("info_image");
if (snapshot)
{
snapshot->setImageAssetID(
mParcelValid ? mParcelSnapshot : LLUUID::null);
}
if (mParcelValid)
{
getChild<LLUICtrl>("info_parcel")->setValue(mParcelLocation);
LLStringUtil::format_map_t string_args;
string_args["[AMOUNT]"] = llformat("%d", mParcelActualArea);
string_args["[AMOUNT2]"] = llformat("%d", mParcelSupportedObjects);
getChild<LLUICtrl>("info_size")->setValue(getString("meters_supports_object", string_args));
F32 cost_per_sqm = 0.0f;
if (mParcelActualArea > 0)
{
cost_per_sqm = (F32)mParcelPrice / (F32)mParcelActualArea;
}
LLStringUtil::format_map_t info_price_args;
info_price_args["[PRICE]"] = llformat("%d", mParcelPrice);
info_price_args["[PRICE_PER_SQM]"] = llformat("%.1f", cost_per_sqm);
if (mParcelSoldWithObjects)
{
info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_with_objects");
}
else
{
info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_without_objects");
}
getChild<LLUICtrl>("info_price")->setValue(getString("info_price_string", info_price_args));
getChildView("info_price")->setVisible( mParcelIsForSale);
}
else
{
getChild<LLUICtrl>("info_parcel")->setValue(getString("no_parcel_selected"));
getChild<LLUICtrl>("info_size")->setValue(LLStringUtil::null);
getChild<LLUICtrl>("info_price")->setValue(LLStringUtil::null);
}
getChild<LLUICtrl>("info_action")->setValue(
mCanBuy
?
mIsForGroup
? getString("buying_for_group")//"Buying land for group:"
: getString("buying_will")//"Buying this land will:"
:
mCannotBuyIsError
? getString("cannot_buy_now")//"Cannot buy now:"
: getString("not_for_sale")//"Not for sale:"
);
}
bool showingError = !mCanBuy || !mSiteValid;
// error section
if (showingError)
{
mChildren.setBadge(std::string("step_error"),
mCannotBuyIsError
? LLViewChildren::BADGE_ERROR
: LLViewChildren::BADGE_WARN);
LLTextBox* message = getChild<LLTextBox>("error_message");
if (message)
{
message->setVisible(true);
message->setValue(LLSD(!mCanBuy ? mCannotBuyReason : "(waiting for data)"));
}
getChildView("error_web")->setVisible(mCannotBuyIsError && !mCannotBuyURI.empty());
}
else
{
getChildView("step_error")->setVisible(FALSE);
getChildView("error_message")->setVisible(FALSE);
getChildView("error_web")->setVisible(FALSE);
}
// section one: account
if (!showingError)
{
mChildren.setBadge(std::string("step_1"),
mSiteMembershipUpgrade
? LLViewChildren::BADGE_NOTE
: LLViewChildren::BADGE_OK);
getChild<LLUICtrl>("account_action")->setValue(mSiteMembershipAction);
getChild<LLUICtrl>("account_reason")->setValue(
mSiteMembershipUpgrade
? getString("must_upgrade")
//.........这里部分代码省略.........
示例7: draw
// virtual
void LLFloaterTexturePicker::draw()
{
S32 floater_header_size = getHeaderHeight();
if (mOwner)
{
// draw cone of context pointing back to texture swatch
LLRect owner_rect;
mOwner->localRectToOtherView(mOwner->getLocalRect(), &owner_rect, this);
LLRect local_rect = getLocalRect();
if (gFocusMgr.childHasKeyboardFocus(this) && mOwner->isInVisibleChain() && mContextConeOpacity > 0.001f)
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLEnable(GL_CULL_FACE);
gGL.begin(LLRender::QUADS);
{
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
}
gGL.end();
}
}
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
{
mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME));
}
else
{
mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME));
}
updateImageStats();
// if we're inactive, gray out "apply immediate" checkbox
getChildView("show_folders_check")->setEnabled(mActive && mCanApplyImmediately && !mNoCopyTextureSelected);
getChildView("Select")->setEnabled(mActive);
getChildView("Pipette")->setEnabled(mActive);
getChild<LLUICtrl>("Pipette")->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance());
//BOOL allow_copy = FALSE;
if( mOwner )
{
mTexturep = NULL;
if(mImageAssetID.notNull())
{
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES);
mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
}
if (mTentativeLabel)
{
mTentativeLabel->setVisible( FALSE );
}
getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID());
getChildView("Blank")->setEnabled(mImageAssetID != mWhiteImageAssetID );
getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && !mImageAssetID.isNull() );
LLFloater::draw();
if( isMinimized() )
{
return;
}
// Border
LLRect border( BORDER_PAD,
getRect().getHeight() - floater_header_size - BORDER_PAD,
((getMinWidth() / 2) - TEXTURE_INVENTORY_PADDING - HPAD) - BORDER_PAD,
BORDER_PAD + FOOTER_HEIGHT + (getRect().getHeight() - getMinHeight()));
gl_rect_2d( border, LLColor4::black, FALSE );
//.........这里部分代码省略.........
示例8: draw
// virtual
void LLFloaterTexturePicker::draw()
{
if (mOwner)
{
// draw cone of context pointing back to texture swatch
LLRect owner_rect;
mOwner->localRectToOtherView(mOwner->getLocalRect(), &owner_rect, this);
LLRect local_rect = getLocalRect();
if (gFocusMgr.childHasKeyboardFocus(this) && mOwner->isInVisibleChain() && mContextConeOpacity > 0.001f)
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLEnable(GL_CULL_FACE);
gGL.begin(LLRender::QUADS);
{
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
}
gGL.end();
}
}
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
{
mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME));
}
else
{
mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME));
}
updateImageStats();
// if we're inactive, gray out "apply immediate" checkbox
childSetEnabled("show_folders_check", mActive && mCanApplyImmediately && !mNoCopyTextureSelected);
childSetEnabled("Select", mActive);
childSetEnabled("Pipette", mActive);
childSetValue("Pipette", LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance());
//RN: reset search bar to reflect actual search query (all caps, for example)
mSearchEdit->setText(mInventoryPanel->getFilterSubString());
//BOOL allow_copy = FALSE;
if( mOwner )
{
mTexturep = NULL;
if(mImageAssetID.notNull())
{
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES, LLViewerTexture::BOOST_PREVIEW);
}
else if (!mFallbackImageName.empty())
{
mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, MIPMAP_YES, LLViewerTexture::BOOST_PREVIEW);
}
if (mTentativeLabel)
{
mTentativeLabel->setVisible( FALSE );
}
childSetEnabled("Default", mImageAssetID != mOwner->getDefaultImageAssetID());
childSetEnabled("Blank", mImageAssetID != mWhiteImageAssetID );
childSetEnabled("Invisible", mOwner->getAllowInvisibleTexture() && mImageAssetID != mInvisibleImageAssetID );
childSetEnabled("Alpha", mImageAssetID != mAlphaImageAssetID );
LLFloater::draw();
if( isMinimized() )
{
return;
}
// Border
LLRect border( BORDER_PAD,
//.........这里部分代码省略.........
示例9: draw
// virtual
void LLFloaterTexturePicker::draw()
{
if (mOwner)
{
// draw cone of context pointing back to texture swatch
LLRect owner_rect;
mOwner->localRectToOtherView(mOwner->getLocalRect(), &owner_rect, this);
LLRect local_rect = getLocalRect();
if (gFocusMgr.childHasKeyboardFocus(this) && mOwner->isInVisibleChain() && mContextConeOpacity > 0.001f)
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLEnable(GL_CULL_FACE);
gGL.begin(LLRender::TRIANGLE_STRIP);
{
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
}
gGL.end();
}
}
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
{
mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLSmoothInterpolation::getInterpolant(CONTEXT_FADE_TIME));
}
else
{
mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLSmoothInterpolation::getInterpolant(CONTEXT_FADE_TIME));
}
updateImageStats();
// if we're inactive, gray out "apply immediate" checkbox
getChildView("show_folders_check")->setEnabled(mActive && mCanApplyImmediately && !mNoCopyTextureSelected);
getChildView("Select")->setEnabled(mActive && mCanApply);
getChildView("Pipette")->setEnabled(mActive);
getChild<LLUICtrl>("Pipette")->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance());
//RN: reset search bar to reflect actual search query (all caps, for example)
mFilterEdit->setText(mInventoryPanel->getFilterSubString());
//BOOL allow_copy = FALSE;
if( mOwner )
{
mTexturep = NULL;
if(mImageAssetID.notNull())
{
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_PREVIEW);
}
else if (!mFallbackImageName.empty())
{
mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, FTT_LOCAL_FILE, MIPMAP_YES, LLGLTexture::BOOST_PREVIEW);
}
if (mTentativeLabel)
{
mTentativeLabel->setVisible( FALSE );
}
getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID());
getChildView("Blank")->setEnabled(mImageAssetID != mWhiteImageAssetID);
getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && !mImageAssetID.isNull() );
getChildView("Invisible")->setEnabled(mOwner->getAllowInvisibleTexture() && mImageAssetID != mInvisibleImageAssetID);
getChildView("Alpha")->setEnabled(mImageAssetID != mAlphaImageAssetID);
LLFloater::draw();
if( isMinimized() )
{
return;
}
// Border
LLRect border( BORDER_PAD,
getRect().getHeight() - LLFLOATER_HEADER_SIZE - BORDER_PAD,
((TEX_PICKER_MIN_WIDTH / 2) - TEXTURE_INVENTORY_PADDING - HPAD) - BORDER_PAD,
BORDER_PAD + FOOTER_HEIGHT + (getRect().getHeight() - TEX_PICKER_MIN_HEIGHT));
gl_rect_2d( border, LLColor4::black, FALSE );
// Interior
//.........这里部分代码省略.........
示例10: updateUI
void LLFloaterBuyCurrencyUI::updateUI()
{
bool hasError = mManager.hasError();
mManager.updateUI(!hasError && !mManager.buying());
// section zero: title area
{
childSetVisible("info_buying", false);
childSetVisible("info_cannot_buy", false);
childSetVisible("info_need_more", false);
if (hasError)
{
childSetVisible("info_cannot_buy", true);
}
else if (mHasTarget)
{
childSetVisible("info_need_more", true);
}
else
{
childSetVisible("info_buying", true);
}
}
// error section
if (hasError)
{
mChildren.setBadge(std::string("step_error"), LLViewChildren::BADGE_ERROR);
LLTextBox* message = getChild<LLTextBox>("error_message");
if (message)
{
message->setVisible(true);
message->setWrappedText(mManager.errorMessage());
}
childSetVisible("error_web", !mManager.errorURI().empty());
if (!mManager.errorURI().empty())
{
childHide("getting_data");
}
}
else
{
childHide("step_error");
childHide("error_message");
childHide("error_web");
}
// currency
childSetVisible("contacting", false);
childSetVisible("buy_action", false);
childSetVisible("buy_action_unknown", false);
if (!hasError)
{
mChildren.setBadge(std::string("step_1"), LLViewChildren::BADGE_NOTE);
if (mManager.buying())
{
childSetVisible("contacting", true);
}
else
{
if (mHasTarget)
{
childSetVisible("buy_action", true);
childSetTextArg("buy_action", "[NAME]", mTargetName);
childSetTextArg("buy_action", "[PRICE]", llformat("%d",mTargetPrice));
}
else
{
childSetVisible("buy_action_unknown", true);
}
}
S32 balance = gStatusBar->getBalance();
childShow("balance_label");
childShow("balance_amount");
childSetTextArg("balance_amount", "[AMT]", llformat("%d", balance));
S32 buying = mManager.getAmount();
childShow("buying_label");
childShow("buying_amount");
childSetTextArg("buying_amount", "[AMT]", llformat("%d", buying));
S32 total = balance + buying;
childShow("total_label");
childShow("total_amount");
childSetTextArg("total_amount", "[AMT]", llformat("%d", total));
childSetVisible("purchase_warning_repurchase", false);
childSetVisible("purchase_warning_notenough", false);
if (mHasTarget)
{
if (total >= mTargetPrice)
{
childSetVisible("purchase_warning_repurchase", true);
}
//.........这里部分代码省略.........
示例11: updateCovenantInfo
void LLFloaterBuyLandUI::updateCovenantInfo()
{
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if(!region) return;
U8 sim_access = region->getSimAccess();
std::string rating = LLViewerRegion::accessToString(sim_access);
LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
if (region_name)
{
std::string region_name_txt = region->getName() + " ("+rating +")";
region_name->setText(region_name_txt);
region_name->setToolTip(region_name->getText());
}
LLTextBox* region_type = getChild<LLTextBox>("region_type_text");
if (region_type)
{
region_type->setText(region->getLocalizedSimProductName());
region_type->setToolTip(region->getLocalizedSimProductName());
}
LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
if (resellable_clause)
{
if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL)
{
resellable_clause->setText(getString("can_not_resell"));
}
else
{
resellable_clause->setText(getString("can_resell"));
}
}
LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause");
if (changeable_clause)
{
if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES)
{
changeable_clause->setText(getString("can_change"));
}
else
{
changeable_clause->setText(getString("can_not_change"));
}
}
LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
if(check)
{
check->set(false);
check->setEnabled(true);
check->setCommitCallback(boost::bind(&LLFloaterBuyLandUI::onChangeAgreeCovenant,_1,(void*)this));
}
LLTextBox* box = getChild<LLTextBox>("covenant_text");
if(box)
{
box->setVisible(FALSE);
}
// send EstateCovenantInfo message
LLMessageSystem *msg = gMessageSystem;
msg->newMessage("EstateCovenantRequest");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
msg->sendReliable(region->getHost());
}