forked from xiangwang25/whale-town-front-v2
feat: add nearby social interactions
This commit is contained in:
@@ -29,6 +29,7 @@ var _isOpen: bool = false
|
||||
var _transitionTween: Tween
|
||||
|
||||
func _ready() -> void:
|
||||
add_to_group("whaletown_escape_dismissible")
|
||||
visible = false
|
||||
mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
set_process(false)
|
||||
@@ -39,6 +40,8 @@ func _notification(what: int) -> void:
|
||||
_positionPanel()
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if get_viewport().is_input_handled():
|
||||
return
|
||||
if not _isOpen:
|
||||
return
|
||||
if event is InputEventKey:
|
||||
@@ -72,6 +75,15 @@ func hide_panel() -> void:
|
||||
func is_panel_open() -> bool:
|
||||
return _isOpen
|
||||
|
||||
func is_escape_dismissible() -> bool:
|
||||
return _isOpen
|
||||
|
||||
func get_escape_priority() -> int:
|
||||
return 700
|
||||
|
||||
func request_escape_close() -> void:
|
||||
hide_panel()
|
||||
|
||||
func _buildUi() -> void:
|
||||
_overlay = ColorRect.new()
|
||||
_overlay.name = "courseBoardDimOverlay"
|
||||
|
||||
Reference in New Issue
Block a user