view_set_xport


Description

This function can be used to set the x position of the given view port. You give the view port index (from 0 to 7) and the new position to place it at.


Syntax:

view_set_xport(view_port, x)


Arguments:

Argument Description
view_port The view port to target (0 - 7)
x The new x position


Returns:

N/A


Example:

if view_get_xport(0) != (display_get_width() / 2) - (view_wport[0] / 2)
   {
   view_set_xport(0, (display_get_width() / 2) - (view_wport[0] / 2));
   }

The above code will check the x position of the view port[0] and if it is not where it is required to be it is set to that position.


Back: Cameras
Next: view_set_yport
© Copyright YoYo Games Ltd. 2018 All Rights Reserved