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...") |
m (EK moved page SetWindowBrightness (CMS) to Global Command: setWindowBrightness) |
||
(2 intermediate revisions by 2 users not shown) | |||
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( | ||
</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}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
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)