From 25e598d54a30d3f620e4e0ec619d554c7e1365d9 Mon Sep 17 00:00:00 2001 From: MelokG <99420088+MelokG000@users.noreply.github.com> Date: Sat, 28 Feb 2026 02:16:14 +0300 Subject: [PATCH] Adds a quit button to the ESC menu (#95260) ## About The Pull Request adds a quit button to ESC menu ## Why It's Good For The Game ~~you can now ragequit instead of ragealtf4~~ you cannot quit the game in fullscreen without alt+tab or alt+F4 ## Changelog :cl: qol: you can now quit the game /:cl: --- code/modules/escape_menu/home_page.dm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/code/modules/escape_menu/home_page.dm b/code/modules/escape_menu/home_page.dm index 02a050535b0..1c8b2e7a44b 100644 --- a/code/modules/escape_menu/home_page.dm +++ b/code/modules/escape_menu/home_page.dm @@ -58,6 +58,18 @@ ) ) + page_holder.give_screen_object( + new /atom/movable/screen/escape_menu/text/clickable( + null, + /* hud_owner = */ null, + /* escape_menu = */ src, + /* button_text = */ "Quit", + /* offset = */ list(-311, 30), + /* font_size = */ 24, + /* on_click_callback = */ CALLBACK(src, PROC_REF(home_quit)), + ) + ) + //Bottom right buttons, from right to left, starting with the button to open the list. page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small( null, @@ -185,6 +197,12 @@ /datum/escape_menu/proc/home_resume() qdel(src) +/datum/escape_menu/proc/home_quit() + var/confirmquit = tgui_alert(usr, "Are you sure you want to quit?", "Quit", list("Yes", "No")) + if(confirmquit != "Yes") + return + winset(usr, null, list("command"=".quit")) + /datum/escape_menu/proc/home_open_character_settings() client?.prefs.current_window = PREFERENCE_TAB_CHARACTER_PREFERENCES client?.prefs.update_static_data(client?.mob)