wesnoth/data/utils/interface-utils.cfg
2007-04-08 09:06:33 +00:00

228 lines
4.7 KiB
INI

# Interface shortcut macros.
# These don't depend on any other macros. Please don't change this.
# Displays a text message spoken by SPEAKER.
# Speaker can be any of: narrator, unit and second_unit
# For example, let's have the narrator, which looks like a feary
# express some feelings on the undead:
# {MESSAGE narrator "units/elves-wood/shyde.png" _ "Faery" _ "Aarr! Them be undeadies! Loooks at them.."}
#define MESSAGE SPEAKER IMAGE CAPTION TEXT
[message]
speaker={SPEAKER}
message={TEXT}
image={IMAGE}
caption={CAPTION}
[/message]
#enddef
# Scrolls the screen to the given coordinates.
# For example, lets focus on 26,35:
# {SCROLL 26 35}
# Puts a label on the map at x,y
# example:
# {SET_LABEL 4 7 _ "There be dragons here!"}
#define SET_LABEL X Y TEXT
[label]
x={X}
y={Y}
text={TEXT}
[/label]
#enddef
# Removes a label from a given tile
# Exameple, remove it from 4,7
# {REMOVE_LABEL 4 7}
#define REMOVE_LABEL X Y
[label]
x={X}
y={Y}
text=""
[/label]
#enddef
# Sets a label on tile x,y that gets reset every sideturn in case
# someone clears it.
# Example:
# {SET_LABEL_PERSISTANT 4 7 _ "There really will be dragons here!!"}
#define SET_LABEL_PERSISTANT X Y TEXT
{SET_LABEL {X} {Y} ({TEXT}) }
{ON_SIDETURN (
{SET_LABEL {X} {Y} ({TEXT}) }
)}
#enddef
# Places an image at a given tile, shrinking it to fit the tile
# For example, lets put a tent on tile 14,5
# {SET_IMAGE 14 5 "terrain/tent.png"}
#define SET_IMAGE X Y IMAGE
[item]
x,y={X},{Y}
image={IMAGE}
[/item]
#enddef
# Removes a previously set image from a tile
# Example:
# {REMOVE_IMAGE 14 5}
#define REMOVE_IMAGE X Y
[removeitem]
x,y={X},{Y}
[/removeitem]
#enddef
# Shorthand for setting both an image and a label at once.
#define SET_IMAGE_AND_LABEL X Y IMAGE TEXT
{SET_LABEL {X} {Y} ({TEXT}) }
{SET_IMAGE {X} {Y} ({IMAGE}) }
#enddef
# Shorthand for setting both a persistant label and image at once.
#define SET_IMAGE_AND_LABEL_PERSISTANT X Y IMAGE TEXT
{SET_LABEL_PERSISTANT {X} {Y} ({TEXT}) }
{SET_IMAGE {X} {Y} ({IMAGE}) }
#enddef
# Shorthand for removing both image and label at once
#define REMOVE_IMAGE_AND_LABEL X Y
{REMOVE_IMAGE {X} {Y}}
{REMOVE_LABEL {X} {Y}}
#enddef
#define SCROLL X Y
[scroll]
x={X}
y={Y}
[/scroll]
#enddef
# Visuals and sound for an earth tremor.
#define TREMOR
[sound]
name="rumble.ogg"
[/sound]
[scroll]
x=5
y=0
[/scroll]
[scroll]
x=-10
y=0
[/scroll]
[scroll]
x=5
y=5
[/scroll]
[scroll]
x=0
y=-10
[/scroll]
[scroll]
x=0
y=5
[/scroll]
#enddef
# Creates an earthquake-effect while performing ACTION
# For example we could kill all non-leader units in the earthquake:
# {EARTHQUAKE (
# [kill]
# canrecruit=0
# animate=yes
# [/kill]
# )}
#define EARTHQUAKE ACTION
[sound]
name=lightning.ogg
[/sound]
{SCROLL 2 1}
{SCROLL -1 -3}
{SCROLL -3 1}
{ACTION}
{SCROLL 1 3}
{SCROLL 1 -2}
#enddef
# adjusts the color of the screen by a tint or red, green and blue
# for example, lets make it very blueish:
# {COLOR_ADJUST 0 0 100}
#define COLOR_ADJUST RED GREEN BLUE
[colour_adjust]
red={RED}
green={GREEN}
blue={BLUE}
[/colour_adjust]
#enddef
# Flashes the screen with a given color performing ACTION
# These macros come in WHITE, RED, GREEN and BLUE and can
# easily be expanded for ORANGE, PURPLE etc.
# Example, Flash the screen to scare the player:
# {FLASH_GREEN ()}
# {FLASH_RED ()}
# {FLASH_BLUE ()}
# {FLASH_WHITE ()}
#define FLASH_WHITE ACTION
{COLOR_ADJUST 67 67 67}
{COLOR_ADJUST 100 100 100}
{ACTION}
{COLOR_ADJUST 33 33 33}
{COLOR_ADJUST 0 0 0}
#enddef
#define FLASH_RED ACTION
{COLOR_ADJUST 67 0 0}
{COLOR_ADJUST 100 0 0}
{ACTION}
{COLOR_ADJUST 33 0 0}
{COLOR_ADJUST 0 0 0}
#enddef
#define FLASH_GREEN ACTION
{COLOR_ADJUST 0 67 0}
{COLOR_ADJUST 0 100 0}
{ACTION}
{COLOR_ADJUST 0 33 0}
{COLOR_ADJUST 0 0 0}
#enddef
#define FLASH_BLUE ACTION
{COLOR_ADJUST 0 0 67}
{COLOR_ADJUST 0 0 100}
{ACTION}
{COLOR_ADJUST 0 0 33}
{COLOR_ADJUST 0 0 0}
#enddef
# Creates a flashlike-effect while performing ACTION
# For example, player 3 might disappear in the flash of a lightning:
# {THUNDER (
# [store_unit]
# [filter]
# side=3
# [/filter]
# variable=player3
# kill=yes
# [/store_unit]
# )}
#define THUNDER ACTION
[sound]
name=lightning.ogg
[/sound]
{FLASH_WHITE ({ACTION}) }
#enddef