Difference between revisions of "Screen"
From GiderosMobile
(removed language stuff...) |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
=== Description === | === Description === | ||
The '''Screen''' class allows to access secondary displays or windows. | The '''Screen''' class allows to access secondary displays or windows. | ||
+ | |||
+ | === Example === | ||
+ | <syntaxhighlight lang="lua"> | ||
+ | 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) | ||
+ | </syntaxhighlight> | ||
{|- | {|- | ||
Line 22: | Line 36: | ||
[[Screen:setSize]] ''sets the screen size (when possible)''<br/><!-- GIDEROSMTD:Screen:setSize(w,h) sets the screen size (when possible)--> | [[Screen:setSize]] ''sets the screen size (when possible)''<br/><!-- GIDEROSMTD:Screen:setSize(w,h) sets the screen size (when possible)--> | ||
[[Screen:setState]] ''sets the screen state (when possible)''<br/><!-- GIDEROSMTD:Screen:setState(state) sets the screen state (when possible)--> | [[Screen:setState]] ''sets the screen state (when possible)''<br/><!-- GIDEROSMTD:Screen:setState(state) sets the screen state (when possible)--> | ||
+ | [[Screen:setTitle]] ''sets the screen title''<br/><!-- GIDEROSMTD:Screen:setTitle(title) sets the screen title--> | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| |
Latest revision as of 14: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 |