From 2e61b6c51fa92adab091ee82d18c2684cd70e806 Mon Sep 17 00:00:00 2001 From: Aylong <69762909+AyIong@users.noreply.github.com> Date: Wed, 6 Mar 2024 16:37:50 +0200 Subject: [PATCH] Refresh TGUI blank window fix (#24392) * Refresh TGUI blank window fix * Whoopsie * Separate things --- code/modules/tgui/tgui_panel/tgui_panel_external.dm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/modules/tgui/tgui_panel/tgui_panel_external.dm b/code/modules/tgui/tgui_panel/tgui_panel_external.dm index 67cd6d612e2..7de8a6705f0 100644 --- a/code/modules/tgui/tgui_panel/tgui_panel_external.dm +++ b/code/modules/tgui/tgui_panel/tgui_panel_external.dm @@ -39,6 +39,19 @@ set name = "Refresh TGUI" set category = "Special Verbs" + var/choice = alert(usr, + "Use it ONLY if you have trouble with TGUI window.\ + That's UI's with EYE on top-left corner.\ + Otherwise, you can get a white window that will only close when you restart the game!", "Refresh TGUI", "Refresh", "Cancel") + if(choice != "Refresh") + return + var/refreshed_count = 0 for(var/window_id in tgui_windows) var/datum/tgui_window/window = tgui_windows[window_id] + if(!window.locked) + window.acquire_lock() + continue window.reinitialize() + refreshed_count++ + to_chat(usr, "TGUI windows refreshed - [refreshed_count].
If you have blank window - restart the game, or open previous TGUI window.
") +