Added a screenshot function.
parent
a32d3edfff
commit
a178ba8b9a
|
@ -207,6 +207,10 @@ func _input(_event) -> void:
|
|||
elif Input.is_action_just_released("show_scoretab"):
|
||||
hud.scoretab(false)
|
||||
|
||||
if Input.is_action_just_pressed("screenshot"):
|
||||
var res = get_viewport().get_texture().get_image().save_exr('res://Screnshot.exr')
|
||||
chat.chat_notification("Screenshot taken: " + str(res))
|
||||
|
||||
@rpc(any_peer, call_local, reliable) func game_over(winner):
|
||||
if local_player:
|
||||
local_player.die(-1)
|
||||
|
|
|
@ -164,6 +164,11 @@ show_scoretab={
|
|||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777218,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
screenshot={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777253,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
|
Reference in New Issue