Ok, so I'm currently in the process of creating a mod and it's all been going quite well.
I've hit a bump in the road, and that's the fact that I need to have gifs and png files on screen nd such. I was planning to use vgui.create("Dimage") and then I realized that I've absolutely no clue how to make my own images in the mods folder appear instead of those already inside of the gamemode's materials folder.
So I ask you, how would I make a .gif file inside of my addon folder (MyAddon/materials/) accessible though Dimage:SetImage()
You can't load GIFs in garrysmod, although you can load pngs inside your materials folder
if your png is inside myaddon/materials/vgui/image.png
Then do DImage:SetImage("vgui/image.png")
[QUOTE=gonzalolog;51871297]You can't load GIFs in garrysmod, although you can load pngs inside your materials folder
if your png is inside myaddon/materials/vgui/image.png
Then do DImage:SetImage("vgui/image.png")[/QUOTE]
Oh, well that's a shame.
Hm, I thought you could convert .gif into .vtf
This might be dumb, but you could upload the gif to the internet of some form of webpage. Then from there you can retrieve that website, parent it to a panel them boom, gif ingame.
[QUOTE=Thegerba;51871326]Oh, well that's a shame.
Hm, I thought you could convert .gif into .vtf[/QUOTE]
Extract all frames from gif, place it inside a folder, open vtfedit, select file>import and select all frames, there you go, you will have an animated vtf, you have to add animated texture proxy inside it vmt
Sorry, you need to Log In to post a reply to this thread.