feat: add nearby social interactions
This commit is contained in:
@@ -96,6 +96,7 @@ var _isLoading: bool = false
|
||||
var _debugShowRankSlots: bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
add_to_group("whaletown_escape_dismissible")
|
||||
get_tree().paused = true
|
||||
_disableChatUiMouseInput()
|
||||
_buildUi()
|
||||
@@ -109,12 +110,23 @@ func _exit_tree() -> void:
|
||||
_restoreChatUiMouseInput()
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if get_viewport().is_input_handled():
|
||||
return
|
||||
if event is InputEventKey:
|
||||
var keyEvent := event as InputEventKey
|
||||
if keyEvent.pressed and not keyEvent.echo and keyEvent.keycode == KEY_ESCAPE:
|
||||
_onClosePressed()
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
func is_escape_dismissible() -> bool:
|
||||
return is_inside_tree()
|
||||
|
||||
func get_escape_priority() -> int:
|
||||
return 1000
|
||||
|
||||
func request_escape_close() -> void:
|
||||
_onClosePressed()
|
||||
|
||||
func _buildUi() -> void:
|
||||
_rootControl = Control.new()
|
||||
_rootControl.name = "RankingPanelRoot"
|
||||
|
||||
Reference in New Issue
Block a user