Skip to content

Commit

Permalink
Merge pull request #859 from AntlerForce/startboxcombo
Browse files Browse the repository at this point in the history
Hide startboxcombobox if in joinqueue
  • Loading branch information
AntlerForce authored Dec 17, 2024
2 parents 68a83a8 + c5ee040 commit 894a082
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions LuaMenu/widgets/gui_battle_room_window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1192,9 +1192,10 @@ local function SetupInfoButtonsPanel(leftInfo, rightInfo, battle, battleID, myUs
end

-- Lobby interface
function externalFunctions.UpdateUserTeamStatus(userName, allyNumber, isSpectator)
function externalFunctions.UpdateUserTeamStatus(userName, allyNumber, isSpectator, queuePos)
local iAmQueued = queuePos and queuePos > 0
if userName == myUserName then
if isSpectator and battleLobby.name ~= "singleplayer" and battle.bossed ~= true then
if battleLobby.name ~= "singleplayer" and battle.bossed ~= true and (isSpectator or iAmQueued) then
-- SetButtonStateSpectating()
startBoxPanel:Hide()
minimapPanel.disableChildrenHitTest = true --omg this is amazing
Expand Down Expand Up @@ -3258,7 +3259,7 @@ local function InitializeControls(battleID, oldLobby, topPoportion, setupData)
local function OnUpdateUserTeamStatus(listener, userName, allyNumber, isSpectator, queuePos)
-- Spring.Echo("room:OnUpdateUserTeamStatus userName:" .. tostring(userName) .. " allyNumber:" .. tostring(allyNumber) .. " isSpectator:" .. tostring(isSpectator))
--votePanel.VoteButtonVisible(isSpectator == false)
infoHandler.UpdateUserTeamStatus(userName, allyNumber, isSpectator)
infoHandler.UpdateUserTeamStatus(userName, allyNumber, isSpectator, queuePos)
playerHandler.UpdateUserTeamStatus(userName, allyNumber, isSpectator, queuePos)
end

Expand Down

0 comments on commit 894a082

Please sign in to comment.