construct_header(msg)
if(!archive.button_icons["[msg]"])
var/obj/o = drawfont.QuickText(src, msg, "#E6C208", 1, layer = 93)
var/icon/draw_text = new/icon(o.icon)
var/icon/product = new/icon('Headerbackground.dmi')
draw_text.Crop(1, 32, draw_text.Width(), 10)
product.Blend(draw_text, ICON_OVERLAY, 9, -4)
archive.button_icons["[msg]"] = product
src << browse_rsc(archive.button_icons["[msg]"], "header_[archive.button_icons.Find(msg)].png")
src << output("[skin_tab["html"]]<img src=header_[archive.button_icons.Find(title)].png></body><html>", "alert.header")
Problem description:
Sometimes, the image will display as an X. I am presuming this is because the client hasn't recieved the file yet.
How do I make sure the client has recieved all image files before attempting to display the image? Something like 'sleep(100)' is a shitty estimate. Better yet, can I display images directly from the RSC instead of the client cache?
The best way I have is to use body onload="finished()", but I don't really want to do that unless I have to.