Just had a user complain that his save game got busted because he saved while the UI was disabled, couldn't re-enable it after reloading. Here now a recovery based on the original script:
Code:
; --- Hide UI, press Scroll Lock, by UserPro ---
declare_counter ui_showing
monitor_event ShortcutTriggered ShortcutTriggered object_manager hide_gui
wait 0.1
if I_CompareCounter ui_showing = 0
hide_ui
disable_movie_view
set_counter ui_showing 2 ; disabled state
end_if
if I_CompareCounter ui_showing = 1
show_ui
set_counter ui_showing 0 ; default state
end_if
if I_CompareCounter ui_showing = 2
set_counter ui_showing 1 ; interim state
end_if
end_monitor
; --- Hide UI reset ---
monitor_event GameReloaded TrueCondition
if I_CompareCounter ui_showing = 2 ; disabled state
set_counter ui_showing 0 ; default state
show_ui ; enable UI
end_if
if I_CompareCounter ui_showing = 1 ; interim state
set_counter ui_showing 0 ; default state
show_ui ; enable UI
end_if
end_monitor