amélioration de l'UI de l'inventaire et ajout de la récompense d'amélioration de taille d'inventaire #52
This commit is contained in:
@@ -6,10 +6,8 @@ const MODULATE_INSPECTED_COLOR = Color.GRAY
|
||||
@onready var default_modulate : Color = modulate
|
||||
@onready var inspectable_signals_setuped : bool = setup_inspectable_signals()
|
||||
|
||||
var inspected : bool = false :
|
||||
set(v):
|
||||
inspected = v
|
||||
modulate = MODULATE_INSPECTED_COLOR if inspected else default_modulate
|
||||
func inspect(is_inspected : bool = true):
|
||||
modulate = MODULATE_INSPECTED_COLOR if is_inspected else default_modulate
|
||||
|
||||
func setup_inspectable_signals() -> bool:
|
||||
mouse_entered.connect(_on_mouse_entered)
|
||||
@@ -17,10 +15,10 @@ func setup_inspectable_signals() -> bool:
|
||||
return true
|
||||
|
||||
func _on_mouse_entered():
|
||||
Pointer.inspect_entity(self)
|
||||
Pointer.inspect(self, inspector_info())
|
||||
|
||||
func _on_mouse_excited():
|
||||
Pointer.stop_inspect_entity(self)
|
||||
Pointer.stop_inspect(self)
|
||||
|
||||
func pointer_text():
|
||||
return ""
|
||||
@@ -29,3 +27,7 @@ func inspector_info() -> Inspector.Info:
|
||||
return Inspector.Info.new(
|
||||
pointer_text()
|
||||
)
|
||||
|
||||
func _notification(what):
|
||||
if (what == NOTIFICATION_PREDELETE):
|
||||
Pointer.stop_inspect(self)
|
||||
|
||||
Reference in New Issue
Block a user