diff options
author | Roxanne Skelly <roxie@lindenlab.com> | 2024-06-11 23:18:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 23:18:54 -0700 |
commit | 0f3c3563b0861e8ea82b201aab8343d99f993bbc (patch) | |
tree | 7ab124cd4852f2d36bf897090feff5cf29c3ebc7 /indra/newview/lltexturectrl.h | |
parent | 6a00609b0cede78f998971687a756b7fcf826c0f (diff) | |
parent | ed34782283aa2ae6a7a76c0492a2f9edc6bb3629 (diff) |
Merge pull request #1726 from secondlife/roxie/webrtc-voice
Merge from main.
Diffstat (limited to 'indra/newview/lltexturectrl.h')
-rw-r--r-- | indra/newview/lltexturectrl.h | 59 |
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 |