Work on item display windows and variant coloring for portraits and sprites.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
class_name ItemSlot extends Control
|
||||
|
||||
#var item_display_window_template = preload("res://templates/item_display_window.tscn")
|
||||
|
||||
@onready var item_sprite : TextureRect = $Item
|
||||
|
||||
var dragging : bool = false
|
||||
var last_click : int = 0
|
||||
var item : Item
|
||||
@onready var item_sprite : TextureRect = $Item
|
||||
|
||||
signal display_item(itm)
|
||||
func assign(itm : Item) -> void:
|
||||
item = itm
|
||||
if item.image != null:
|
||||
@@ -29,6 +31,9 @@ func clear() -> void:
|
||||
func _on_gui_input(event: InputEvent) -> void:
|
||||
var mmevt = event as InputEventMouseMotion
|
||||
var mbevt = event as InputEventMouseButton
|
||||
if mbevt != null:
|
||||
if mbevt.pressed and mbevt.button_index == MOUSE_BUTTON_LEFT and item != null:
|
||||
display_item.emit(item)
|
||||
#if mbevt and mbevt.button_index == MOUSE_BUTTON_MASK_LEFT:
|
||||
#if !mbevt.pressed:
|
||||
#if dragging and
|
||||
|
||||
Reference in New Issue
Block a user