zxt:extension:0000a51e:0007
This is an old revision of the document!
Table of Contents
0000a51e:0007 - Viewport control [DRAFT]
Flags
Flag | Set? (MUST/MAY/…) | Description |
---|---|---|
parsing_must | MUST NOT | |
reading_must | MUST NOT | |
writing_must | MUST NOT | |
playing_should | MAY | |
playing_must | SHOULD NOT | Please don't make games which depend on this. |
editing_should | MUST NOT | … What about syntax highlighting? |
Field data
None. (TODO: The extension probably needs to store the current viewport location for savefiles.)
Description
This extension provides OOP commands for controlling the active viewport:
#VIEWPORT [LOCK|UNLOCK]
- Locks or unlocks the viewport. By default, the viewport is unlocked - this means that movement of the player stat will return focus back to the player. (Whether this also includes failed movement attempts is undefined.) Locking the viewport means that player movement will not return focus back to the player.#VIEWPORT FOCUS PLAYER
- Returns viewport camera focus to the player. Importantly, this also unlocks the viewport.#VIEWPORT FOCUS [target]
- Centers the viewport camera on the provided target (SELF
, or a target name).#VIEWPORT MOVE [direction]
- Moves the viewport camera by the specified direction, relative to the center of the viewport, rounded down.
Implementations
TBD
zxt/extension/0000a51e/0007.1653833433.txt.gz · Last modified: 2022/05/29 14:10 by asie