Screen: Difference between revisions
From GiderosMobile
No edit summary |
m Text replacement - "</source>" to "</syntaxhighlight>" |
||
| (One intermediate revision by the same user not shown) | |||
| Line 9: | Line 9: | ||
=== Example === | === Example === | ||
< | <syntaxhighlight lang="lua"> | ||
local s = Sprite.new() | local s = Sprite.new() | ||
local img = Bitmap.new(Texture.new("gfx/ui/rpgpp_lt_models_vgood.png")) | local img = Bitmap.new(Texture.new("gfx/ui/rpgpp_lt_models_vgood.png")) | ||
| Line 20: | Line 20: | ||
ss:setState(Screen.STATE_NORMAL | Screen.STATE_ACTIVE) | ss:setState(Screen.STATE_NORMAL | Screen.STATE_ACTIVE) | ||
ss:setContent(s) | ss:setContent(s) | ||
</ | </syntaxhighlight> | ||
{|- | {|- | ||
Latest revision as of 13:32, 13 July 2023
Supported platforms: ![]()
![]()
![]()
![]()
![]()
![]()
![]()
Available since: Gideros 2017.8
Inherits from: Object
Description
The Screen class allows to access secondary displays or windows.
Example
local s = Sprite.new()
local img = Bitmap.new(Texture.new("gfx/ui/rpgpp_lt_models_vgood.png"))
s:addChild(img)
local ss = Screen.new(0)
ss:setPosition(128, 128)
ss:setSize(256, 256)
ss:setTitle("my screen")
ss:setState(Screen.STATE_NORMAL | Screen.STATE_ACTIVE)
ss:setContent(s)
MethodsScreen.new opens a new screen |
EventsConstants |