summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-10-03 19:00:33 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-10-03 19:00:33 +0300
commit7d50a5143411d5b975173e62de65e530c5dd0f00 (patch)
treec1a4111c8db0d39ef9cc66ad8be29b5d4dc4fd10 /indra/newview/lltexturectrl.h
parent41433fdb08b50e4721b2285a045cc8f14e82433c (diff)
parent2465470817957c8378e81ec1a7e32551fbac7b26 (diff)
Merge branch 'main' (DRTVWR-567) into DRTVWR-559
# Conflicts: # indra/newview/CMakeLists.txt # indra/newview/VIEWER_VERSION.txt # indra/newview/llagent.cpp # indra/newview/llfloaternewfeaturenotification.cpp # indra/newview/llinventorybridge.cpp # indra/newview/llinventorymodel.cpp # indra/newview/lloutfitgallery.cpp # indra/newview/llpanelmaininventory.cpp # indra/newview/llpanelmaininventory.h # indra/newview/llsidepaneltaskinfo.cpp # indra/newview/llsidepaneltaskinfo.h # indra/newview/lltexturectrl.cpp # indra/newview/lltexturectrl.h # indra/newview/llviewerinventory.cpp # indra/newview/llviewerobject.cpp # indra/newview/llviewertexturelist.cpp # indra/newview/llviewertexturelist.h # indra/newview/skins/default/xui/en/floater_new_feature_notification.xml # indra/newview/skins/default/xui/en/menu_inventory.xml
Diffstat (limited to 'indra/newview/lltexturectrl.h')
-rw-r--r--indra/newview/lltexturectrl.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index d82a167c93..b742ea2da3 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -64,6 +64,14 @@ bool get_is_predefined_texture(LLUUID asset_id);
LLUUID get_copy_free_item_by_asset_id(LLUUID image_id, bool no_trans_perm = false);
bool get_can_copy_texture(LLUUID image_id);
+enum LLPickerSource
+{
+ PICKER_INVENTORY,
+ PICKER_LOCAL,
+ PICKER_BAKE,
+ PICKER_UNKNOWN, // on cancel, default ids
+};
+
//////////////////////////////////////////////////////////////////////////////////////////
// LLTextureCtrl
@@ -192,7 +200,7 @@ public:
void closeDependentFloater();
void onFloaterClose();
- void onFloaterCommit(ETexturePickOp op, LLUUID id);
+ void onFloaterCommit(ETexturePickOp op, LLPickerSource source, const LLUUID& local_id, const LLUUID& inv_id);
// This call is returned when a drag is detected. Your callback
// should return TRUE if the drag is acceptable.
@@ -264,7 +272,7 @@ private:
//////////////////////////////////////////////////////////////////////////////////////////
// LLFloaterTexturePicker
-typedef boost::function<void(LLTextureCtrl::ETexturePickOp op, LLUUID id)> floater_commit_callback;
+typedef boost::function<void(LLTextureCtrl::ETexturePickOp op, LLPickerSource source, const LLUUID& asset_id, const LLUUID& inventory_id)> floater_commit_callback;
typedef boost::function<void()> floater_close_callback;
typedef boost::function<void(const LLUUID& asset_id)> set_image_asset_id_callback;
typedef boost::function<void(LLPointer<LLViewerTexture> texture)> set_on_update_image_stats_callback;
@@ -302,7 +310,7 @@ public:
// New functions
void setImageID(const LLUUID& image_asset_id, bool set_selection = true);
- void updateImageStats();
+ bool updateImageStats(); // true if within limits
const LLUUID& getAssetID() { return mImageAssetID; }
const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library = FALSE);
void setCanApplyImmediately(BOOL b);
@@ -314,11 +322,13 @@ public:
void stopUsingPipette();
void commitIfImmediateSet();
+ void commitCallback(LLTextureCtrl::ETexturePickOp op);
void commitCancel();
void onFilterEdit(const std::string& search_string);
- void setCanApply(bool can_preview, bool can_apply);
+ void setCanApply(bool can_preview, bool can_apply, bool inworld_image = true);
+ void setMinDimentionsLimits(S32 min_dim);
void setTextureSelectedCallback(const texture_selected_callback& cb) { mTextureSelectedCallback = cb; }
void setOnFloaterCloseCallback(const floater_close_callback& cb) { mOnFloaterCloseCallback = cb; }
void setOnFloaterCommitCallback(const floater_commit_callback& cb) { mOnFloaterCommitCallback = cb; }
@@ -376,6 +386,7 @@ protected:
LLTextBox* mTentativeLabel;
LLTextBox* mResolutionLabel;
+ LLTextBox* mResolutionWarning;
std::string mPendingName;
BOOL mActive;
@@ -392,11 +403,20 @@ protected:
LLComboBox* mModeSelector;
LLScrollListCtrl* mLocalScrollCtrl;
+ LLButton* mDefaultBtn;
+ LLButton* mNoneBtn;
+ LLButton* mBlankBtn;
+ LLButton* mPipetteBtn;
+ LLButton* mSelectBtn;
+ LLButton* mCancelBtn;
private:
bool mCanApply;
bool mCanPreview;
bool mPreviewSettingChanged;
+ bool mLimitsSet;
+ S32 mMaxDim;
+ S32 mMinDim;
LLTextureCtrl::EPickInventoryType mInventoryPickType;