Mod example: draw test - AUTOMATIC1111/IntoTheBreachLua GitHub Wiki

This mod draws an image with text "It works! ---->" when the repair skill icon is displayed on screen.

Download: https://drive.google.com/open?id=1tdzAxmLqZojuGqMAryUZnlUjgeIh0pRp

Here is the entire source code the mod:

local function init(self)
	local itworks=sdl.surface(self.resourcePath.."itworks.png")
	local repairIcon=sdl.surface(self.resourcePath.."repair.png")
	
	AUTO_HOOK_Draw_It_Works = sdl.drawHook(function(screen)
		if repairIcon:wasDrawn() then
			screen:blit(itworks,nil,64,430)
		end
	end)
end

local function load(self,options,version)

end

return {
	id = "C_DrawTest",
	name = "Draw Test",
	version = "1.0.0",
	requirements = {},
	init = init,
	load = load,
}