VectorScreen

From Liberty Unleashed Wiki
Revision as of 12:30, 2 August 2011 by Stormeus (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

The VectorScreen type is a 2-dimensional vector used to indicate positions on screen. The origin is at the top-left corner of the screen.

Constructor

  1. VectorScreen( int x, int y )

Values

  • x - The X coordinate of the vector
  • y - The Y coordinate of the vector

Example

VectorScreens originate in the top-left corner. This code makes a VectorScreen that starts 10 pixels down and 10 pixels to the right.

  1.  
  2. local screen = VectorSceen( 10, 10 );
  3.  

This code makes a VectorScreen about 10 pixels down and 20 pixels from the right.

  1.  
  2. local screen = VectorScreen( ScreenWidth - 20, 10 );
  3.  

This code creates a VectorScreen approximately in the middle of the screen.

  1.  
  2. local screen = VectorScreen( ScreenWidth / 2, ScreenHeight / 2 );
  3.  

Types

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox