-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow selection of item quantity when transferring items #723
Conversation
I appreciate the contribution, but this UI is a bit inconsistent. There's a lot of empty space around the quantity select and it isn't centered either. I'd like to see this fixed before it gets in. Also, having this available from the item select itself would be even better, if that can be made to look good. |
Thank you for the feedback. Selecting the item and the quantity at the same time would definitely work better, so I'll make the change. |
Now the UI is the same as before but it is possible to change the quantity by pressing left or right if the cursor is on an item with stack bigger than 1 |
Could you post some screenshots/videos to show the latest changes please ? |
Sure, here you go! screen-recording-2024-05-21.mp4 |
I'd like it if there was any indication for players that they can increment/decrement. I see you had "<" and ">" on either side before, it might be good to have the cursor on either side mimicking that to imply you can change it |
looks like an improper merge or rebase messed this pull request up pretty badly. either revert the commit or make a new fresh one based on main. |
Yeah, I'll make a new PR |
…aultgames#723) (pagefaultgames#1394) * Transferring item does not kick out of transfer menu * Select simultaneously the item to transfer and the quantity * eslint fix * eslint fix * Reset quantity on scroll * Documentation * eslint fix
…aultgames#723) (pagefaultgames#1394) * Transferring item does not kick out of transfer menu * Select simultaneously the item to transfer and the quantity * eslint fix * eslint fix * Reset quantity on scroll * Documentation * eslint fix
This PR expands the item transfer functionality allowing to select how many items to transfer instead of being forced to transfer the entire stack.
The transfer menu is also changed so that after a single transfer operation the user is not kicked out of the menu. This is particularly helpful when moving around a lot of items.
Changes
Added UI for selection of item quantity if
stackCount > 1
. IntroducedPartyUiMode.MODIFIER_TRANSFER_QUANTITY
,PartyOption.TRANSFER_QUANTITY
and private variablestransferQuantity
andtransferQuantityMax
inparty-ui-handler.ts
;Changed method
tryTransferHeldItemModifier
parametertransferStack
(boolean) intotransferQuantity
(integer, default value 1). Every call to this method has been changed to keep the behavior consistent. This change has been tested with the move Covet, abilities Magician and Pickpocket, the item Baton and the fusion mechanic (items of both Pokemon are kept);Changed type
PartyModifierTransferSelectCallback
to include theitemQuantity
;Changed method
startTransfer
inparty-ui-handler.ts
so that it doesn't automatically update the variabletransferOptionCursor
. Without this change, the transfer would always involve the first item in the list because of the addition of the new UI element (which has only one option).Screenshot of the new UI
I hope that this is helpful and that I didn't break anything. Have a nice day!