mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-12-25 06:30:16 +01:00
Handle sound client-side
This commit is contained in:
parent
9d26dc4840
commit
fdfc6fe934
8
init.lua
8
init.lua
@ -117,9 +117,9 @@ local fs_elements = {
|
|||||||
local styles = sprintf([[
|
local styles = sprintf([[
|
||||||
style[filter;border=false]
|
style[filter;border=false]
|
||||||
style_type[label,field;font_size=+0]
|
style_type[label,field;font_size=+0]
|
||||||
style_type[image_button;border=false]
|
style_type[image_button;border=false;sound=craftguide_click]
|
||||||
style_type[button;border=false;font=bold;font_size=+2;content_offset=0]
|
style_type[button;border=false;font=bold;font_size=+2;content_offset=0]
|
||||||
style_type[item_image_button;border=false;bgimg_hovered=%s;bgimg_pressed=%s]
|
style_type[item_image_button;border=false;bgimg_hovered=%s;bgimg_pressed=%s;sound=craftguide_click]
|
||||||
style[search;fgimg=%s;fgimg_hovered=%s]
|
style[search;fgimg=%s;fgimg_hovered=%s]
|
||||||
style[clear;fgimg=%s;fgimg_hovered=%s]
|
style[clear;fgimg=%s;fgimg_hovered=%s]
|
||||||
style[prev_page;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s]
|
style[prev_page;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s]
|
||||||
@ -1634,10 +1634,6 @@ local function fields(player, _f)
|
|||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local data = pdata[name]
|
local data = pdata[name]
|
||||||
|
|
||||||
if not _f.key_enter_field then
|
|
||||||
sound_play("craftguide_click", {to_player = name, gain = 0.2})
|
|
||||||
end
|
|
||||||
|
|
||||||
if _f.clear then
|
if _f.clear then
|
||||||
reset_data(data)
|
reset_data(data)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user