From 03a7b017b6db13adb9d67e43a05721cb7b4eb932 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Wed, 6 May 2026 23:22:07 +0300 Subject: [PATCH] Change mouse cursor if attachment attempt fails --- Tactical/Interface Items.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 0ea590819..4f3eb2377 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -649,7 +649,23 @@ void popupCallbackItem(INT16 itemId){ if( bestStack->RemoveObjectAtIndex(leastDamagedIndex, &pObjTmp) ){ gpItemPointer = &pObjTmp; // pick up the object (or stack) DoAttachment((UINT8)gubPopupStatusIndex, guiPopupItemPos); // try to attach it - //gpItemPointer = NULL; // dont drop it! + + // If attaching failed, change mouse cursor to item as we're still holding it + if ( gpItemPointer->exists() ) { + // Set mouse + guiExternVo = GetInterfaceGraphicForItem(&(Item[gpItemPointer->usItem])); + gusExternVoSubIndex = Item[gpItemPointer->usItem].ubGraphicNum; + + MSYS_ChangeRegionCursor(&gMPanelRegion, EXTERN_CURSOR); + MSYS_SetCurrentCursor(EXTERN_CURSOR); + fMapInventoryItem = TRUE; + fTeamPanelDirty = TRUE; + + //Dirty interface + fInterfacePanelDirty = DIRTYLEVEL2; + + UpdateItemHatches(); + } gItemDescAttachmentPopups[giActiveAttachmentPopup]->hide(); RenderItemDescriptionBox();