Difference between revisions of "Screen:getState"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2017.8<br/> === Description === Return the state of the screen. The returned number is the or-sum of the following possible values:...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2017.8<br/>
 
'''Available since:''' Gideros 2017.8<br/>
 +
'''Class:''' [[Screen]]<br/>
 +
 
=== Description ===
 
=== Description ===
Return the state of the screen. The returned number is the or-sum of the following possible values:
+
Returns the state of the screen.
  * Screen.STATE_MINIMIZED: Screen/Window is minimized.
+
<syntaxhighlight lang="lua">
  * Screen.STATE_MAXIMIZED: Screen/Window is maximized.
+
(number) = Screen:getState()
  * Screen.STATE_FULLSCREEN: Screen/Window is fullscreen.
+
</syntaxhighlight>
  * Screen.STATE_ACTIVE: Screen/Window is active/focused.
+
 
  * Screen.STATE_HIDDEN: Screen/Window is not displayed.
+
The returned number is the sum of the following possible values:
  * Screen.STATE_CLOSED: Screen/Window is closed.
+
* Screen.STATE_NORMAL '''0''': Screen/Window is normal
<source lang="lua">
+
* Screen.STATE_MINIMIZED '''1''': Screen/Window is minimized
(number), = Screen:getState()
+
* Screen.STATE_MAXIMIZED '''2''': Screen/Window is maximized
</source>
+
* Screen.STATE_FULLSCREEN '''4''': Screen/Window is fullscreen
'''Returns''' (number) The Screen's state<br/>
+
* Screen.STATE_ACTIVE '''8''': Screen/Window is active/focused
 +
* Screen.STATE_HIDDEN '''16''': Screen/Window is not displayed
 +
* Screen.STATE_CLOSED '''32''': Screen/Window is closed
 +
 
 +
=== Return values ===
 +
'''Returns''' (number) the sum of the screen states<br/>
 +
 
 +
{{Screen}}

Latest revision as of 15:32, 13 July 2023

Available since: Gideros 2017.8
Class: Screen

Description

Returns the state of the screen.

(number) = Screen:getState()

The returned number is the sum of the following possible values:

  • Screen.STATE_NORMAL 0: Screen/Window is normal
  • Screen.STATE_MINIMIZED 1: Screen/Window is minimized
  • Screen.STATE_MAXIMIZED 2: Screen/Window is maximized
  • Screen.STATE_FULLSCREEN 4: Screen/Window is fullscreen
  • Screen.STATE_ACTIVE 8: Screen/Window is active/focused
  • Screen.STATE_HIDDEN 16: Screen/Window is not displayed
  • Screen.STATE_CLOSED 32: Screen/Window is closed

Return values

Returns (number) the sum of the screen states