From c5ee040f1f296eee7c04a395860d7802d48dcce7 Mon Sep 17 00:00:00 2001 From: Moose <124457076+AntlerForce@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:58:08 -0700 Subject: [PATCH] Hide startboxcombobox if in joinqueue --- LuaMenu/widgets/gui_battle_room_window.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/LuaMenu/widgets/gui_battle_room_window.lua b/LuaMenu/widgets/gui_battle_room_window.lua index 95f10c903..3ee9451b1 100644 --- a/LuaMenu/widgets/gui_battle_room_window.lua +++ b/LuaMenu/widgets/gui_battle_room_window.lua @@ -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 @@ -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