Category:DSprite

From Garry's Mod
Jump to: navigation, search

Contents

DescriptionPanelPage

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

A shortcut for this is CreateSprite().

Inherited Functions

Inherits the following functions from DPanel and its parents up to 3 levels deep:


Examples

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.

Pages in category "DSprite"

The following 8 pages are in this category, out of 8 total.

Personal tools
Navigation