qbcore-framework / qb-inventory

Slot Based Inventory System Used With QB-Core :school_satchel:
GNU General Public License v3.0
51 stars 370 forks source link

[SUGGESTION] Default Amount to 1 #528

Open uniqueorcaname opened 1 month ago

uniqueorcaname commented 1 month ago

The problem

It's a little frustrating that dragging items from shops drags the full stock if you do not set amount - defaulting the shop UI to pull 1 item at a time would be great.

Ideal solution

When opening the shop, make amount in inventory interface default to 1

Alternative solutions

Config to toggle whether the inventory uses 1 as default amount or all.

Additional context

No response

GhzGarage commented 1 month ago

That's why i made the right-click function

mhyssasilva commented 1 week ago

So any plan or explanation to have amount 1 set by default ?

mhyssasilva commented 1 week ago

Found it guys :

qb-inventory\html\app.js

// Dragging and dropping currentlyDraggingItem: null, currentlyDraggingSlot: null, dragStartX: 0, dragStartY: 0, ghostElement: null, dragStartInventoryType: "player", transferAmount: 1, <-------------------- JUST HERE