Skip to content

Commit

Permalink
Only update background layers from currently querying layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruin0x11 committed Sep 12, 2021
1 parent 8be9f6f commit f8f1740
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/api/gui/IUiLayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ function IUiLayer:query(z_order)
success, res, canceled = xpcall(
function()
if config.base.update_unfocused_ui_layers then
local layers = draw.get_layers()
for i = 1, #layers-1 do
local layer = layers[i].layer
-- HACK
if not class.is_an(IHud, layer) then
layer:update(dt, false)
if self:is_querying() then
local layers = draw.get_layers()
for i = 1, #layers-1 do
local layer = layers[i].layer
-- HACK
if not class.is_an(IHud, layer) then
layer:update(dt, false)
end
end
end
end
Expand Down

0 comments on commit f8f1740

Please sign in to comment.