mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 22:47:59 +01:00
Refresh TGUI blank window fix (#24392)
* Refresh TGUI blank window fix * Whoopsie * Separate things
This commit is contained in:
@@ -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, "<span class='notice'>TGUI windows refreshed - [refreshed_count].<br>If you have blank window - restart the game, or open previous TGUI window.</span>")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user