16 lines
516 B
Plaintext
16 lines
516 B
Plaintext
local function GUI_on_show(name)
|
|
if name == "UIInventory" or name == "UIRecipe" or name == "UIMutantLoot" or name == "UIWorkshop" or name == "UIWheelAmmo" then
|
|
exec_console_cmd("r2_dof_enable on")
|
|
exec_console_cmd("r2_dof 0,800,1000")
|
|
end
|
|
end
|
|
|
|
local function ui_close(gui, str2)
|
|
exec_console_cmd("r2_dof_enable off")
|
|
exec_console_cmd("r2_dof -1.000000,0.000000,800.000000")
|
|
end
|
|
|
|
function on_game_start()
|
|
RegisterScriptCallback("GUI_on_show", GUI_on_show)
|
|
RegisterScriptCallback("GUI_on_hide",ui_close)
|
|
end |