Difference between revisions of "Application:setOrientation"

From GiderosMobile
m (→‎Description: fixed some html tags)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
<languages />
 
<languages />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''<translate>Available since</translate>:''' Gideros 2011.6
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/>
+
<br/>
 +
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]
 +
<br/>
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
<translate><br />
+
<translate>
Sets the orientation of the application. Accepted values are:<br />
+
Sets the orientation of the application. Accepted values are:
<br />
+
* Application.PORTRAIT
&lt;ul&gt;<br />
+
* Application.PORTRAIT_UPSIDE_DOWN
&lt;li&gt;Application.PORTRAIT = &quot;portrait&quot;&lt;/li&gt;<br />
+
* Application.LANDSCAPE_LEFT
&lt;li&gt;Application.PORTRAIT_UPSIDE_DOWN = &quot;portraitUpsideDown&quot;&lt;/li&gt;<br />
+
* Application.LANDSCAPE_RIGHT
&lt;li&gt;Application.LANDSCAPE_LEFT = &quot;landscapeLeft&quot;&lt;/li&gt;<br />
+
</translate>
&lt;li&gt;Application.LANDSCAPE_RIGHT = &quot;landscapeRight&quot;&lt;/li&gt;<br />
+
<br/>
&lt;/ul&gt;<br />
 
<br /></translate>
 
 
<source lang="lua">
 
<source lang="lua">
Application:setOrientation(orientation)
+
application:setOrientation(orientation)
 
</source>
 
</source>
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
'''orientation''': (string) <translate></translate> <br/>
+
'''orientation''': (string) <translate></translate>
 +
<br/>
 
=== <translate>Examples</translate> ===
 
=== <translate>Examples</translate> ===
'''Example'''<br/>
+
<source lang="lua">
<source lang="lua">application:setOrientation(Application.PORTRAIT)            -- the buttons are on the bottom
+
application:setOrientation(Application.PORTRAIT)            -- the buttons are on the bottom
 
application:setOrientation(Application.PORTRAIT_UPSIDE_DOWN) -- the buttons are at the top
 
application:setOrientation(Application.PORTRAIT_UPSIDE_DOWN) -- the buttons are at the top
 
application:setOrientation(Application.LANDSCAPE_LEFT)      -- the buttons are on the right side
 
application:setOrientation(Application.LANDSCAPE_LEFT)      -- the buttons are on the right side
application:setOrientation(Application.LANDSCAPE_RIGHT)      -- the buttons are on the left side</source>
+
application:setOrientation(Application.LANDSCAPE_RIGHT)      -- the buttons are on the left side
 +
</source>
 +
<br/>
 +
<br/>

Revision as of 01:23, 13 June 2019


Available since: Gideros 2011.6
Class: Application

Description

Sets the orientation of the application. Accepted values are:

  • Application.PORTRAIT
  • Application.PORTRAIT_UPSIDE_DOWN
  • Application.LANDSCAPE_LEFT
  • Application.LANDSCAPE_RIGHT


application:setOrientation(orientation)

Parameters

orientation: (string)

Examples

application:setOrientation(Application.PORTRAIT)             -- the buttons are on the bottom
application:setOrientation(Application.PORTRAIT_UPSIDE_DOWN) -- the buttons are at the top
application:setOrientation(Application.LANDSCAPE_LEFT)       -- the buttons are on the right side
application:setOrientation(Application.LANDSCAPE_RIGHT)      -- the buttons are on the left side