GXSceneConstrain - boxgaming/gx GitHub Wiki

Syntax

GXSceneConstraint mode%

Description

Constrain the scene positioning using the specified mode:

Mode Description
GXSCENE_CONSTRAIN_NONE No scene positioning constraints. (This is the default mode.)
GXSCENE_CONSTRAIN_TO_MAP Do not allow screen position beyond the borders of the currently loaded map.

Examples

Example1: Constrain the scene position to the current map.

GXSceneCreate 320, 200
GXMapLoad "./my-world.gxm"
GXSceneConstrain GXSCENE_CONSTRAIN_TO_MAP

See Also

GXSceneCreate, GXSceneDraw, GXSceneResize, GXSceneScale, GXSceneStart, GXSceneStop