-
Notifications
You must be signed in to change notification settings - Fork 3
GXBackgroundAdd
boxgaming edited this page Sep 28, 2021
·
3 revisions
GXBackgroundAdd imageFilename$, mode&
Adds a new background image to the current scene. Multiple background images may be added to the scene. Background images are displayed in layers based on the order they are added. One of the following modes must be specified:
| Mode | Description |
|---|---|
| GXBG_STRETCH | Stretch the background image to the size of the scene. |
| GXBG_SCROLL | Fit the height of the background image to the size of the screen. Scroll the horizontal position relative to the position on the map. |
| GXBG_WRAP | Continuously wrap the background as the scene is moved horizontally. |
Example1: Add a background to the scene. The image of the mountain will appear fixed in the background. The trees will move slowly relative to the map position.
GXSceneCreate 320, 200
GXBackgroundAdd "mountain.png", GXBG_STRETCH
GXBackgroundAdd "trees.png", GXBG_SCROLL© 2022 boxgaming