Author: esr
Date: Tue Feb 26 16:47:36 2008
New Revision: 24082
URL: http://svn.gna.org/viewcvs/wesnoth?rev=24082&view=rev
Log:
Incorporate fade macros from WML Dialog Tools.
Modified:
trunk/data/core/macros/interface-utils.cfg
Modified: trunk/data/core/macros/interface-utils.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/macros/interface-utils.cfg?rev=24082&r1=24081&r2=24082&view=diff
==============================================================================
--- trunk/data/core/macros/interface-utils.cfg (original)
+++ trunk/data/core/macros/interface-utils.cfg Tue Feb 26 16:47:36 2008
@@ -473,3 +473,54 @@
[/sound]
{FLASH_WHITE ({ACTION_WML}) }
#enddef
+
+#The macro that all the following macros work off
+#define FADE_STEP_RGB RED GREEN BLUE DELAY
+ [colour_adjust]
+ red,green,blue={RED},{GREEN},{BLUE}
+ [/colour_adjust]
+ [delay]
+ time={DELAY}
+ [/delay]
+ [redraw][/redraw]
+#enddef
+
+#The macro that the following fade to black macros rely on
+#define FADE_STEP LIGHTNESS DELAY
+ {FADE_STEP_RGB LIGHTNESS LIGHTNESS LIGHTNESS DELAY}
+#enddef
+
+#define FADE_TO_BLACK
+ # Fades the screen to black. Use {FADE_IN} to return to normal
+ {FADE_STEP -32 5}
+ {FADE_STEP -64 5}
+ {FADE_STEP -96 5}
+ {FADE_STEP -128 5}
+ {FADE_STEP -160 5}
+ {FADE_STEP -192 5}
+ {FADE_STEP -224 5}
+#enddef
+
+#define FADE_TO_BLACK_HOLD TIME
+ # Fades the screen to black and then pauses for TIME milliseconds.
+ # Use {FADE_IN} to return to normal
+ {FADE_STEP -32 5}
+ {FADE_STEP -64 5}
+ {FADE_STEP -96 5}
+ {FADE_STEP -128 5}
+ {FADE_STEP -160 5}
+ {FADE_STEP -192 5}
+ {FADE_STEP -224 {TIME}}
+#enddef
+
+#define FADE_IN
+ # Brings the screen back from a {FADE_TO_BLACK}
+ {FADE_STEP -224 5}
+ {FADE_STEP -192 5}
+ {FADE_STEP -160 5}
+ {FADE_STEP -128 5}
+ {FADE_STEP -96 5}
+ {FADE_STEP -64 5}
+ {FADE_STEP -32 5}
+ {FADE_STEP 0 5}
+#enddef
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits