room_get_viewport


描述

With this function you can retrieve the details of a view port in a room other than the current one. You give the room ID and the index of the view port to retrieve (from 0 to 7) and the function will return an array of 5 indices, where:


语法:

room_get_viewport(rm, vind);


参数:

参数 描述
rm The index of the room to get viewport data from
vind The index of the view port to get


返回:

Array (5 elements: visible, x, y, width, height)


例如:

v_vals = room_get_viewport(rm_Game, 0);
if v_vals[0] == false
    {
    room_set_view(rm_Game, true, v_vals[1], v_vals[2], v_vals[3], v_vals[4]);
    }

The above code retrieves the view port data for the given room then checks to see if the port is flagged as visible. If it is not, the view port data is set to make it visible.


上一页: General Room Functions And Variables
下一页: room_set_camera
© Copyright YoYo Games Ltd. 2018 All Rights Reserved