• is there a revese function for surface.GetTextureID ?
    5 replies, posted
is there a reverse function for [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/surface/GetTextureID]surface.GetTextureID[/url] ? :v: kind of this : [CODE]local Tpath = surface.GetTexturePath(55)[/CODE] i have search but there nothing ... :/
detour the surface.GetTextureID function to store the path somewhere ?
Why do you need it is the real question.
[QUOTE=pierre0158;51033572]detour the surface.GetTextureID function to store the path somewhere ?[/QUOTE] i want to find the path like : "entities/weapon_frag" from a textureID [QUOTE=Robotboy655;51033743]Why do you need it is the real question.[/QUOTE] okay so i'm updating my addon : [url]http://steamcommunity.com/sharedfiles/filedetails/?id=711681729[/url] and this use Customisable weaponery addon i'm looking for creating automaticly attachments icons, from customizableWeaponry.registeredAttachments in this table there is the textureID of the attachment, ids are numbers and for displaing icons in my menu i use "ContentIcons" who not support texture but material (a path) [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/ContentIcon/SetMaterial]ContentIcon:SetMaterial[/url] so i try to find a way to change the textureId into a material path i can do this : [CODE]surface.SetTexture(CustomizableWeaponry.registeredAttachments[1].displayIcon) -- id = 55[/CODE] but i cant do this [CODE] local a = vgui.Create( "ContentIcon", Frame ) a:SetName("blabla") a:SetMaterial(CustomizableWeaponry.registeredAttachments[1].displayIcon) -- error [/CODE] maybe you understand me ... this time
Why do you need to do that? [editline]11th September 2016[/editline] Write a custom Paint function for your ContentIcon? Do not use ContentIcon? See if CustomizableWeaponry supports Material()s If not, ask for the support to be added
[QUOTE=Robotboy655;51033786][/QUOTE] Write a custom Paint function for your ContentIcon? : what do you mean ? Do not use ContentIcon? : what can i use for this ? See if CustomizableWeaponry supports Material()s : nope .... If not, ask for the support to be added : i probably will
Sorry, you need to Log In to post a reply to this thread.