diff --git a/src/fields.lua b/src/fields.lua index 86d81dd..200e94f 100644 --- a/src/fields.lua +++ b/src/fields.lua @@ -468,7 +468,8 @@ core.register_on_player_receive_fields(function(player, formname, fields) end if tab.fields then - tab.fields(player, data, fields) + local ret = tab.fields(player, data, fields) + if ret == false then return end end end diff --git a/src/hud.lua b/src/hud.lua index 6f6841c..d74ba11 100644 --- a/src/hud.lua +++ b/src/hud.lua @@ -118,7 +118,12 @@ core.register_globalstep(function(dt) local data = i3.data[name] if not data then return end - data.window = get_window_info and get_window_info(name) or nil + data.window_timer = (data.window_timer or 0) + dt + + if data.window_timer > 1 then + data.window_timer = 0 + data.window = get_window_info and get_window_info(name) or nil + end if data.show_hud ~= nil then show_hud(player, data)