Stage: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
<languages />
<!-- GIDEROSOBJ:Stage -->
<!-- GIDEROSOBJ:Stage -->
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/>
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]][[File:Platform linux.png]]<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
'''Inherits from:''' [[Sprite]]<br/>
=== <translate>Description</translate> ===
 
<translate><br />
=== Description ===
<br />
The '''Stage''' class represents the top of the scene tree hierarchy. The instance of '''Stage''' is not created directly (there is no ''Stage.new'' function) but there is already a global variable '''''stage'''''.
The [[Special:MyLanguage/Stage|Stage]] class represents the top of the scene tree hierarchy. The instances of [[Special:MyLanguage/Stage|Stage]] is not created directly (there is not any ''Stage.new'' function) but<br />
 
there is already a global variable ''stage''.<br />
=== Example ===
<br /></translate>
'''We won't see the pixel until we add it to ''stage'''''
<syntaxhighlight lang="lua">
local pixel = Pixel.new(0xff00ff, 1, 64, 64)
pixel:setPosition(16, 16)
stage:addChild(pixel)
</syntaxhighlight>
 
{|-
{|-
| style="width: 50%; vertical-align:top;"|
| style="width: 50%; vertical-align:top;"|
=== <translate>Methods</translate> ===
=== Methods ===
[[Special:MyLanguage/Stage:setClearColorBuffer|Stage:setClearColorBuffer]] ''<translate>Enable/disable draw call for background color</translate>''<br/><!-- GIDEROSMTD:Stage:setClearColorBuffer -->
[[Stage:setClearColorBuffer]] ''enables/disables draw call for background color''<br/><!--GIDEROSMTD:Stage:setClearColorBuffer(boolean) enables/disables draw call for background color-->
[[Stage:validateLayout]] ''forces immediate layout computations''<br/><!--GIDEROSMTD:Stage:validateLayout() forces immediate layout computations-->
 
| style="width: 50%; vertical-align:top;"|
| style="width: 50%; vertical-align:top;"|
=== <translate>Events</translate> ===
=== Events ===
=== <translate>Constants</translate> ===
=== Constants ===
|}
|}
{{GIDEROS IMPORTANT LINKS}}

Latest revision as of 22:10, 4 September 2025

Supported platforms:
Available since: Gideros 2011.6
Inherits from: Sprite

Description

The Stage class represents the top of the scene tree hierarchy. The instance of Stage is not created directly (there is no Stage.new function) but there is already a global variable stage.

Example

We won't see the pixel until we add it to stage

local pixel = Pixel.new(0xff00ff, 1, 64, 64)
pixel:setPosition(16, 16)
stage:addChild(pixel)

Methods

Stage:setClearColorBuffer enables/disables draw call for background color
Stage:validateLayout forces immediate layout computations

Events

Constants