diff options
Diffstat (limited to 'indra/newview/lltexturectrl.h')
-rw-r--r-- | indra/newview/lltexturectrl.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index cb6ce636e0..d71566c526 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -64,6 +64,22 @@ 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 class LLTexPickInventoryType : U32 +{ + TEXTURE_MATERIAL = 0, + TEXTURE = 1, + MATERIAL = 2, +}; + +namespace LLInitParam +{ + template<> + struct TypeValues<LLTexPickInventoryType> : public TypeValuesHelper<LLTexPickInventoryType> + { + static void declareValues(); + }; +} + enum LLPickerSource { PICKER_INVENTORY, @@ -94,12 +110,19 @@ public: TEXTURE_CANCEL } ETexturePickOp; + // *HACK: Can't forward-declare an enum scoped inside a class. Maybe there's a better way to initialize LLInitParam::TypeValues<LLTexPickInventoryType> that doesn't run into this limitation. + typedef LLTexPickInventoryType EPickInventoryType; + static const EPickInventoryType PICK_TEXTURE_MATERIAL = LLTexPickInventoryType::TEXTURE_MATERIAL; + static const EPickInventoryType PICK_TEXTURE = LLTexPickInventoryType::TEXTURE; + static const EPickInventoryType PICK_MATERIAL = LLTexPickInventoryType::MATERIAL; + public: struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { 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 +140,7 @@ public: : image_id("image"), default_image_id("default_image_id"), default_image_name("default_image_name"), + pick_type("pick_type", LLTexPickInventoryType::TEXTURE), allow_no_texture("allow_no_texture", false), can_apply_immediately("can_apply_immediately"), no_commit_on_selection("no_commit_on_selection", false), |