BOOL LLPanelGroups::postBuild() { childSetCommitCallback("group list", onGroupList, this); childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups())); const std::string none_text = getString("none"); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text); childSetAction("Activate", onBtnActivate, this); childSetAction("Info", onBtnInfo, this); childSetAction("IM", onBtnIM, this); childSetAction("Leave", onBtnLeave, this); childSetAction("Create", onBtnCreate, this); childSetAction("Search...", onBtnSearch, this); childSetAction("Invite...", onBtnInvite, this); childSetAction("Titles...", onBtnTitles, this); setDefaultBtn("IM"); childSetDoubleClickCallback("group list", onBtnIM); childSetUserData("group list", this); reset(); return TRUE; }
void LLPanelMyProfileEdit::resetData() { LLPanelMyProfile::resetData(); childSetTextArg("name_text", "[FIRST]", LLStringUtil::null); childSetTextArg("name_text", "[LAST]", LLStringUtil::null); }
BOOL LLPanelGroups::postBuild() { childSetCommitCallback("group list", onGroupList, this); childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); childSetAction("Activate", onBtnActivate, this); childSetAction("Info", onBtnInfo, this); childSetAction("IM", onBtnIM, this); childSetAction("Leave", onBtnLeave, this); childSetAction("Create", onBtnCreate, this); childSetAction("Search...", onBtnSearch, this); childSetAction("Invite...", onBtnInvite, this); setDefaultBtn("IM"); childSetDoubleClickCallback("group list", onBtnIM); childSetUserData("group list", this); reset(); return TRUE; }
BOOL LLPanelDirLand::postBuild() { LLPanelDirBrowser::postBuild(); childSetValue("type", gSavedSettings.getString("FindLandType")); bool adult_enabled = gAgent.canAccessAdult(); bool mature_enabled = gAgent.canAccessMature(); childSetVisible("incpg", true); if (!mature_enabled) { childSetValue("incmature", FALSE); childDisable("incmature"); } if (!adult_enabled) { childSetValue("incadult", FALSE); childDisable("incadult"); } childSetCommitCallback("pricecheck", onCommitPrice, this); childSetCommitCallback("areacheck", onCommitArea, this); childSetValue("priceedit", gStatusBar->getBalance()); childSetEnabled("priceedit", gSavedSettings.getBOOL("FindLandPrice")); childSetPrevalidate("priceedit", LLLineEditor::prevalidateNonNegativeS32); childSetEnabled("areaedit", gSavedSettings.getBOOL("FindLandArea")); childSetPrevalidate("areaedit", LLLineEditor::prevalidateNonNegativeS32); childSetAction("Search", onClickSearchCore, this); setDefaultBtn("Search"); childSetTextArg("land", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetTextArg("pricecheck_symbol", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetLabelArg("pricecheck", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mCurrentSortColumn = "per_meter"; LLScrollListCtrl* results = getChild<LLScrollListCtrl>("results"); if (results) { results->setSortChangedCallback(boost::bind(&LLPanelDirLand::onClickSort,this)); results->sortByColumn(mCurrentSortColumn,mCurrentSortAscending); LLStringUtil::format_map_t args; args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); int n = results->getNumColumns(); for (int i=0; i<n; i++) { LLScrollListColumn *col = results->getColumn(i); std::string label = col->mLabel; LLStringUtil::format(label, args); results->setColumnLabel(col->mName, label); } } childSetVisible("filter_gaming", (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_LAND)); return TRUE; }
BOOL LLPanelMyProfileEdit::postBuild() { initTexturePickerMouseEvents(); childSetTextArg("partner_edit_link", "[URL]", getString("partner_edit_link_url")); childSetTextArg("my_account_link", "[URL]", getString("my_account_link_url")); return LLPanelAvatarProfile::postBuild(); }
void LLFloaterLandHoldings::refreshAggregates() { S32 allowed_area = gStatusBar->getSquareMetersCredit(); S32 current_area = gStatusBar->getSquareMetersCommitted(); S32 available_area = gStatusBar->getSquareMetersLeft(); childSetTextArg("allowed_text", "[AREA]", llformat("%d",allowed_area)); childSetTextArg("current_text", "[AREA]", llformat("%d",current_area)); childSetTextArg("available_text", "[AREA]", llformat("%d",available_area)); }
// clear the group list, and get a fresh set of info. void LLPanelGroups::reset() { LLCtrlListInterface *group_list = childGetListInterface("group list"); if (group_list) { group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); } childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); enableButtons(); }
// clear the group list, and get a fresh set of info. void LLPanelGroups::reset() { LLCtrlListInterface *group_list = childGetListInterface("group list"); if (group_list) { group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); } childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups())); const std::string none_text = getString("none"); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text); enableButtons(); }
void LLPanelAvatarProfile::resetData() { mGroups.clear(); childSetValue("2nd_life_pic",LLUUID::null); childSetValue("real_world_pic",LLUUID::null); childSetValue("online_status",LLStringUtil::null); childSetValue("status_message",LLStringUtil::null); childSetValue("sl_description_edit",LLStringUtil::null); childSetValue("fl_description_edit",LLStringUtil::null); childSetValue("sl_groups",LLStringUtil::null); childSetValue("homepage_edit",LLStringUtil::null); childSetValue("register_date",LLStringUtil::null); childSetValue("acc_status_text",LLStringUtil::null); childSetTextArg("partner_text", "[FIRST]", LLStringUtil::null); childSetTextArg("partner_text", "[LAST]", LLStringUtil::null); }
BOOL postBuild() { getChild<LLUICtrl>("Save")->setCommitCallback(boost::bind(&LLOutfitSaveAsDialog::onSave, this )); getChild<LLUICtrl>("Cancel")->setCommitCallback(boost::bind(&LLOutfitSaveAsDialog::onCancel, this )); childSetTextArg("name ed", "[DESC]", mTempItemName); return TRUE; }
void LLFloaterPay::onCacheOwnerName(const LLUUID& owner_id, const std::string& firstname, const std::string& lastname, BOOL is_group) { if (is_group) { setTitle(getString("payee_group")); } else { setTitle(getString("payee_resident")); } childSetTextArg("payee_name", "[FIRST]", firstname); childSetTextArg("payee_name", "[LAST]", lastname); }
// Default constructor LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_id, const LLUUID& object_id) : LLFloater(name, rect, title), mItemID(item_id), mObjectID(object_id), mDirty(TRUE) // <edit> , mExpanded(FALSE) // </edit> { LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml"); if (!sPropertiesObserver) { sPropertiesObserver = new LLPropertiesObserver; } sPropertiesObserverCount++; childSetTextArg("TextPrice", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); // add the object to the static structure LLUUID key = mItemID ^ mObjectID; sInstances.insert(instance_map::value_type(key, this)); // build the UI // item name & description childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidatePrintableNotPipe); childSetCommitCallback("LabelItemName",onCommitName,this); childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidatePrintableNotPipe); childSetCommitCallback("LabelItemDesc", onCommitDescription, this); // Creator information childSetAction("BtnCreator",onClickCreator,this); // owner information childSetAction("BtnOwner",onClickOwner,this); // acquired date // owner permissions // Permissions debug text // group permissions childSetCommitCallback("CheckShareWithGroup",&onCommitPermissions, this); // everyone permissions childSetCommitCallback("CheckEveryoneCopy",&onCommitPermissions, this); // next owner permissions childSetCommitCallback("CheckNextOwnerModify",&onCommitPermissions, this); childSetCommitCallback("CheckNextOwnerCopy",&onCommitPermissions, this); childSetCommitCallback("CheckNextOwnerTransfer",&onCommitPermissions, this); // Mark for sale or not, and sale info childSetCommitCallback("CheckPurchase",&onCommitSaleInfo, this); childSetCommitCallback("RadioSaleType",&onCommitSaleType, this); // "Price" label for edit childSetCommitCallback("EditPrice",&onCommitSaleInfo, this); // <edit> childSetAction("more_btn", &onClickMore, this); childSetAction("less_btn", &onClickLess, this); childSetAction("copy_btn", &onClickCopy, this); childSetAction("update_btn", &onClickUpdate, this); setExpanded(mExpanded); // </edit> // The UI has been built, now fill in all the values refresh(); }
void LLFloaterMemLeak::draw() { //show total memory leaked if(sTotalLeaked > 0) { std::string bytes_string; LLResMgr::getInstance()->getIntegerString(bytes_string, sTotalLeaked >> 10 ); childSetTextArg("total_leaked_label", "[SIZE]", bytes_string); }
void LLFloaterTools::refresh() { const S32 INFO_WIDTH = getRect().getWidth(); const S32 INFO_HEIGHT = 384; LLRect object_info_rect(0, 0, INFO_WIDTH, -INFO_HEIGHT); BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); S32 idx_features = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FEATURES]); S32 idx_face = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FACE]); S32 idx_contents = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_CONTENTS]); S32 selected_index = mTab->getCurrentPanelIndex(); if (!all_volume && (selected_index == idx_features || selected_index == idx_face || selected_index == idx_contents)) { mTab->selectFirstTab(); } mTab->enableTabButton(idx_features, all_volume); mTab->enableTabButton(idx_face, all_volume); mTab->enableTabButton(idx_contents, all_volume); // Refresh object and prim count labels LLLocale locale(LLLocale::USER_LOCALE); std::string obj_count_string; LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount()); childSetTextArg("obj_count", "[COUNT]", obj_count_string); std::string prim_count_string; LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount()); childSetTextArg("prim_count", "[COUNT]", prim_count_string); updateToolsPrecision(); // Refresh child tabs mPanelPermissions->refresh(); mPanelObject->refresh(); mPanelVolume->refresh(); mPanelFace->refresh(); mPanelContents->refresh(); mPanelLandInfo->refresh(); }
void LLFloaterOpenObject::refresh() { mPanelInventory->refresh(); LLSelectNode* node = mObjectSelection->getFirstRootNode(); if (node) { std::string name = node->mName; childSetTextArg("object_name", "[DESC]", name); } }
// called from setFocus() // called internally too void HippoPanelGridsImpl::refresh() { const std::string &defaultGrid = gHippoGridManager->getDefaultGridName(); LLComboBox *grids = getChild<LLComboBox>("grid_selector"); 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->getGridName(); if (grid != defaultGrid) { grids->add(grid); if (grid == mCurGrid) selectIndex = i; i++; } } if ((mState == ADD_NEW) || (mState == ADD_COPY)) { grids->add("<new>"); selectIndex = i++; } if (selectIndex >= 0) { grids->setCurrentByIndex(selectIndex); } else { grids->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label } childSetTextArg("default_grid", "[DEFAULT]", (defaultGrid != "")? defaultGrid: " "); childSetEnabled("btn_delete", (selectIndex >= 0)); childSetEnabled("btn_copy", (mState == NORMAL) && (selectIndex >= 0)); childSetEnabled("btn_default", (mState == NORMAL) && (selectIndex > 0)); childSetEnabled("gridname", (mState == ADD_NEW) || (mState == ADD_COPY)); if (childGetValue("platform").asString() == "SecondLife") { // disable platform selector, if logged into the grid edited and it is SL // so object export restrictions cannot be circumvented by changing the platform bool enablePlatform = (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) || (mCurGrid != gHippoGridManager->getConnectedGrid()->getGridName()); childSetEnabled("platform", enablePlatform); childSetEnabled("search", false); childSetText("search", LLStringExplicit("")); childSetEnabled("render_compat", false); childSetValue("render_compat", false); } else { childSetEnabled("platform", true); childSetEnabled("search", true); childSetText("search", gHippoGridManager->getConnectedGrid()->getSearchUrl()); childSetEnabled("render_compat", true); } }
BOOL LLPanelGroups::postBuild() { childSetCommitCallback("group list", onGroupList, this); LLSearchEditor* group_search = getChild<LLSearchEditor>("group_search"); if (group_search) { group_search->setSearchCallback(&onGroupSearchKeystroke, this); } childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); const std::string none_text = getString("none"); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text, false); childSetAction("Activate", onBtnActivate, this); childSetAction("Info", onBtnInfo, this); childSetAction("IM", onBtnIM, this); childSetAction("Leave", onBtnLeave, this); childSetAction("Create", onBtnCreate, this); childSetAction("Search...", onBtnSearch, this); childSetAction("Invite...", onBtnInvite, this); childSetAction("Titles...", onBtnTitles, this); setDefaultBtn("IM"); childSetDoubleClickCallback("group list", onBtnIM); childSetUserData("group list", this); reset(); return TRUE; }
LLFloaterOpenObject::LLFloaterOpenObject() : LLFloater("object_contents"), mPanelInventory(NULL), mDirty(TRUE) { LLCallbackMap::map_t factory_map; factory_map["object_contents"] = LLCallbackMap(createPanelInventory, this); gUICtrlFactory->buildFloater(this,"floater_openobject.xml",&factory_map); childSetAction("copy_to_inventory_button", onClickMoveToInventory, this); childSetAction("copy_and_wear_button", onClickMoveAndWear, this); childSetTextArg("object_name", "[DESC]", LLString("Object") ); // *Note: probably do not want to translate this }
void LLPanelMyProfileEdit::processProfileProperties(const LLAvatarData* avatar_data) { fillCommonData(avatar_data); // 'Home page' was hidden in LLPanelAvatarProfile::fillCommonData() to fix EXT-4734 // Show 'Home page' in Edit My Profile (EXT-4873) childSetVisible("homepage_edit", true); fillPartnerData(avatar_data); fillAccountStatus(avatar_data); childSetValue("show_in_search_checkbox", (BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH)); std::string first, last; BOOL found = gCacheName->getName(avatar_data->avatar_id, first, last); if (found) { childSetTextArg("name_text", "[FIRST]", first); childSetTextArg("name_text", "[LAST]", last); } }
void LLFloaterPay::onCacheOwnerName(const LLUUID& owner_id, const std::string& full_name, bool is_group) { if (is_group) { childSetVisible("payee_group",true); childSetVisible("payee_resident",false); } else { childSetVisible("payee_group",false); childSetVisible("payee_resident",true); } childSetTextArg("payee_name", "[NAME]", full_name); }
void LLPanelGroupLandMoney::activate() { if ( !mImplementationp->mBeenActivated ) { //select the first tab LLTabContainer* tabp = getChild<LLTabContainer>("group_money_tab_container"); if ( tabp ) { tabp->selectFirstTab(); mImplementationp->mBeenActivated = true; } setLabelArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetTextArg("group_money_heading", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); //fill in the max contribution //This calculation is unfortunately based on //the status bar's concept of how much land the user has //which can change dynamically if the user buys new land, gives //more land to a group, etc. //A race condition can occur if we want to update the UI's //concept of the user's max contribution before the status //bar has been updated from a change in the user's group contribution. //Since the max contribution should not change solely on changing //a user's group contribution, (it would only change through //purchasing of new land) this code is placed here //and only updated once to prevent the race condition //at the price of having stale data. //We need to have the status bar have observers //or find better way of distributing up to date land data. - jwolk S32 max_avail = mImplementationp->getStoredContribution(); if(gStatusBar) { max_avail += gStatusBar->getSquareMetersLeft(); } mImplementationp->setYourMaxContributionTextBox(max_avail); } mImplementationp->mMapButtonp->setEnabled(false); update(GC_ALL); }
// called from setFocus() // called internally too void HippoPanelGridsImpl::refresh() { const std::string &defaultGrid = gHippoGridManager->getDefaultGridName(); LLComboBox *grids = getChild<LLComboBox>("grid_selector"); 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->getGridName(); if (grid != defaultGrid) { grids->add(grid); if (grid == mCurGrid) selectIndex = i; i++; } } if ((mState == ADD_NEW) || (mState == ADD_COPY)) { grids->add("<new>"); selectIndex = i++; } if (selectIndex >= 0) { grids->setCurrentByIndex(selectIndex); } else { grids->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label } childSetTextArg("default_grid", "[DEFAULT]", (defaultGrid != "")? defaultGrid: " "); childSetEnabled("btn_delete", (selectIndex >= 0) && mIsEditable ); childSetEnabled("btn_copy", (mState == NORMAL) && (selectIndex >= 0)); childSetEnabled("btn_default", (mState == NORMAL) && (selectIndex > 0)); childSetEnabled("gridname", (mState == ADD_NEW) || (mState == ADD_COPY)); }
void LLFloaterBuyLandUI::refreshUI() { // section zero: title area { LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("info_image"); if (snapshot) { snapshot->setImageAssetID( mParcelValid ? mParcelSnapshot : LLUUID::null); } if (mParcelValid) { childSetText("info_parcel", mParcelLocation); LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelActualArea); string_args["[AMOUNT2]"] = llformat("%d", mParcelSupportedObjects); childSetText("info_size", 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"); } childSetText("info_price", getString("info_price_string", info_price_args)); childSetVisible("info_price", mParcelIsForSale); } else { childSetText("info_parcel", getString("no_parcel_selected")); childSetText("info_size", LLStringUtil::null); childSetText("info_price", LLStringUtil::null); } childSetText("info_action", 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)")); } 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"), mSiteLandUseUpgrade ? LLViewChildren::BADGE_NOTE : LLViewChildren::BADGE_OK); childSetText("land_use_action", mSiteLandUseAction); std::string message; if (mIsForGroup) { LLStringUtil::format_map_t string_args; string_args["[GROUP]"] = std::string(gAgent.getGroupName()); message += getString("insufficient_land_credits", string_args); } else { LLStringUtil::format_map_t string_args; string_args["[BUYER]"] = llformat("%d", mAgentCommittedTier); message += getString("land_holdings", string_args); } if (!mParcelValid) { message += getString("no_parcel_selected"); } else if (mParcelBillableArea == mParcelActualArea) { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d ", mParcelActualArea); message += getString("parcel_meters", string_args); } else { if (mParcelBillableArea > mParcelActualArea) { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); message += getString("premium_land", string_args); } else { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); message += getString("discounted_land", string_args); } } childSetValue("land_use_reason", message); childShow("step_2"); childShow("land_use_action"); childShow("land_use_reason"); } else { childHide("step_2"); childHide("land_use_action"); childHide("land_use_reason"); } // section three: purchase & currency S32 finalBalance = mAgentCashBalance + mCurrency.getAmount() - mParcelPrice; bool willHaveEnough = finalBalance >= 0; bool haveEnough = mAgentCashBalance >= mParcelPrice; S32 minContribution = llceil((F32)mParcelBillableArea / GROUP_LAND_BONUS_FACTOR); bool groupContributionEnough = mParcelGroupContribution >= minContribution; mCurrency.updateUI(!showingError && !haveEnough); if (!showingError) { mChildren.setBadge(std::string("step_3"), !willHaveEnough ? LLViewChildren::BADGE_WARN : mCurrency.getAmount() > 0 ? LLViewChildren::BADGE_NOTE : LLViewChildren::BADGE_OK); LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelPrice); string_args["[SELLER]"] = mParcelSellerName; childSetText("purchase_action", getString("pay_to_for_land", string_args)); childSetVisible("purchase_action", mParcelValid); std::string reasonString; if (haveEnough) { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mAgentCashBalance); childSetText("currency_reason", getString("have_enough_lindens", string_args)); } else { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mAgentCashBalance); string_args["[AMOUNT2]"] = llformat("%d", mParcelPrice - mAgentCashBalance); childSetText("currency_reason", getString("not_enough_lindens", string_args)); childSetTextArg("currency_est", "[LOCAL_AMOUNT]", mCurrency.getLocalEstimate()); } if (willHaveEnough) { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", finalBalance); childSetText("currency_balance", getString("balance_left", string_args)); } else { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelPrice - mAgentCashBalance); childSetText("currency_balance", getString("balance_needed", string_args)); } childSetValue("remove_contribution", LLSD(groupContributionEnough)); childSetEnabled("remove_contribution", groupContributionEnough); bool showRemoveContribution = mParcelIsGroupLand && (mParcelGroupContribution > 0); childSetLabelArg("remove_contribution", "[AMOUNT]", llformat("%d", minContribution)); childSetVisible("remove_contribution", showRemoveContribution); childShow("step_3"); childShow("purchase_action"); childShow("currency_reason"); childShow("currency_balance"); } else { childHide("step_3"); childHide("purchase_action"); childHide("currency_reason"); childHide("currency_balance"); childHide("remove_group_donation"); } bool agrees_to_covenant = false; LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant"); if (check) { agrees_to_covenant = check->get(); } childSetEnabled("buy_btn", mCanBuy && mSiteValid && willHaveEnough && !mTransaction && agrees_to_covenant); }
void LLFloaterSellLandUI::refreshUI() { LLParcel* parcelp = mParcelSelection->getParcel(); if (!parcelp) return; LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("info_image"); if (snapshot) { snapshot->setImageAssetID(mParcelSnapshot); } childSetText("info_parcel", parcelp->getName()); childSetTextArg("info_size", "[AREA]", llformat("%d", mParcelActualArea)); childSetTextArg("price_ld", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); std::string price_str = childGetValue("price").asString(); bool valid_price = false; valid_price = (price_str != "") && LLLineEditor::prevalidateNonNegativeS32(utf8str_to_wstring(price_str)); if (valid_price && mParcelActualArea > 0) { F32 per_meter_price = 0; per_meter_price = F32(mParcelPrice) / F32(mParcelActualArea); childSetTextArg("price_per_m", "[PER_METER]", llformat("%0.2f", per_meter_price)); childShow("price_per_m"); setBadge("step_price", BADGE_OK); } else { childHide("price_per_m"); if ("" == price_str) { setBadge("step_price", BADGE_NOTE); } else { setBadge("step_price", BADGE_ERROR); } } if (mSellToBuyer) { childSetValue("sell_to", "user"); childShow("sell_to_agent"); childShow("sell_to_select_agent"); } else { if (mChoseSellTo) { childSetValue("sell_to", "anyone"); } else { childSetValue("sell_to", "select"); } childHide("sell_to_agent"); childHide("sell_to_select_agent"); } // Must select Sell To: Anybody, or User (with a specified username) std::string sell_to = childGetValue("sell_to").asString(); bool valid_sell_to = "select" != sell_to && ("user" != sell_to || mAuthorizedBuyer.notNull()); if (!valid_sell_to) { setBadge("step_sell_to", BADGE_NOTE); } else { setBadge("step_sell_to", BADGE_OK); } bool valid_sell_objects = ("none" != childGetValue("sell_objects").asString()); if (!valid_sell_objects) { setBadge("step_sell_objects", BADGE_NOTE); } else { setBadge("step_sell_objects", BADGE_OK); } if (valid_sell_to && valid_price && valid_sell_objects) { childEnable("sell_btn"); } else { childDisable("sell_btn"); } }
// Default constructor LLFloaterPay::LLFloaterPay(const std::string& name, money_callback callback, const LLUUID& uuid, BOOL target_is_object) : LLFloater(name, std::string("FloaterPayRectB"), LLStringUtil::null, RESIZE_NO, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, DRAG_ON_TOP, MINIMIZE_NO, CLOSE_YES), mCallbackData(), mCallback(callback), mObjectNameText(NULL), mTargetUUID(uuid), mTargetIsObject(target_is_object), mTargetIsGroup(FALSE) { if (target_is_object) { LLUICtrlFactory::getInstance()->buildFloater(this,"floater_pay_object.xml"); mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); } else { LLUICtrlFactory::getInstance()->buildFloater(this,"floater_pay.xml"); } S32 i =0; LLGiveMoneyInfo* info = new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_0); mCallbackData.push_back(info); childSetAction("fastpay 1",&LLFloaterPay::onGive,info); childSetVisible("fastpay 1", FALSE); childSetLabelArg("fastpay 1", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mQuickPayButton[i] = getChild<LLButton>("fastpay 1"); mQuickPayInfo[i] = info; ++i; info = new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_1); mCallbackData.push_back(info); childSetAction("fastpay 5",&LLFloaterPay::onGive,info); childSetVisible("fastpay 5", FALSE); childSetLabelArg("fastpay 5", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mQuickPayButton[i] = getChild<LLButton>("fastpay 5"); mQuickPayInfo[i] = info; ++i; info = new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_2); mCallbackData.push_back(info); childSetAction("fastpay 10",&LLFloaterPay::onGive,info); childSetVisible("fastpay 10", FALSE); childSetLabelArg("fastpay 10", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mQuickPayButton[i] = getChild<LLButton>("fastpay 10"); mQuickPayInfo[i] = info; ++i; info = new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_3); mCallbackData.push_back(info); childSetAction("fastpay 20",&LLFloaterPay::onGive,info); childSetVisible("fastpay 20", FALSE); childSetLabelArg("fastpay 20", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mQuickPayButton[i] = getChild<LLButton>("fastpay 20"); mQuickPayInfo[i] = info; ++i; childSetVisible("amount text", FALSE); childSetVisible("currency text", FALSE); childSetTextArg("currency text", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); std::string last_amount; if(sLastAmount > 0) { last_amount = llformat("%d", sLastAmount); } childSetVisible("amount", FALSE); childSetKeystrokeCallback("amount", &LLFloaterPay::onKeystroke, this); childSetText("amount", last_amount); childSetPrevalidate("amount", LLLineEditor::prevalidateNonNegativeS32); info = new LLGiveMoneyInfo(this, 0); mCallbackData.push_back(info); childSetAction("pay btn",&LLFloaterPay::onGive,info); setDefaultBtn("pay btn"); childSetVisible("pay btn", FALSE); childSetEnabled("pay btn", (sLastAmount > 0)); childSetAction("cancel btn",&LLFloaterPay::onCancel,this); center(); open(); /*Flawfinder: ignore*/ }
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); } else { childSetVisible("purchase_warning_notenough", true); } } } else { childHide("step_1"); childHide("balance_label"); childHide("balance_amount"); childHide("buying_label"); childHide("buying_amount"); childHide("total_label"); childHide("total_amount"); childHide("purchase_warning_repurchase"); childHide("purchase_warning_notenough"); } childSetEnabled("buy_btn", mManager.canBuy()); if (!mManager.canBuy() && !childIsVisible("error_web")) { childShow("getting_data"); } }
void LLFloaterTools::refresh() { const S32 INFO_WIDTH = getRect().getWidth(); const S32 INFO_HEIGHT = 384; LLRect object_info_rect(0, 0, INFO_WIDTH, -INFO_HEIGHT); BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); S32 idx_features = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FEATURES]); S32 idx_face = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FACE]); S32 idx_contents = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_CONTENTS]); S32 selected_index = mTab->getCurrentPanelIndex(); if (!all_volume && (selected_index == idx_features || selected_index == idx_face || selected_index == idx_contents)) { mTab->selectFirstTab(); } mTab->enableTabButton(idx_features, all_volume); mTab->enableTabButton(idx_face, all_volume); mTab->enableTabButton(idx_contents, all_volume); // Refresh object and prim count labels LLLocale locale(LLLocale::USER_LOCALE); // Added in Link Num value -HgB S32 object_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount(); S32 prim_count = LLSelectMgr::getInstance()->getEditSelection()->getObjectCount(); std::string value_string; std::string desc_string; if ((gSavedSettings.getBOOL("EditLinkedParts"))&&(prim_count == 1)) //Selecting a single prim in "Edit Linked" mode, show link number { desc_string = "Link number:"; LLViewerObject* selected = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); if (selected && selected->getRootEdit()) { LLViewerObject::child_list_t children = selected->getRootEdit()->getChildren(); if (children.empty()) { value_string = "0"; // An unlinked prim is "link 0". } else { children.push_front(selected->getRootEdit()); // need root in the list too S32 index = 0; for (LLViewerObject::child_list_t::iterator iter = children.begin(); iter != children.end(); ++iter) { index++; if ((*iter)->isSelected()) { LLResMgr::getInstance()->getIntegerString(value_string, index); break; } } } } } else { desc_string = "Selected objects:"; LLResMgr::getInstance()->getIntegerString(value_string, object_count); } childSetTextArg("link_num_obj_count", "[DESC]", desc_string); childSetTextArg("link_num_obj_count", "[NUM]", value_string); LLStringUtil::format_map_t selection_args; selection_args["COUNT"] = llformat("%.1d", (S32)prim_count); if(gMeshRepo.meshRezEnabled()) { F32 link_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectCost(); LLStringUtil::format_map_t prim_equiv_args; prim_equiv_args["SEL_WEIGHT"] = llformat("%.1d", (S32)link_cost); selection_args["PE_STRING"] = getString("status_selectprimequiv", prim_equiv_args); } else { selection_args["PE_STRING"] = ""; } std::string prim_count_string = getString("status_selectcount",selection_args); childSetText("prim_count", prim_count_string); // Refresh child tabs mPanelPermissions->refresh(); mPanelObject->refresh(); mPanelVolume->refresh(); mPanelFace->refresh(); mPanelContents->refresh(); mPanelLandInfo->refresh(); }
// public void LLPanelLandInfo::refresh() { LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); LLViewerRegion *regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); if (!parcel || !regionp) { // nothing selected, disable panel childSetVisible("label_area_price",false); childSetVisible("label_area",false); //mTextPrice->setText(LLStringUtil::null); childSetText("textbox price",LLStringUtil::null); childSetEnabled("button buy land",FALSE); childSetEnabled("button abandon land",FALSE); childSetEnabled("button subdivide land",FALSE); childSetEnabled("button join land",FALSE); childSetEnabled("button about land",FALSE); } else { // something selected, hooray! const LLUUID& owner_id = parcel->getOwnerID(); const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); BOOL is_public = parcel->isPublic(); BOOL is_for_sale = parcel->getForSale() && ((parcel->getSalePrice() > 0) || (auth_buyer_id.notNull())); BOOL can_buy = (is_for_sale && (owner_id != gAgent.getID()) && ((gAgent.getID() == auth_buyer_id) || (auth_buyer_id.isNull()))); if (is_public && !LLViewerParcelMgr::getInstance()->getParcelSelection()->getMultipleOwners()) { getChildView("button buy land")->setEnabled(TRUE); } else { getChildView("button buy land")->setEnabled(can_buy); } BOOL owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE); BOOL owner_divide = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_DIVIDE_JOIN); BOOL manager_releaseable = ( gAgent.canManageEstate() && (parcel->getOwnerID() == regionp->getOwner()) ); BOOL manager_divideable = ( gAgent.canManageEstate() && ((parcel->getOwnerID() == regionp->getOwner()) || owner_divide) ); childSetEnabled("button abandon land",owner_release || manager_releaseable || gAgent.isGodlike()); // only mainland sims are subdividable by owner if (regionp->getRegionFlag(REGION_FLAGS_ALLOW_PARCEL_CHANGES)) { childSetEnabled("button subdivide land",owner_divide || manager_divideable || gAgent.isGodlike()); } else { childSetEnabled("button subdivide land",manager_divideable || gAgent.isGodlike()); } // To join land, must have something selected, // not just a single unit of land, // you must own part of it, // and it must not be a whole parcel. if (LLViewerParcelMgr::getInstance()->getSelectedArea() > PARCEL_UNIT_AREA //&& LLViewerParcelMgr::getInstance()->getSelfCount() > 1 && !LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected()) { childSetEnabled("button join land",TRUE); } else { lldebugs << "Invalid selection for joining land" << llendl; childSetEnabled("button join land",FALSE); } childSetEnabled("button about land",TRUE); // show pricing information S32 area; S32 claim_price; S32 rent_price; BOOL for_sale; F32 dwell; LLViewerParcelMgr::getInstance()->getDisplayInfo(&area, &claim_price, &rent_price, &for_sale, &dwell); if(is_public || (is_for_sale && LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected())) { childSetTextArg("label_area_price","[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetTextArg("label_area_price","[PRICE]", llformat("%d",claim_price)); childSetTextArg("label_area_price","[AREA]", llformat("%d",area)); childSetVisible("label_area_price",true); childSetVisible("label_area",false); } else { childSetVisible("label_area_price",false); childSetTextArg("label_area","[AREA]", llformat("%d",area)); childSetVisible("label_area",true); } } }
void ASFloaterUploadBrowser::refresh() { std::string filename; std::string fullPath = mPathName + gDirUtilp->getDirDelimiter(); mFileList->deselectAllItems(); mFileList->deleteAllItems(); childSetValue("dir_path", gDirUtilp->getDirName(fullPath)); mUploaderSettings["ActivePath"] = mPathName; gSavedSettings.setLLSD("AscentUploadSettings", mUploaderSettings); gDirUtilp->getNextFileInDir(gDirUtilp->getChatLogsDir(),"*", filename, false); //Clears the last file bool found = true; S32 file_count = 0; while(found) { found = gDirUtilp->getNextFileInDir(fullPath, "*.*", filename, false); if(found) { S32 periodIndex = filename.find_last_of("."); std::string extension = filename.substr(periodIndex + 1, filename.length() - 1); std::string extensionL = utf8str_tolower(extension); LLSD element; element["path"] = mPathName + filename; LLSD& filename_column = element["columns"][LIST_FILE_NAME]; filename_column["column"] = "file_name"; filename_column["font"] = "SANSSERIF"; filename_column["font-style"] = "NORMAL"; LLSD& filetype_column = element["columns"][LIST_FILE_TYPE]; filetype_column["column"] = "file_type"; filetype_column["type"] = "number"; LLSD& assettype_column = element["columns"][LIST_ASSET_TYPE]; assettype_column["column"] = "asset_type"; assettype_column["type"] = "number"; LLSD& invtype_column = element["columns"][LIST_INVENTORY_TYPE]; invtype_column["column"] = "icon_inventory_type"; invtype_column["type"] = "icon"; invtype_column["value"] = "inv_folder_trash.tga"; if (((extensionL == "jpeg")||(extensionL == "jpg")||(extensionL == "tga") ||(extensionL == "png")||(extensionL == "bmp"))&&((mFilterType == "None")||(mFilterType == "Texture"))) { invtype_column["value"] = "inv_item_texture.tga"; filename_column["value"] = filename.substr(0, periodIndex); filetype_column["value"] = FILE_TEXTURE; assettype_column["value"] = LIST_TYPE_FILE; } else if ((extensionL == "wav")&&((mFilterType == "None")||(mFilterType == "Sound"))) { invtype_column["value"] = "inv_item_sound.tga"; filename_column["value"] = filename.substr(0, periodIndex); filetype_column["value"] = FILE_SOUND; assettype_column["value"] = LIST_TYPE_FILE; } else if (((extensionL == "bvh")||(extensionL == "anim"))&&((mFilterType == "None")||(mFilterType == "Animation"))) { invtype_column["value"] = "inv_item_animation.tga"; filename_column["value"] = filename.substr(0, periodIndex); filetype_column["value"] = FILE_ANIMATION; assettype_column["value"] = LIST_TYPE_FILE; } else if ((extension == filename.substr(0, filename.length() - 1))&&(filename != ".")) { std::string test_path = mPathName + gDirUtilp->getDirDelimiter() + filename + gDirUtilp->getDirDelimiter(); S32 file_count = gDirUtilp->countFilesInDir(test_path, "*.*"); if(file_count) { invtype_column["value"] = "inv_folder_plain_closed.tga"; filename_column["value"] = filename; filetype_column["value"] = FOLDER; assettype_column["value"] = LIST_TYPE_FOLDER; } } else if (filename == "..") { invtype_column["value"] = "inv_folder_plain_open.tga"; filename_column["value"] = filename; filetype_column["value"] = FOLDER; assettype_column["value"] = LIST_TYPE_PARENT; } if (invtype_column["value"].asString() != "inv_folder_trash.tga") { mFileList->addElement(element, ADD_BOTTOM); if (assettype_column["value"].asInteger() == LIST_TYPE_FILE) { file_count++; } } } } std::string result; LLResMgr::getInstance()->getIntegerString(result, file_count); if (result == "") result = "0"; childSetTextArg("result_label", "[COUNT]", result); mFileList->sortItems(); llinfos << "Total files loaded: " << result << "." << llendl; }
void LLFloaterBuyCurrencyUI::updateUI() { bool hasError = mManager.hasError(); mManager.updateUI(!hasError && !mManager.buying()); // hide most widgets - we'll turn them on as needed next childHide("info_buying"); childHide("info_cannot_buy"); childHide("info_need_more"); childHide("purchase_warning_repurchase"); childHide("purchase_warning_notenough"); childHide("contacting"); childHide("buy_action"); if (hasError) { // display an error from the server childHide("normal_background"); childShow("error_background"); childShow("info_cannot_buy"); childShow("cannot_buy_message"); childHide("balance_label"); childHide("balance_amount"); childHide("buying_label"); childHide("buying_amount"); childHide("total_label"); childHide("total_amount"); LLTextBox* message = getChild<LLTextBox>("cannot_buy_message"); if (message) { message->setText(mManager.errorMessage()); } childSetVisible("error_web", !mManager.errorURI().empty()); } else { // display the main Buy L$ interface childShow("normal_background"); childHide("error_background"); childHide("cannot_buy_message"); childHide("error_web"); if (mHasTarget) { childShow("info_need_more"); } else { childShow("info_buying"); } if (mManager.buying()) { childSetVisible("contacting", true); } else { if (mHasTarget) { childSetVisible("buy_action", true); childSetTextArg("buy_action", "[ACTION]", mTargetName); } } 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)); if (mHasTarget) { if (total >= mTargetPrice) { childSetVisible("purchase_warning_repurchase", true); } else { childSetVisible("purchase_warning_notenough", true); } } } childSetVisible("getting_data", !mManager.canBuy() && !hasError); }