whoward69
DLL Minion
Mod "Utils - ActionIcons Extension" is a replacement for the core ActionIcons.lua file,
permitting multiple mods to add new icons. Mod "Utils - Tech Tree Delayed Load" fixes an issue with loading the Tech Tree before mods have had a chance to load their new action icons.
(See ActionIconsExtn.lua for full documentation on usage)
permitting multiple mods to add new icons. Mod "Utils - Tech Tree Delayed Load" fixes an issue with loading the Tech Tree before mods have had a chance to load their new action icons.
(See ActionIconsExtn.lua for full documentation on usage)
Code:
--
-- Sample usage (place in an InGameUIAddin file)
--
-- include("ActionIconsExtn")
-- if (ActionIconExtnInit()) then
-- ActionIconExtnAdd("BUILD_TUNNEL", "UNIT_ACTION_ATLAS", 25)
-- -- ActionIconExtnDump()
-- end
--
--
-- Known issues
--
-- Due to the order that core lua files are loaded,
-- the Tech Tree is initialised before the new action icons
-- are available, so any new actions that have prereq techs
-- will not be visible (as a blank icon is shown), but the
-- tool-tip will still be shown, if the mouse is moved over
-- the correct area of the tech panel. If this is an issue,
-- download and install "Utils - Tech Tree Delayed Load" mod
--
--
-- Initialise the ActionIcon extensions
--
-- bReplace - true if custom icons will replace standard icons, defaults to false
--
-- return true on success
--
function ActionIconExtnInit(bReplace)
--
-- Add a new icon
--
-- sActionType - the action to associate the icon for (eg BUILD_MINE)
-- sIconAtlas - the atlas to use (eg UNIT_ACTION_ATLAS)
-- iIconIndex - the index in the atlas to the icon (eg 25)
--
function ActionIconExtnAdd(sActionType, sIconAtlas, iIconIndex)
--
-- Displays all the action icon associations if the form
-- BUILD_MINE --> UNIT_ACTION_ATLAS:25
--
function ActionIconExtnDump()