Skyline Lua API  Version 1.0
Lua Script Reference for Skyline Game Engine.
screen Class Reference

#include <LUA_API_Screen.h>

Public Member Functions

int getWidth ()
 This function returns the width of the screen. More...
 
int getHeight ()
 This function returns the height of the screen. More...
 
int getMouseX ()
 This function returns the mouse x screen coordinate. More...
 
int getMouseY ()
 This function returns the mouse y screen coordinate. More...
 
void getMouseDelta ()
 This function returns you the X and Y mouse move deltas calculated within the engine. More...
 
screen worldPosToScreenPos (x, y, z)
 World Position to screen position. More...
 
screen worldPosToAbsScreenPos (x, y, z)
 World Position to absolute screen position. More...
 
screen worldPosInFrustum (x, y, z)
 World Position Frustum. More...
 
screen worldPosInFront (x, y, z)
 World Position in front. More...
 

Detailed Description

Functions to help when working with the main screen.
Use as screen.function()
For more information on how these functions can be used please visit the User Manual - https://home.aurasoft-skyline.co.uk

Member Function Documentation

int screen::getHeight ( )

This function returns the height of the screen.

Returns
The height of the screen.

The following is a Small Example on how to use this function:

function onInit(objID)
    height = screen.getHeight();
end
void screen::getMouseDelta ( )

This function returns you the X and Y mouse move deltas calculated within the engine.

Returns
mouseDeltaX : The mouse x delta. < 0 - means moving left. > 0 means moving right
mouseDeltaY : The mouse x delta. < 0 - means moving down. > 0 means moving up

The following is a Small Example on how to use this function:

function onMouseMove( ms_pos_x, ms_pos_y )
    mouseDelta = newType.vec2(screen.getMouseDelta());
    sky.print("mouseDelta X: "..mouseDelta.x.."</br>mouseDelta Y : "..mouseDelta.y, 1);
end
int screen::getMouseX ( )

This function returns the mouse x screen coordinate.

Returns
An integer containing the screen x co-ord

The following is a Small Example on how to use this function:

function onInit(objID)
    msx = screen.getMouseX();
end
int screen::getMouseY ( )

This function returns the mouse y screen coordinate.

Returns
An integer containing the screen y co-ord

The following is a Small Example on how to use this function:

function onInit(objID)
    msy = screen.getMouseY();
end
int screen::getWidth ( )

This function returns the width of the screen.

Returns
The width of the screen.

The following is a Small Example on how to use this function:

function onInit(objID)
    width = screen.getWidth();
end
screen screen::worldPosInFront ( ,
,
 
)

World Position in front.

Parameters
X: value of x axis
Y: value of y axis
Z: value of z axis

The following is a Small Example on how to use this function:

function onMouseMove( ms_pos_x, ms_pos_y )
    Example coming soon
end
screen screen::worldPosInFrustum ( ,
,
 
)

World Position Frustum.

Parameters
X: value of x axis
Y: value of y axis
Z: value of z axis

The following is a Small Example on how to use this function:

function onMouseMove( ms_pos_x, ms_pos_y )
    Example coming soon
end
screen screen::worldPosToAbsScreenPos ( ,
,
 
)

World Position to absolute screen position.

Parameters
X: value of x axis
Y: value of y axis
Z: value of z axis

The following is a Small Example on how to use this function:

function onMouseMove( ms_pos_x, ms_pos_y )
    Example coming soon
end
screen screen::worldPosToScreenPos ( ,
,
 
)

World Position to screen position.

Parameters
X: value of x axis
Y: value of y axis
Z: value of z axis

The following is a Small Example on how to use this function:

function onMouseMove( ms_pos_x, ms_pos_y )
    Example coming soon
end

The documentation for this class was generated from the following file: