Quick Question: Custom image on DImage

Hi all,

I haven’t really used DImage to do anything but use the silkicons and I can’t find any tutorials online on a custom image.
I have a PNG of the image I want to use and I just dropped it into materials/ (expecting it to work). I also added materials/filename.png as a resource for the clients to download, too.
However, it does shows up as the missing texture pattern and I’m really not sure what to do.

Thanks.

Post your code? You have the path wrog or it doesnt exist.
Check that you dont have in the path materials/

Unfortunately it’s some very simple stuff and doesn’t throw an error.


local logo = vgui.Create("DImage",fullmenu)
logo:SetImage("EURoleplay.png")
logo:SetSize(235,61)
logo:AlignTop(5)
logo:AlignLeft(5)

(In a seperate script)


local resourceFiles = {
	"resource/fonts/OpenSans-Regular.ttf",
	"resource/fonts/Oswald-Regular.ttf",
	"materials/EURoleplay.png",
}
for _,res in pairs(resourceFiles) do
	resource.AddFile(res)
end