Difference between revisions of "ShaderContrast (CMS)"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "<div class="toccolours mw-collapsible mw-collapsed tbl-ds"> <span class="bold">Function History</span> <div class="mw-collapsible-content"> <div class="alt-bg">Available since...")
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
+
{| class="ts" style="width:100%"
<span class="bold">Function History</span>
+
|-
<div class="mw-collapsible-content">
+
! style="text-align:left" | Name !! style="text-align:left" | Type
<div class="alt-bg">Available since v4.0</div>
+
|-
</div></div>
+
| shaderContrast(value, delay) || Execution
 +
|}
  
  
Allows the user to adjust the screen contrast over a specified amount of time. ''The [[Shader_(CMS)|shader toolkit]] is needed for this function to work''.
+
Allows the user to adjust the screen contrast over a specified amount of time. ''The [[Shader_(CMS)|shader toolkit]] is required for this function to work''.
 
 
 
 
Syntax:
 
<syntaxhighlight>
 
shaderContrast(contrast, delay)
 
</syntaxhighlight>
 
  
  
Example 1: adjust screen contrast value
+
== Examples ==
 +
=== Enable ===
 +
Adjust screen contrast value
 
<syntaxhighlight>
 
<syntaxhighlight>
 
shaderContrast(1.1, 3000) -- adjust screen contrast over 3000 milliseconds
 
shaderContrast(1.1, 3000) -- adjust screen contrast over 3000 milliseconds
 
shaderContrast(1.1, 0) -- adjust screen contrast instantly
 
shaderContrast(1.1, 0) -- adjust screen contrast instantly
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
=== Disable ===
 
+
Restore default screen contrast value
Example 2: restore default screen contrast value
 
 
<syntaxhighlight>
 
<syntaxhighlight>
 
shaderContrast(1, 3000) -- restore screen contrast over 3000 milliseconds
 
shaderContrast(1, 3000) -- restore screen contrast over 3000 milliseconds
Line 29: Line 25:
  
  
 +
== Syntax Breakdown ==
 +
{| class="ts" style="width:100%"
 +
|-
 +
! style="text-align:left" | Name !! style="text-align:left" | Type !! style="text-align:left;width:80%" | Description
 +
|-
 +
| value || float (decimal) || Define the contrast value; number between 0 & 2 (''1 = default'').
 +
|-
 +
| delay || integer (number) || The amount of time to adjust the screen contrast value over; in milliseconds (ms).
 +
|}
  
<span class="bold underline">Arguments</span>
 
  
'''contrast''': float (number) <br/>
+
== Resources ==
Define the contrast value; number between 0 & 2 (''1 = default'')
+
{| class="ts"
 
+
|-
'''delay''': integer (number)<br/>
+
! style="text-align:left" | Name !! style="text-align:left" | Description
The amount of time to adjust the screen contrast value over in milliseconds (ms)
 
 
 
 
 
 
 
<span class="bold underline">Flags</span>
 
 
 
none
 
 
 
 
 
 
 
<span class="bold underline">Return</span>
 
 
 
none
 
 
 
 
 
 
 
{| class="tbl-ds"
 
 
|-
 
|-
|<span class="bold">Relevant Pages</span>: to add...
+
| [[media:shaderContrast.zip|shaderContrast.zip]] || A working .ved file, complete with resources. Check out the readme.txt file for instructions.
|}
+
|}{{toc}}

Latest revision as of 22:31, 7 November 2014

Name Type
shaderContrast(value, delay) Execution


Allows the user to adjust the screen contrast over a specified amount of time. The shader toolkit is required for this function to work.


Examples

Enable

Adjust screen contrast value

shaderContrast(1.1, 3000) -- adjust screen contrast over 3000 milliseconds
shaderContrast(1.1, 0) -- adjust screen contrast instantly

Disable

Restore default screen contrast value

shaderContrast(1, 3000) -- restore screen contrast over 3000 milliseconds
shaderContrast(1, 0) -- restore screen contrast value back to default instantly


Syntax Breakdown

Name Type Description
value float (decimal) Define the contrast value; number between 0 & 2 (1 = default).
delay integer (number) The amount of time to adjust the screen contrast value over; in milliseconds (ms).


Resources

Name Description
shaderContrast.zip A working .ved file, complete with resources. Check out the readme.txt file for instructions.