![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Godot_Starter |
I started to make a simple inventory system. My Scenetree looks like this:
Inventory(Node2d)
–Control
----ItemList
And I have a Code, which is attached to the Inventory(Node2d):
func _ready():
#At first, I add ten items to my Inventory:
for i in 10:
$Control/ItemList.add_item("",load("res://Sprites/Blume1.png"),true)
func _on_ItemList_item_selected(index):
#Here I try to attach the selected Item to my cursor:
var ItemSelected = $Control/ItemList.get_item_icon(index)
Input.set_custom_mouse_cursor(ItemSelected)
$Control/ItemList.remove_item(index)
My problems are:
- When I select a Item and attach it to the cursor and remove it from the ItemList, I want that there, where the Item was before, is a gab. But actually, the other Items are moving to the left and top, so that there is no gab anymore.
- The size of the custom mouse courser is very small. How can I incress the size of the custom coursor?