sfall icon indicating copy to clipboard operation
sfall copied to clipboard

Feature Request: Double-clicking in the inventory swap GUI

Open blackpaulillyria opened this issue 1 year ago • 2 comments

Right now, when we are looting containers or corpses and don’t want to take all the items, we have to drag the item from one inventory to the other in the inventory swap GUI.

It would be nice if we could just double-click an item and that would instantly move it to the other inventory. So double-clicking an item from inventory on the left, would instantly move it to the innvetory on the right. And double-clicking an item from inventory on the right, would instantly move it to the invetory on the left.

blackpaulillyria avatar May 01 '24 02:05 blackpaulillyria

How about assign a key to hold fro this function? Ctrl + clicking on things instantly transfer things and all that. I'd imagine that would be easier to implement than checking double clicks on items.

DondeEstaTuHallPass avatar May 01 '24 13:05 DondeEstaTuHallPass

I agree, Ctrl+Click should be easier to implement. But someone needs to actually do it.

phobos2077 avatar May 01 '24 14:05 phobos2077

Maybe Ctrl+Click can work like this:

Barter screen: there's only one way for items in a given table to go. So NPC inventory goes to NPC ask table and vice versa. PC inventory goes to PC offer table and vice versa.

Loot/steal: this is obvious, there's only 2 lists.

Inventory: items from each slot goes to main inventory. Items from inventories go to appropriate slot:

  • Armor to armor slot, replacing existing, if it's not free.
  • Any other item goes to next free hand slot. If both are taken, replaces item in the Right hand slot.

phobos2077 avatar Jun 02 '24 10:06 phobos2077

Implemented for loot and barter: https://github.com/sfall-team/sfall/commit/b5847532b433c0b8eff21ac4dba4e87da30703d4

phobos2077 avatar Jun 02 '24 14:06 phobos2077

For the player's inventory, Ctrl+click for fast unequipping (slots to inven list) should be enough IMO. If fast equipping is really that needed, for hand slots I think it might simply go to the current active hand, i.e. can use that item right after closing the inventory, no need to switch hands.

NovaRain avatar Jun 03 '24 12:06 NovaRain

For main inventory I went with @NovaRain suggestion. Armor goes to armor slot, everything else goes to current active hand slot.

phobos2077 avatar Jun 04 '24 18:06 phobos2077

Maybe make configurable key? I think middle mouse click would work well.

burner1024 avatar Jun 05 '24 07:06 burner1024

Maybe make configurable key?

The key is configurable, it's Ctrl by default. But it must be a keyboard key.

phobos2077 avatar Jun 05 '24 08:06 phobos2077