• Avatar Image on HUD
    5 replies, posted
Hello, I have come into a problem when putting a steam avatar image on a HUD that I am creating. The image does work, it shows up on the HUD. My problem however is that it does not disappear when I press pause, bring up console etc. It also does not update when I change resolution. I know I have nothing updating it but I was wondering if anyone had a solution to my problem. [CODE]local Avatar function HUDValidCheck() if !LocalPlayer():IsValid() then return end if !Avatar then Avatar = vgui.Create( "AvatarImage", Panel ) Avatar:SetSize( 64, 64 ) Avatar:SetPos( 18, ScrH() - 165 ) Avatar:SetPlayer( LocalPlayer(), 64 ) end end [/CODE] Any input would be appreciated. Could Anyone reply to this with their explanation/advise or a link?
I really need help with this.
derma isn't drawn in the hudpaint hook, you can try parenting the panel to the hud or drawing it manually in hudpaint
[QUOTE=PortalGod;50070010]derma isn't drawn in the hudpaint hook, you can try parenting the panel to the hud or drawing it manually in hudpaint[/QUOTE] Okay sort of with you so far. Could you give me an example please?
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Panel/ParentToHUD]Panel:ParentToHUD[/url] or [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Panel/SetPaintedManually]Panel:SetPaintedManually[/url] and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Panel/PaintManual]Panel:PaintManual[/url]
I am sorry to ask but could you create some code for an example. I am a bit of a noob ;)
Sorry, you need to Log In to post a reply to this thread.