User Tools

Site Tools


4rpl:commands:createthemeoverlay

Index

:!: Available in version 1.3 and later.

CreateThemeOverlay

CreateThemeOverlay(<-overlayNumber <-textureWidth <-textureHeight <-initColor)

Description

Creates an overlay texture for the specified overlay (0 or 1) with a textureWidth and textureHeight. The texture will be filled with initColor. If an overlay texture already exists, that texture will be disposed and replaced by the newly created texture. Note that is API does essentially the same thing as loading a texture using the theme editor in the game. If you have a map and have manually loaded a texture into an overlay slot, you don't need to call CreateThemeOverlay.

Additional Note: Overlay textures are saved with the map. Don't make a texture bigger than necessary to accomplish your visual goals. The max size is 2048×2048, but such a texture could add megabytes to the map save file size.

See SetThemeOverlayPixels for a larger example of theme overlay use.

Examples

CreateThemeOverlay(0 128 128 v4 (0.5 0 0 1))

Index

4rpl/commands/createthemeoverlay.txt · Last modified: 2021/03/22 18:45 by Karsten75