[ view source ]
class Screen
package ceramic
extends Entity
implements Observable
Available on all targets
Events
observedDirty(instance:Screen, fromSerializedField:Bool):Void
Event when any observable value as changed on this instance.
Variables
observedDirty:Bool = false
read onlydensity:Float = 1.0
Screen density computed from app's logical width/height settings and native width/height.
read onlywidth:Float = 0
Logical width used in app to position elements. Updated when the screen is resized.
read onlyheight:Float = 0
Logical height used in app to position elements. Updated when the screen is resized.
read onlyactualWidth:Float = 0
The actual width available on screen, including offsets, in the same unit as width
.
Updated when the screen is resized.
read onlyactualHeight:Float = 0
The actual height available on screen, including offsets, in the same unit as width
.
Updated when the screen is resized.
read onlypointerX:Float = 0
Pointer x coordinate, computed from mouse and touch events. When using multiple touch inputs at the same time, x will be the mean value of all touches x value. Use this as a convenience when you don't want to deal with multiple positions.
read onlypointerY:Float = 0
Pointer y coordinate, computed from mouse and touch events. When using multiple touch inputs at the same time, y will be the mean value of all touches y value. Use this as a convenience when you don't want to deal with multiple positions.
texturesDensity:Float = 1.0
Ideal textures density, computed from settings targetDensity and current screen state.
read onlyisPointerDown:Bool
Whether the screen is between a pointer down
and an pointer up
event or not.
Methods
inlinemouseAllowed(owner:Entity):Bool
Return true
if mouse events are currently allowed for the given owner.
This is only useful on very specific cases.