<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.splashdamage.com/index.php?action=history&amp;feed=atom&amp;title=GUIs%3A_Timelines</id>
	<title>GUIs: Timelines - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.splashdamage.com/index.php?action=history&amp;feed=atom&amp;title=GUIs%3A_Timelines"/>
	<link rel="alternate" type="text/html" href="https://wiki.splashdamage.com/index.php?title=GUIs:_Timelines&amp;action=history"/>
	<updated>2026-04-08T03:40:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.splashdamage.com/index.php?title=GUIs:_Timelines&amp;diff=1489&amp;oldid=prev</id>
		<title>192.168.0.142 at 10:34, 16 October 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.splashdamage.com/index.php?title=GUIs:_Timelines&amp;diff=1489&amp;oldid=prev"/>
		<updated>2007-10-16T10:34:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;== Overview ==&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Just as in Doom 3 timelines can be used to trigger events regularly or at specific times. They can be stopped, started and reset to specific times. There may also be defined multiple timelines for the same window or GUI and they can be given names for referencing.&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{main|GUIs: Timelines}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They are often used to update a window (for example a list) at regular intervals, or call a set of color/window movement transitions for more complex animations.&lt;br /&gt;
&lt;br /&gt;
A timeline may be added to a window by specifying a timeline block:&lt;br /&gt;
 timeline [optional name] {&lt;br /&gt;
 	// Properties may be defined for use in a timeline&lt;br /&gt;
 	properties {&lt;br /&gt;
 		[properties]&lt;br /&gt;
 	}&lt;br /&gt;
 	// One onTime block for every time we want to handle something&lt;br /&gt;
 	// at a specific time.&lt;br /&gt;
 	onTime [time after start] {&lt;br /&gt;
 		[do stuff]&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
If a name is not given the timeline is given the name ''default''.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
A timeline may have its own properties block. Two properties are always defined for a block:&lt;br /&gt;
* float ''active'' - True if the timeline is currently active. Can be set to false in the properties to have the timeline start deactivated.&lt;br /&gt;
* string ''name'' -Read only property, &amp;quot;default&amp;quot; if no name is specified for the timeline.&lt;br /&gt;
&lt;br /&gt;
Properties may be accessed with&lt;br /&gt;
 timeline.[timeline name].[property name]&lt;br /&gt;
&lt;br /&gt;
The timeline may be started/stopped from any event like this:&lt;br /&gt;
 timeline.default.active = false; // stops the timeline&lt;br /&gt;
&lt;br /&gt;
It's useful to sometimes reset the timeline to a specific time, often because it's supposed to be looping:&lt;br /&gt;
 timeline.default.resetTime( [time to reset to] );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the foreColor will transition between two values over the course of a second, flashes the &amp;quot;Deploy MCP&amp;quot; text when you are at the goal:&lt;br /&gt;
 windowDef mcpDeployLabel {&lt;br /&gt;
 	properties { ... }&lt;br /&gt;
 	events { ... }&lt;br /&gt;
 	// Define a timeline for the window.&lt;br /&gt;
 	timeline /* [optional timeline name] */ {&lt;br /&gt;
 		// optionally set up a properties block for the timeline&lt;br /&gt;
 		properties { ... }&lt;br /&gt;
 		// When the timeline is started, start changing the color&lt;br /&gt;
 		ontime 0 {&lt;br /&gt;
 			// Transition the foreColor (the text color in this example)&lt;br /&gt;
 			foreColor = transition( &amp;quot;1, 1, 1, 1&amp;quot;, &amp;quot;0.9,0.8,0.7,0.8&amp;quot;, 500 );&lt;br /&gt;
 		}&lt;br /&gt;
 		// After 500 milliseconds change the color back to the original value&lt;br /&gt;
 		ontime 500 {&lt;br /&gt;
 			// Transition the foreColor back to the original (the text color in this example)&lt;br /&gt;
 			foreColor = transition( &amp;quot;0.9,0.8,0.7,0.8&amp;quot;, &amp;quot;1, 1, 1, 1&amp;quot;, 500 );&lt;br /&gt;
 		}&lt;br /&gt;
 		// After a second the color is back to where it was a second ago.&lt;br /&gt;
 		// Set the time back to 0.&lt;br /&gt;
 		ontime 1000 {&lt;br /&gt;
 			// the name of the timeline is in this case default,&lt;br /&gt;
 			// but would be the name of the timeline if it had one.&lt;br /&gt;
 			timeline.default.resetTime( 0 );&lt;br /&gt;
 		}&lt;br /&gt;
 	}		&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:GUIs]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>192.168.0.142</name></author>
		
	</entry>
</feed>