From 9ac3e977dc3a9ed789814a1b8347887c230075c9 Mon Sep 17 00:00:00 2001 From: object Date: Sat, 6 Aug 2022 13:19:16 +0000 Subject: [PATCH 1/4] Fix feature #238 - Inventory (badges) --- .../inventory/views/badge/InventoryBadgeItemView.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/inventory/views/badge/InventoryBadgeItemView.tsx b/src/components/inventory/views/badge/InventoryBadgeItemView.tsx index e5bfb71c..bb6c54af 100644 --- a/src/components/inventory/views/badge/InventoryBadgeItemView.tsx +++ b/src/components/inventory/views/badge/InventoryBadgeItemView.tsx @@ -6,14 +6,14 @@ import { useInventoryBadges, useInventoryUnseenTracker } from '../../../../hooks export const InventoryBadgeItemView: FC> = props => { const { badgeCode = null, children = null, ...rest } = props; - const { selectedBadgeCode = null, setSelectedBadgeCode = null, getBadgeId = null } = useInventoryBadges(); + const { selectedBadgeCode = null, setSelectedBadgeCode = null, toggleBadge = null, getBadgeId = null } = useInventoryBadges(); const { isUnseen = null } = useInventoryUnseenTracker(); const unseen = isUnseen(UnseenItemCategory.BADGE, getBadgeId(badgeCode)); return ( - setSelectedBadgeCode(badgeCode) } { ...rest }> + setSelectedBadgeCode(badgeCode) } onDoubleClick={ event => toggleBadge(selectedBadgeCode) } { ...rest }> { children } ); -} +} \ No newline at end of file From bba59686defd9e3ef276e4a0fbd4077ff363c1e2 Mon Sep 17 00:00:00 2001 From: object Date: Sat, 6 Aug 2022 13:30:14 +0000 Subject: [PATCH 2/4] Fix feature #238 - Inventory (bots) --- src/components/inventory/views/bot/InventoryBotItemView.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/inventory/views/bot/InventoryBotItemView.tsx b/src/components/inventory/views/bot/InventoryBotItemView.tsx index d2a15cf4..d2130693 100644 --- a/src/components/inventory/views/bot/InventoryBotItemView.tsx +++ b/src/components/inventory/views/bot/InventoryBotItemView.tsx @@ -26,13 +26,16 @@ export const InventoryBotItemView: FC> case MouseEventType.ROLL_OUT: if(!isMouseDown || (selectedBot !== botItem)) return; + attemptBotPlacement(botItem); + return; + case 'dblclick': attemptBotPlacement(botItem); return; } } return ( - + { children } From 688ca3c32bf1fc88055ca7c3ec88f95f29078748 Mon Sep 17 00:00:00 2001 From: object Date: Sat, 6 Aug 2022 13:33:46 +0000 Subject: [PATCH 3/4] Fix feature #238 - Inventory (items) --- .../inventory/views/furniture/InventoryFurnitureItemView.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/inventory/views/furniture/InventoryFurnitureItemView.tsx b/src/components/inventory/views/furniture/InventoryFurnitureItemView.tsx index f72c6ab5..f5e84814 100644 --- a/src/components/inventory/views/furniture/InventoryFurnitureItemView.tsx +++ b/src/components/inventory/views/furniture/InventoryFurnitureItemView.tsx @@ -24,6 +24,9 @@ export const InventoryFurnitureItemView: FC<{ groupItem: GroupItem }> = props => case MouseEventType.ROLL_OUT: if(!isMouseDown || !(groupItem === selectedItem)) return; + attemptItemPlacement(groupItem); + return; + case 'dblclick': attemptItemPlacement(groupItem); return; } @@ -31,5 +34,5 @@ export const InventoryFurnitureItemView: FC<{ groupItem: GroupItem }> = props => const count = groupItem.getUnlockedCount(); - return ; + return ; } From 2318e27781f4342d891018afd24ccb80816e3e91 Mon Sep 17 00:00:00 2001 From: object Date: Sat, 6 Aug 2022 13:36:55 +0000 Subject: [PATCH 4/4] Fix feature #238 - Inventory (pets) --- .../inventory/views/pet/InventoryPetItemView.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/inventory/views/pet/InventoryPetItemView.tsx b/src/components/inventory/views/pet/InventoryPetItemView.tsx index 41b0619e..aad45f95 100644 --- a/src/components/inventory/views/pet/InventoryPetItemView.tsx +++ b/src/components/inventory/views/pet/InventoryPetItemView.tsx @@ -26,13 +26,16 @@ export const InventoryPetItemView: FC> case MouseEventType.ROLL_OUT: if(!isMouseDown || !(petItem === selectedPet)) return; + attemptPetPlacement(petItem); + return; + case 'dblclick': attemptPetPlacement(petItem); return; } } - + return ( - + { children }