Difference between revisions of "Stage"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(15 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Supported platforms:''' android | + | <!-- 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/> | ||
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
+ | '''Inherits from:''' [[Sprite]]<br/> | ||
+ | |||
=== Description === | === 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'''''. | |
− | + | ||
− | The | + | === Example === |
− | there is already a global variable | + | '''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;"| | ||
=== Methods === | === Methods === | ||
− | [[ | + | [[Stage:setClearColorBuffer]] ''enables/disables draw call for background color''<br/><!--GIDEROSMTD:Stage:setClearColorBuffer(boolean) enables/disables draw call for background color--> |
+ | |||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== Events === | === Events === | ||
=== Constants === | === Constants === | ||
|} | |} | ||
+ | |||
+ | {{GIDEROS IMPORTANT LINKS}} |
Latest revision as of 14:33, 13 July 2023
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)
MethodsStage:setClearColorBuffer enables/disables draw call for background color |
EventsConstants |