Revert "adding state handling to post_its"
This reverts commit 7fb7be47a8.
This commit is contained in:
parent
181f6a7e26
commit
1a21997e82
|
|
@ -6,8 +6,6 @@ var sibling
|
||||||
var shift_tween
|
var shift_tween
|
||||||
var modulate_tween
|
var modulate_tween
|
||||||
|
|
||||||
var on_stage = false
|
|
||||||
|
|
||||||
@export var text: String = "" :
|
@export var text: String = "" :
|
||||||
set (value):
|
set (value):
|
||||||
if is_inside_tree() or Engine.is_editor_hint():
|
if is_inside_tree() or Engine.is_editor_hint():
|
||||||
|
|
@ -62,9 +60,9 @@ func replace_with(postit: PostIt):
|
||||||
self.sibling = postit.sibling
|
self.sibling = postit.sibling
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
if on_stage:
|
|
||||||
_move_post_it()
|
_move_post_it()
|
||||||
|
|
||||||
|
|
||||||
func _on_focus_entered():
|
func _on_focus_entered():
|
||||||
print(self, "is focused")
|
print(self, "is focused")
|
||||||
|
|
||||||
|
|
@ -72,7 +70,7 @@ func _on_focus_exited():
|
||||||
print(self, "is not focused")
|
print(self, "is not focused")
|
||||||
|
|
||||||
func _on_mouse_entered():
|
func _on_mouse_entered():
|
||||||
if on_stage and not Input.is_action_pressed("mouse_left"):
|
if not Input.is_action_pressed("mouse_left"):
|
||||||
highlighted = true
|
highlighted = true
|
||||||
if "handle_hover" in owner:
|
if "handle_hover" in owner:
|
||||||
owner.handle_hover(self)
|
owner.handle_hover(self)
|
||||||
|
|
@ -81,7 +79,6 @@ func _on_mouse_exited():
|
||||||
highlighted = false
|
highlighted = false
|
||||||
|
|
||||||
func _on_input_event(viewport, event, shape_idx):
|
func _on_input_event(viewport, event, shape_idx):
|
||||||
if on_stage:
|
|
||||||
if event is InputEventMouseMotion:
|
if event is InputEventMouseMotion:
|
||||||
_move_post_it()
|
_move_post_it()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue