Difference between revisions of "Stage"

From GiderosMobile
m
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
<!-- GIDEROSOBJ:Stage -->
 
<!-- GIDEROSOBJ:Stage -->
'''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]]<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/>
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Inherits from:''' [[Sprite]]<br/>
 
'''Inherits from:''' [[Sprite]]<br/>
Line 10: Line 10:
 
=== Example ===
 
=== Example ===
 
'''We won't see the pixel until we add it to ''stage'''''
 
'''We won't see the pixel until we add it to ''stage'''''
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
local pixel = Pixel.new(0xff00ff, 1, 64, 64)
 
local pixel = Pixel.new(0xff00ff, 1, 64, 64)
 
pixel:setPosition(16, 16)
 
pixel:setPosition(16, 16)
 
stage:addChild(pixel)
 
stage:addChild(pixel)
</source>
+
</syntaxhighlight>
  
 
{|-
 
{|-
Line 20: Line 20:
 
=== Methods ===
 
=== Methods ===
 
[[Stage:setClearColorBuffer]] ''enables/disables draw call for background color''<br/><!--GIDEROSMTD:Stage:setClearColorBuffer(boolean) enables/disables draw call for background color-->
 
[[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;"|

Latest revision as of 00:10, 5 September 2025

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.pngPlatform linux.png
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