GUISprite

From Liberty Unleashed Wiki
Revision as of 01:05, 5 October 2012 by IdkanYavuk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function creates a GUI sprite (an image).

Syntax

GUISprite can take different lists of parameters. These are:

  1. GUISprite GUISprite( string file )
  1. GUISprite GUISprite( string file, VectorScreen pos )
  1. GUISprite GUISprite( string file, VectorScreen pos, float rotation, VectorScreen rotationcentre )

Arguments

  • file - The filename of the sprite to be drawn
  • pos - The position of the sprite on screen or related to its parent. This parameter is optional
  • rotation - The sprite rotation in degrees. This parameter is optional
  • rotationcentre - The rotation centre relative to the sprite coordinates. This parameter is optional

Example

  1.  
  2. g_vlogoPos <- VectorScreen( 10, ScreenHeight - 60 );
  3. g_logo <- GUISprite( "logo.png",  ::g_vlogoPos );
  4.  
  5. function onClientSpawn( pClass )
  6. {
  7.  
  8. g_logo.Visible = true;
  9. return 1;
  10. }
  11.  

Notes

Used functions and other notes here.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox