--#*****************************************************************************
--#* Hook File: lua/modules/ui/uiutil.lua
--#*
--#* Modded By: Gilbot-X
--#*
--#* Summary  : Various utility functions to make UI scripts easier and more consistent
--#*
--#* Notes    : The argument filespec is the filename of format '/icons/units/*_icon.dds'
--#*****************************************************************************

do
    local IconSettings = import('/mods/SupremeUnitPackV5/UnitTable.lua')
    
    local oldUIFile = UIFile
    function UIFile(filespec)
        local result = IconSettings.GetFileNameAndCheckExists(filespec)
        if result then return result 
        else return oldUIFile(filespec)
        end
    end
end 

