diff --git a/LuaMenu/widgets/chobby/i18n/chililobby.lua b/LuaMenu/widgets/chobby/i18n/chililobby.lua index 589bfa7ff..1435adfac 100644 --- a/LuaMenu/widgets/chobby/i18n/chililobby.lua +++ b/LuaMenu/widgets/chobby/i18n/chililobby.lua @@ -140,13 +140,16 @@ return { rejoin = "Rejoin", abandon = "Abandon", - tooltip_is_spectator = "You will spectate this game.", - tooltip_become_spectator = "Press to watch the game as a spectator.", spectate = "Spectate", spectating = "Spectating", - tooltip_is_player = "You will play in this game.", + tooltip_is_spectator = "You will spectate this game when it starts.", + tooltip_become_spectator = "Press to watch the game as a spectator.", + tooltip_is_player = "You will play in this game when it starts.", tooltip_become_player = "Press to play in this game.", + tooltip_join_queue = "Enter the join-queue to play in this game.", + tooltip_leave_queue = "Spectate this game and remove yourself from the join-queue.", + play = "Play", playing = "Playing", diff --git a/LuaMenu/widgets/gui_battle_room_window.lua b/LuaMenu/widgets/gui_battle_room_window.lua index 2cd036d96..c55064f21 100644 --- a/LuaMenu/widgets/gui_battle_room_window.lua +++ b/LuaMenu/widgets/gui_battle_room_window.lua @@ -839,8 +839,13 @@ local function SetupInfoButtonsPanel(leftInfo, rightInfo, battle, battleID, myUs btnSpectate.suppressButtonReaction = true btnPlay.suppressButtonReaction = false - btnSpectate.tooltip = i18n("tooltip_is_spectator") - btnPlay.tooltip = i18n("tooltip_become_player") + if battleLobby.name ~= "singleplayer" then + btnSpectate.tooltip = i18n("tooltip_leave_queue") + btnPlay.tooltip = i18n("tooltip_join_queue") + else + btnSpectate.tooltip = i18n("tooltip_is_spectator") + btnPlay.tooltip = i18n("tooltip_become_player") + end ButtonUtilities.SetCaption(btnSpectate, i18n("spectating")) end @@ -856,9 +861,9 @@ local function SetupInfoButtonsPanel(leftInfo, rightInfo, battle, battleID, myUs OnClick = { function(obj) local battleStatus = battleLobby:GetUserBattleStatus(myUserName) or {} - if battleStatus.isSpectator then + if battleStatus.isSpectator and battleLobby.name ~= "singleplayer" then battleLobby:SayBattle('$leaveq') - battleLobby:_OnUpdateUserBattleStatus(battleLobby:GetMyUserName(), {queuePos = 0}) -- we proactive change our queuePos; because we donīt reliable receicve s.battle.queue_status on fast clicking play/spectate + battleLobby:_OnUpdateUserBattleStatus(battleLobby:GetMyUserName(), {queuePos = 0}) -- we proactive change our queuePos; because we don't reliable receicve s.battle.queue_status on fast clicking play/spectate end battleLobby:SetBattleStatus({ isSpectator = true, @@ -1936,7 +1941,7 @@ local function SetupPlayerPanel(playerParent, spectatorParent, battle, battleID) end local playerData = GetPlayerData(userName) if playerData.team == teamNew then - return -- team didnīt change, so donīt update + return -- team didn't change, so don't update end if playerData.team ~= false then RemovePlayerFromTeam(userName)