[CODE]Iconz = vgui.Create("SpawnIcon", frame)
Iconz:SetPos(ScrW() / 2 - 900, ScrH() / 2 - 500)
Iconz:SetSize(200, 200)
Iconz:SetModel("models/weapons/w_rif_ak47.mdl")[/CODE]
[IMG]https://i.gyazo.com/de34a6449193ff0a08840ac1c5c07135.png[/IMG]
Does anyone know how to make it so its not pixelated or is that no possible? Thanks in advance.
Call Iconz:InvalidateLayout(true) after setting the model
[QUOTE=Chessnut;48459759]Call Iconz:InvalidateLayout(true) after setting the model[/QUOTE]
Sorry for the late reply but it didn't work.
The size should be a a power of 2.
[QUOTE=Chessnut;48462046]The size should be a a power of 2.[/QUOTE]
I tried 256x256 still pixelated!
It's pixelated because you draw a 64x64 image over a 256x256 size.
You must rerender the icon to 256x256.
icon:InvalidateLayout( true ) must be called after SetSize and BEFORE SetModel.
[del]Try calling SpawnIcon:RebuildSpawnIcon()[/del]
[QUOTE=Robotboy655;48462400]It's pixelated because you draw a 64x64 image over a 256x256 size.
You must rerender the icon to 256x256.
icon:InvalidateLayout( true ) must be called after SetSize and BEFORE SetModel.
[del]Try calling SpawnIcon:RebuildSpawnIcon()[/del][/QUOTE]
Thank you based Robotboy and Chessnut!
Sorry, you need to Log In to post a reply to this thread.