Difference between revisions of "Global Command: getWindowBrightness"
From The Official Visionaire Studio: Adventure Game Engine Wiki
m |
|||
Line 1: | Line 1: | ||
− | + | Returns the 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: setWindowBrightness|setWindowBrightness]] | ||
+ | |} | ||
− | |||
− | + | == Syntax == | |
− | Syntax | + | <syntaxhighlight lang="lua"> |
− | <syntaxhighlight> | ||
getWindowBrightness() | getWindowBrightness() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | == Parameters == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
none | none | ||
− | + | == Return values == | |
− | + | {| class="ts" | |
+ | |- | ||
+ | ! style="width:15%" | Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | integer | ||
+ | | The current gamma/brightness value. | ||
+ | |} | ||
− | + | == Examples == | |
− | |||
− | |||
− | + | '''Example 1:''' Do something, if the brightness value is less than 50%. | |
− | + | <syntaxhighlight lang ="lua"> | |
− | + | if getWindowBrightness() < 50 then | |
− | + | -- do something | |
− | + | end | |
− | + | </syntaxhighlight> | |
+ | {{toc}} |
Revision as of 22:41, 15 May 2023
Returns the brightness (gamma) of the window. A value of 0 is completely dark, 100 is normal brightness.
Related functions | setWindowBrightness |
Syntax
getWindowBrightness()
Parameters
none
Return values
Type | Description |
---|---|
integer | The current gamma/brightness value. |
Examples
Example 1: Do something, if the brightness value is less than 50%.
if getWindowBrightness() < 50 then
-- do something
end