Skip to content

Commit

Permalink
Made spectator mode switching require a single bindable setting. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GoogleFrog committed Feb 1, 2017
1 parent f072405 commit 8e425bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions LuaUI/Widgets/gui_chili_spectator_panels.lua
Expand Up @@ -138,13 +138,16 @@ options_order = {
'fancySkinning',
}

local econName, econPath = "Chili Economy Panel Default", "Settings/HUD Panels/Economy Panel"
options = {
enableSpectator = {
name = "Enable as Spectator",
type = "bool",
value = false,
OnChange = function(self) option_CheckEnable(self) end,
noHotkey = true,
OnChange = function(self)
option_CheckEnable(self)
WG.SetWidgetOption(econName, econPath, "ecoPanelHideSpec", self.value)
end,
desc = "Enables the spectator resource bars when spectating a game with two teams."
},
clanNameLengthCutoff = {
Expand Down
2 changes: 1 addition & 1 deletion LuaUI/Widgets/gui_hud_presets.lua
Expand Up @@ -25,7 +25,7 @@ local consoleName, consolePath = "Chili Pro Console", "Settings/HUD Panels/Chat"
local selName, selPath = "Chili Selections & CursorTip", "Settings/HUD Panels/Selected Units Panel"
local globalName, globalPath = "Chili Global Commands", "Settings/HUD Panels/Global Commands"
local econName, econPath = "Chili Economy Panel Default", "Settings/HUD Panels/Economy Panel"
local specName, specPath = "Chili Spectator Panels", "Settings/HUD Panels/Extras/Spectating"
local specName, specPath = "Chili Spectator Panels", "Settings/HUD Panels/Spectator Panels"
local dockName, dockPath = "Chili Docking", "Settings/HUD Panels/Extras/Docking"

local function Selections_SetOptions(group, showInfo, square, iconSize, showCommand, showDgun, alwaysShow)
Expand Down

0 comments on commit 8e425bb

Please sign in to comment.