From 1fe58436e37485f57901af1f537c173c36081cb3 Mon Sep 17 00:00:00 2001 From: KionX <5648030+KionX@users.noreply.github.com> Date: Sat, 16 May 2020 20:42:52 +0500 Subject: [PATCH] Compatibility with "AIFillPanel" and bugfixes --- mods/coop/hook/lua/ui/lobby/lobby.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mods/coop/hook/lua/ui/lobby/lobby.lua b/mods/coop/hook/lua/ui/lobby/lobby.lua index 7da42d3e..c5a13531 100644 --- a/mods/coop/hook/lua/ui/lobby/lobby.lua +++ b/mods/coop/hook/lua/ui/lobby/lobby.lua @@ -1,5 +1,12 @@ +local ParentUpdateGame = UpdateGame -- Do some extra logic at the end of CreateUI to delete some buttons that make no sense. local ReallyCreateUI = CreateUI + +function UpdateGame() + ParentUpdateGame() + GUI.autoTeams:Hide() +end + function CreateUI() ReallyCreateUI() @@ -11,11 +18,10 @@ function CreateUI() -- The whole top row of host-only buttons also make no sense. Random map? Default options? -- Auto teams? What? GUI.randMap:Hide() - GUI.autoTeams:Hide() GUI.defaultOptions:Hide() -- Expand the observer panel into the space. - LayoutHelpers.AtLeftTopIn(GUI.observerPanel, GUI.panel, 512, 503) + LayoutHelpers.AtLeftTopIn(GUI.observerPanel, GUI.panel, 512, 498) GUI.observerPanel.Width:Set(278) GUI.observerPanel.Height:Set(206) @@ -24,7 +30,7 @@ function CreateUI() GUI.AIFillButton:Hide() GUI.AIClearButton:Hide() GUI.TeamCountSelector:Hide() - GUI.AIFillPanelBorder:Hide() + GUI.AIFillCombo:Hide() end -- Force the teams display to always stay hidden.