Divergent/mods/Instant Tooltip/gamedata/scripts/instant_tooltip.script

40 lines
1.1 KiB
Plaintext

--[[
Item Info Tooltip delay reduction.
29/11/2020
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
Author: RavenAscendant
--]]
delay = 80 -- change this to adjust delay to all tool tips at once. Make idividual changes below.
function on_game_start()
RegisterScriptCallback("GUI_on_show", delay_change)
end
function delay_change( name, path)
if not (name ~= "UIInventory" or name ~= "UIItemSheet" or name ~= "UIWorkshop" ) then return end --return quickly if not the GUI we want
if ui_inventory.GUI then
ui_inventory.GUI.item_info.delay = delay
ui_inventory.GUI.upgr_info.delay = delay
---ui_inventory.tg_hint_step = delay -- i think this is the explanation of what each stat does on the botom panel under equipment.
end
if ui_itm_details.GUI then
ui_itm_details.GUI.item_info.delay = delay
ui_itm_details.GUI.upgr_info.delay = delay
ui_itm_details.GUI.hint_wnd.delay = delay
end
if ui_workshop.GUI then
ui_workshop.GUI.item_info.delay = delay
ui_workshop.GUI.upgr_info.delay = delay
end
end