Skip to content

Commit

Permalink
spectator_hud: move to layer 2 (#3505)
Browse files Browse the repository at this point in the history
* spectator_hud: move to layer 2

Spectator HUD enables/disables ecostats depending on the amount of ally
teams in the game. If there are exactly two teams (in addition to Gaia),
then Spectator HUD is enabled. If there are not exactly two teams, i.e.
it's an FFA game, then Ecostats is enabled.

However, this logic requires we make sure the Initialize() of Spectator
HUD runs after Ecostats. If the widgets are in the same layer or
Spectator HUD is on an earlier layer, both Spectator HUD and Ecostats
are enabled at the same time after loading a FFA game.

* Update luaui/Widgets/gui_spectator_hud.lua

Co-authored-by: sprunk <[email protected]>

---------

Co-authored-by: sprunk <[email protected]>
  • Loading branch information
keelefi and sprunk authored Jul 31, 2024
1 parent baeb237 commit 296c4e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion luaui/Widgets/gui_spectator_hud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function widget:GetInfo()
author = "CMDR*Zod",
date = "2024",
license = "GNU GPL v3 (or later)",
layer = 1,
layer = 2, -- after eco stats widget which is on layer 1; see Initialize()
handler = true,
enabled = false
}
Expand Down

0 comments on commit 296c4e4

Please sign in to comment.