From aad6122ff5b69fead045f0856405cf94756f6e22 Mon Sep 17 00:00:00 2001 From: Fireball <32598847+FIr3baL@users.noreply.github.com> Date: Sun, 21 Jul 2024 21:58:02 +0200 Subject: [PATCH] added a setting for changing the state of queueExitConfirmPromptDoNotAskAgain --- LuaMenu/widgets/chobby/i18n/chililobby.lua | 2 ++ LuaMenu/widgets/gui_settings_window.lua | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/LuaMenu/widgets/chobby/i18n/chililobby.lua b/LuaMenu/widgets/chobby/i18n/chililobby.lua index e738a4daf..8e8fb2cc9 100644 --- a/LuaMenu/widgets/chobby/i18n/chililobby.lua +++ b/LuaMenu/widgets/chobby/i18n/chililobby.lua @@ -202,6 +202,8 @@ return { autoLaunchAsSpectator = "Auto-launch when spectating", randomSkirmishSetup = "Random Skirmish AI and Map", randomSkirmishSetup_tooltip = "Randomizes AIs and Map in Singleplayer Skirmish mode. Requires Restart.", + queueExitConfirmPromptDoNotAskAgain = "No prompt when leaving queue", + queueExitConfirmPromptDoNotAskAgain_tooltip = "Disabled = Shows a prompt when leaving the queue or game.", ingame_notifcations = "Notifications while ingame", ingame_notifcations_tooltip = "Allows chat from friends and other important notifications to be shown while you are playing", non_friend_notifications = "Non-friend notifications", diff --git a/LuaMenu/widgets/gui_settings_window.lua b/LuaMenu/widgets/gui_settings_window.lua index 9bafb0c10..7be458789 100644 --- a/LuaMenu/widgets/gui_settings_window.lua +++ b/LuaMenu/widgets/gui_settings_window.lua @@ -993,6 +993,10 @@ local function GetLobbyTabControls() children[#children + 1] = autoLogin offset = offset + ITEM_OFFSET + local cbQueueExitConfirmPromptDoNotAskAgain + cbQueueExitConfirmPromptDoNotAskAgain, offset = AddCheckboxSetting(offset, i18n("queueExitConfirmPromptDoNotAskAgain"), "queueExitConfirmPromptDoNotAskAgain", true, nil , i18n("queueExitConfirmPromptDoNotAskAgain_tooltip")) + children[#children + 1] = cbQueueExitConfirmPromptDoNotAskAgain + children[#children + 1] = Label:New { x = 20, y = offset + TEXT_OFFSET, @@ -1197,6 +1201,12 @@ local function GetLobbyTabControls() end --Configuration:SetConfigValue("randomSkirmishSetup", value) end + + if key == "queueExitConfirmPromptDoNotAskAgain" and cbQueueExitConfirmPromptDoNotAskAgain.checked ~= value then + cbQueueExitConfirmPromptDoNotAskAgain.checked = value + cbQueueExitConfirmPromptDoNotAskAgain.state.checked = cbQueueExitConfirmPromptDoNotAskAgain.checked + cbQueueExitConfirmPromptDoNotAskAgain:Invalidate() + end end freezeSettings = false