minertools: add click to window close via ESC.
fields.quit is now recognized as well and causes formspec closing to emit click sound. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
This commit is contained in:
parent
e16e9ca46a
commit
d111080b7f
@ -197,7 +197,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
local tool_meta = tool:get_meta()
|
local tool_meta = tool:get_meta()
|
||||||
local tool_upd = false
|
local tool_upd = false
|
||||||
local play_snd = true
|
local play_snd = true
|
||||||
if fields and fields.ok then
|
if fields and (fields.ok or fields.quit) then
|
||||||
play_click(player_name)
|
play_click(player_name)
|
||||||
play_snd = false
|
play_snd = false
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user