Garry's Mod Wiki

DSprite

Description

A panel that draws a sprite on the player's HUD with the given IMaterial, Color and rotation.

A shortcut for this is CreateSprite().

Parent

Derives from DPanel.

Example

Creates a DSprite with the sent_ball material, and sets the color to cyan.

local sprite = vgui.Create("DSprite") sprite:SetMaterial(Material("sprites/sent_ball")) sprite:SetColor(Color(0, 255, 255)) sprite:Center() sprite:SetSize(200, 200)
Output: See Preview above.

Page Links


Special Pages


Wikis

?

Render Time: 34ms

DB GetPage 3
Generate Html 7
SaveChanges (1) 10
Render Body 0
Render Sidebar 12