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.
37 lines
1.0 KiB
Plaintext
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 |