Difference between revisions of "Global Command: setWindowBrightness"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 1: | Line 1: | ||
− | + | Set the global brightness (gamma) of the window. A value of 0 is completely dark, 100 is normal brightness. | |
− | |||
− | |||
− | |||
− | |||
+ | {| class="ts" | ||
+ | |- | ||
+ | | style="width:15%" | Related functions | ||
+ | | [[Global Command: getWindowBrightness|getWindowBrightness]] | ||
+ | |} | ||
− | |||
− | + | == Syntax == | |
− | Syntax | + | <syntaxhighlight lang="lua"> |
− | <syntaxhighlight> | ||
setWindowBrightness(brightness) | setWindowBrightness(brightness) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | == Parameters == | |
− | + | {| class="ts" | |
− | + | |- | |
− | + | ! 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. | ||
+ | |} | ||
− | |||
− | |||
− | |||
− | + | == Examples == | |
− | + | '''Example 1:''' Set the window gamma/brightness to 80%. | |
− | + | <syntaxhighlight lang="lua"> | |
− | + | setWindowBrightness(80) | |
− | + | </syntaxhighlight> | |
− | < | + | {{toc}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 22:48, 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)