Files
Divergent/mods/UI Rework G.A.M.M.A. Style/gamedata/scripts/modxml_inv_hint_wnd.script
T
Rage 255081e1ee Added New Mods; Swapped Mods and Removed Some
Removed EGUI in favor of UI Rework by Sota

Added in GTR Optimized for higher res textures, over Zone Reality Remade and removed all files that conflicted from ZRR to save storage space.
2024-03-30 06:43:01 -04:00

37 lines
1.0 KiB
Plaintext

function on_xml_read()
RegisterScriptCallback("on_xml_read", function(xml_file_name, xml_obj)
if xml_file_name == [[ui\ui_inventory.xml]]
or xml_file_name == [[ui\ui_inventory_16.xml]]
or xml_file_name == [[ui\ui_inventory_21.xml]]
then
local ratio = utils_xml.screen_ratio()
local res = xml_obj:query("hint_wnd")
if res[1] then
local el = res[1]
xml_obj:setElementAttr(el, {width=208*ratio})
end
local res = xml_obj:query("hint_wnd > background")
if res[1] then
local el = res[1]
xml_obj:setElementAttr(el, {width=208*ratio})
end
local res = xml_obj:query("hint_wnd > background")
if res[1] then
local el = res[1]
xml_obj:setElementAttr(el, {width=208*ratio})
end
local res = xml_obj:query("hint_wnd > background > texture")
if res[1] then
local el = res[1]
xml_obj:setText(el, "ui_icons_PDA_tooltips")
end
local res = xml_obj:query("hint_wnd > text")
if res[1] then
local el = res[1]
xml_obj:setElementAttr(el, {x=10*ratio, y=10, width=188*ratio})
end
end
end)
end