Shop inventory #302
-
|
First, thank you for this great inventory system. I read the code, and what I saw is the code that control this is _CtrlInventoryGridBasic, which is not exposed to outside nor configurable. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Unfortunately there's no way of preventing the player from moving the objects in an It wouldn't be hard to add something like that, but I'm hesitant to do so because I'm trying to keep the interface simple, while the use-cases for the feature would be somewhat exotic. But if you're willing mess with the plugin code I can give you brief instructions how to add it yourself:
func _handle_item_move(item: InventoryItem, drop_position: Vector2) -> void:
if !enable_moving_items:
return
...
_ctrl_inventory_grid_basic.enable_moving_items = enable_moving_items(I haven't tested this, but it should work) |
Beta Was this translation helpful? Give feedback.
Unfortunately there's no way of preventing the player from moving the objects in an
CtrlInventoryGridwithout preventing all interactions (which I guess could be done by covering the inventory with a transparent control).It wouldn't be hard to add something like that, but I'm hesitant to do so because I'm trying to keep the interface simple, while the use-cases for the feature would be somewhat exotic.
But if you're willing mess with the plugin code I can give you brief instructions how to add it yourself:
enable_moving_items(or similar) property toctrl_inventory_grid_basic.gd_handle_item_movemethod add a check of the property that does an early return: