diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-27 00:24:13 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-27 00:29:34 +0300 |
commit | cd0c40c71af767dd66694dc3329e08823aa6b6e7 (patch) | |
tree | 2cd1b5d91968fb20581d3ecc5124a45a249482a5 /indra/newview/lloutfitgallery.h | |
parent | 434f2ee512dc6edf4a6dfbafd7265d121038bf0b (diff) |
SL-19904 Outfit gallery keyboard support
Diffstat (limited to 'indra/newview/lloutfitgallery.h')
-rw-r--r-- | indra/newview/lloutfitgallery.h | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 16116d4b71..9915752962 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -74,6 +74,18 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& info); /*virtual*/ void draw(); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + void moveUp(); + void moveDown(); + void moveLeft(); + void moveRight(); + + /*virtual*/ void onFocusLost(); + /*virtual*/ void onFocusReceived(); + + static void onRemoveOutfit(const LLUUID& outfit_cat_id); + static void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response, const LLUUID& outfit_cat_id); + void scrollToShowItem(const LLUUID& item_id); void wearSelectedOutfit(); @@ -108,8 +120,6 @@ protected: void applyFilter(LLOutfitGalleryItem* item, const std::string& filter_substring); private: - void uploadPhoto(LLUUID outfit_id); - void uploadOutfitImage(const std::vector<std::string>& filenames, LLUUID outfit_id); LLUUID getPhotoAssetId(const LLUUID& outfit_id); LLUUID getDefaultPhoto(); void addToGallery(LLOutfitGalleryItem* item); @@ -127,6 +137,7 @@ private: void updateGalleryWidth(); LLOutfitGalleryItem* buildGalleryItem(std::string name, LLUUID outfit_id); + LLOutfitGalleryItem* getSelectedItem(); void onTextureSelectionChanged(LLInventoryItem* itemp); @@ -170,9 +181,10 @@ private: typedef std::map<LLUUID, LLOutfitGalleryItem*> outfit_map_t; typedef outfit_map_t::value_type outfit_map_value_t; outfit_map_t mOutfitMap; - typedef std::map<LLOutfitGalleryItem*, int> item_num_map_t; + typedef std::map<LLOutfitGalleryItem*, S32> item_num_map_t; typedef item_num_map_t::value_type item_numb_map_value_t; item_num_map_t mItemIndexMap; + std::map<S32, LLOutfitGalleryItem*> mIndexToItemMap; LLInventoryCategoriesObserver* mOutfitsObserver; @@ -185,14 +197,13 @@ public: LLOutfitGalleryContextMenu(LLOutfitListBase* outfit_list) : LLOutfitContextMenu(outfit_list), mOutfitList(outfit_list){} + protected: /* virtual */ LLContextMenu* createMenu(); bool onEnable(LLSD::String param); bool onVisible(LLSD::String param); void onThumbnail(const LLUUID& outfit_cat_id); void onCreate(const LLSD& data); - void onRemoveOutfit(const LLUUID& outfit_cat_id); - void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response, const LLUUID& outfit_cat_id); private: LLOutfitListBase* mOutfitList; }; @@ -226,14 +237,21 @@ public: /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ void onFocusLost(); + /*virtual*/ void onFocusReceived(); + + bool openOutfitsContent(); + void setGallery(LLOutfitGallery* gallery) { mGallery = gallery; } void setDefaultImage(); bool setImageAssetId(LLUUID asset_id); LLUUID getImageAssetId(); void setOutfitName(std::string name); void setOutfitWorn(bool value); void setSelected(bool value); - void setUUID(LLUUID outfit_id) {mUUID = outfit_id;} + void setUUID(const LLUUID &outfit_id) {mUUID = outfit_id;} + LLUUID getUUID() const { return mUUID; } std::string getItemName() {return mOutfitName;} bool isDefaultImage() {return mDefaultImage;} @@ -242,6 +260,7 @@ public: void setHidden(bool hidden) {mHidden = hidden;} private: + LLOutfitGallery* mGallery; LLPointer<LLViewerFetchedTexture> mTexturep; LLUUID mUUID; LLUUID mImageAssetId; |