Difference between revisions of "Global Command: setWindowBrightness"

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...")
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
+
Set the global brightness (gamma) of the window. A value of 0 is completely dark, 100 is normal brightness.
<span class="bold">Function History</span>
 
<div class="mw-collapsible-content">
 
<div class="alt-bg">Available since v3.8</div>
 
</div></div>
 
  
 +
{| class="ts"
 +
|-
 +
| style="width:15%" | Related functions
 +
| [[Global Command: getWindowBrightness|getWindowBrightness]]
 +
|}
  
Set the integer value of global window brightness. (min = 0, max = 100)
 
  
 
+
== Syntax ==
Syntax:
+
<syntaxhighlight lang="lua">
<syntaxhighlight>
+
setWindowBrightness(brightness)
setWindowBrightness(i)
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
  
Example:
+
== Parameters ==
<syntaxhighlight>
+
{| class="ts"
setWindowBrightness(80) -- set new brightness value to 80%
+
|-
</syntaxhighlight>
+
! style="width:15%" | Parameter
 +
! style="width:15%" | Type
 +
! Description
 +
|-
 +
| brightness
 +
| integer
 +
| The gamma/brightness value in the range of 0 (completely dark) to 100 (normal brightness).
 +
|}
  
  
 +
== Return values ==
 +
{| class="ts"
 +
|-
 +
! style="width:15%" | Type
 +
! Description
 +
|-
 +
| boolean
 +
| False if that feature is not supported, true otherwise.
 +
|}
  
<span class="bold underline">Arguments</span><br/>
 
'''i''': integer<br/>
 
The integer value of global window brightness. (min = 0, max = 100)
 
  
 
+
== Examples ==
<span class="bold underline">Flags</span><br/>
+
'''Example 1:''' Set the window gamma/brightness to 80%.
none
+
<syntaxhighlight lang="lua">
 
+
setWindowBrightness(80)
 
+
</syntaxhighlight>
<span class="bold underline">Return</span><br/>
+
{{toc}}
none
 
 
 
 
 
 
 
{| class="tbl-ds"
 
|-
 
|<span class="bold">Relevant Pages</span>: [[GetWindowBrightness_(CMS)|getWindowBrightness]]
 
|}
 

Latest revision as of 22:49, 15 May 2023

Set the global brightness (gamma) of the window. A value of 0 is completely dark, 100 is normal brightness.

Related functions getWindowBrightness


Syntax

setWindowBrightness(brightness)


Parameters

Parameter Type Description
brightness integer The gamma/brightness value in the range of 0 (completely dark) to 100 (normal brightness).


Return values

Type Description
boolean False if that feature is not supported, true otherwise.


Examples

Example 1: Set the window gamma/brightness to 80%.

setWindowBrightness(80)