VectorScreen

From Liberty Unleashed Wiki
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