summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-06-11 10:21:19 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-06-11 10:21:19 -0400
commit30f4163b7b576d96533b61d9b31243960fb83f2e (patch)
treebd5dc1450e08c674a4619d7f16a9a4816005f9c4 /indra/newview/lltexturectrl.h
parent3d1aac4f5c369e9d402c41f1c790d9015f7c7773 (diff)
parentf5e2708a0fc4e08d3d0a5dc393bbd4bac09e1c55 (diff)
Merge branch 'main' of github.com:secondlife/viewer into lua-bradfix
to pick up Featurettes promotion + Brad's GitHub Windows build workaround.
Diffstat (limited to 'indra/newview/lltexturectrl.h')
-rw-r--r--indra/newview/lltexturectrl.h59
1 files changed, 38 insertions, 21 deletions
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 9328c2316e..db36ac9cc2 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -64,13 +64,6 @@ 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
-};
typedef enum e_pick_inventory_type
{
@@ -79,6 +72,23 @@ typedef enum e_pick_inventory_type
PICK_MATERIAL = 2,
} EPickInventoryType;
+namespace LLInitParam
+{
+ template<>
+ struct TypeValues<EPickInventoryType> : public TypeValuesHelper<EPickInventoryType>
+ {
+ static void declareValues();
+ };
+}
+
+enum LLPickerSource
+{
+ PICKER_INVENTORY,
+ PICKER_LOCAL,
+ PICKER_BAKE,
+ PICKER_UNKNOWN, // on cancel, default ids
+};
+
//////////////////////////////////////////////////////////////////////////////////////////
// LLTextureCtrl
@@ -100,6 +110,7 @@ public:
Optional<LLUUID> image_id;
Optional<LLUUID> default_image_id;
Optional<std::string> default_image_name;
+ Optional<EPickInventoryType> pick_type;
Optional<bool> allow_no_texture;
Optional<bool> can_apply_immediately;
Optional<bool> no_commit_on_selection; // alternative mode: commit occurs and the widget gets dirty
@@ -117,6 +128,7 @@ public:
: image_id("image"),
default_image_id("default_image_id"),
default_image_name("default_image_name"),
+ pick_type("pick_type", PICK_TEXTURE),
allow_no_texture("allow_no_texture", false),
can_apply_immediately("can_apply_immediately"),
no_commit_on_selection("no_commit_on_selection", false),
@@ -136,26 +148,28 @@ public:
// LLView interface
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
- EAcceptance *accept,
- std::string& tooltip_msg);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
- virtual BOOL handleUnicodeCharHere(llwchar uni_char);
+ BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
+ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
+ BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+ EAcceptance *accept,
+ std::string& tooltip_msg) override;
+ BOOL handleHover(S32 x, S32 y, MASK mask) override;
+ BOOL handleUnicodeCharHere(llwchar uni_char) override;
- virtual void draw();
- virtual void setVisible( BOOL visible );
- virtual void setEnabled( BOOL enabled );
+ void draw() override;
+ void setVisible( BOOL visible ) override;
+ void setEnabled( BOOL enabled ) override;
- void setValid(BOOL valid);
+ void onVisibilityChange(BOOL new_visibility) override;
+
+ void setValid(BOOL valid);
// LLUICtrl interface
- virtual void clear();
+ void clear() override;
// Takes a UUID, wraps get/setImageAssetID
- virtual void setValue(const LLSD& value);
- virtual LLSD getValue() const;
+ void setValue(const LLSD& value) override;
+ LLSD getValue() const override;
// LLTextureCtrl interface
void showPicker(BOOL take_focus);
@@ -250,6 +264,8 @@ private:
commit_callback_t mOnCloseCallback;
texture_selected_callback mOnTextureSelectedCallback;
LLPointer<LLViewerFetchedTexture> mTexturep;
+ LLPointer<LLFetchedGLTFMaterial> mGLTFMaterial;
+ LLPointer<LLViewerTexture> mGLTFPreview;
LLUIColor mBorderColor;
LLUUID mImageItemID;
LLUUID mImageAssetID;
@@ -382,6 +398,7 @@ protected:
LLPointer<LLViewerTexture> mTexturep;
LLPointer<LLFetchedGLTFMaterial> mGLTFMaterial;
+ LLPointer<LLViewerTexture> mGLTFPreview;
LLView* mOwner;
LLUUID mImageAssetID; // Currently selected texture