Extensive work on the sideview and initial work on player profiles, inventory display, and renaming adventurerdata vs adventurer to adventurer vs adventurersprite
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
extends Control
|
||||
class_name ItemSlot extends Control
|
||||
|
||||
#var item_display_window_template = preload("res://templates/item_display_window.tscn")
|
||||
var dragging : bool = false
|
||||
var last_click : int = 0
|
||||
var item : Item
|
||||
@onready var item_sprite : TextureRect = $Item
|
||||
|
||||
func assign(itm : Item) -> void:
|
||||
item = item
|
||||
item_sprite.texture = item.image
|
||||
|
||||
func swap(item_slot : ItemSlot) -> void:
|
||||
var itm = item
|
||||
assign(itm)
|
||||
item_slot.assign(itm)
|
||||
|
||||
func _on_gui_input(event: InputEvent) -> void:
|
||||
var mmevt = event as InputEventMouseMotion
|
||||
var mbevt = event as InputEventMouseButton
|
||||
|
||||
Reference in New Issue
Block a user