Skip to content

Commit

Permalink
Fix behavior of color selection dropbox in lobby (FAForever#3765)
Browse files Browse the repository at this point in the history
  • Loading branch information
Penguin5 authored Apr 8, 2022
1 parent af91346 commit 64c0550
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 4 additions & 2 deletions lua/ui/controls/combo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,10 @@ BitmapCombo = Class(Group) {
-- prev will be last control here
self.ddm.Bottom:Set(prev.Bottom)

self._dropdown:Hide()
self._ddhidden = true
if self._dropdown:IsHidden() then
self._dropdown:Hide()
self._ddhidden = true
end
end,

SetBitmap = function(self, bmp, name)
Expand Down
4 changes: 1 addition & 3 deletions lua/ui/lobby/lobby.lua
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ local function DoSlotBehavior(slot, key, name)
else
HostUtils.RemoveAI(slot)
end
Check_Availaible_Color()
else
-- We're adding an AI of some sort.
if lobbyComm:IsHost() then
Expand Down Expand Up @@ -1232,6 +1231,7 @@ function ClearSlotInfo(slotIndex)
UpdateSlotBackground(slotIndex)
ShowGameQuality()
RefreshMapPositionForAllControls(slotIndex)
Check_Availaible_Color()
refreshObserverList()
end

Expand Down Expand Up @@ -3113,14 +3113,12 @@ function CreateUI(maxPlayers)
else
AssignAutoTeams()
end
Check_Availaible_Color()
end
GUI.AIClearButton.OnClick = function()
for i = 1, table.getn(ChangedSlots) do
HostUtils.RemoveAI(ChangedSlots[i])
end
ChangedSlots = {}
Check_Availaible_Color()
end
GUI.TeamCountSelector.OnClick = function(Self, Index, Text)
local OccupiedSlots = 0
Expand Down

0 comments on commit 64c0550

Please sign in to comment.