- DESCRIPTION
- A Screen is a View that fills (or overlays) the entire display.
- Typically you'll create a single Screen subclass as a deferred singleton and reference it from your application's init() method, at which point it will automatically have its update() method called 60 times a second and its draw() method called up to 60 times a second (see the example program generated when you build a new project).
- Because a Screen is also a GenericImage, you can set its angle, position, handle, and scale as desired (good for earthquake effects). For iPhone and Android you can also call orient_right, orient_up, etc. to set these properties appropriately.
- A screen receives mouse, keyboard, and acceleration events (when possible) through the methods on(MouseEvent), on(KeyEvent), and on(AccelerationEvent). Input state may also be accessed through the Input singleton with the exception of mouse_position:Vector2, which must be a Screen property because its position depends on the current screen angle, etc.
- PROPERTIES
- size : Vector2
- The nominal size of the given image, in pixels. Change 'size' if you want the image's standard size to be a given number of pixels or change 'scale' if you want the image to be proportionally larger or smaller.
- scale : Vector2
- The size multiplier for rendering, (1.0,1.0) by default. Setting "scale = Vector2(2.0,0.5)" would cause the image to render at twice the width and half the height. Change 'size' instead if you want to achieve particular pixel dimensions.
- handle : Vector2
- Specifies the drawing and rotation origin of this image. This can be set to a pixel value relative to the upper-left of the image (0,0) or a Handle category such as "Handle.center" or "Handle.bottom_center". The handle is the top-left corner (0,0) by default.
- color : Color
- The multiplier for each pixel in this image as it's drawn. The default color of Color(255,255,255,255) ensures that the image will appear "normal". A color of Color(255,255,0) would not draw any of the blue channel, making a grey-scale image appear to be tinted yellow. A color of Color(255,255,255,128) would draw the image halfway transparent.
- render_flags : Render
- blend : Blend
- Blending mode. See class BlendManager for more examples.
- angle : Radians
- The angle property variable. This may be set to a new Radians or Degrees value.
- hflip : Logical
- Specifies that an image should be flipped horizontally when drawn. This mirroring is applied before the image is rotated and does not affect the spatial positioning.
- vflip : Logical
- Specifies that an image should be flipped vertically when drawn. This mirroring is applied before the image is rotated and does not affect the spatial positioning.
- alpha : Int32
- Internal use. Prevents 'alpha' from being declared again by mistake and being intercepted by access methods.
- parent : Panel
- The parent Panel of this component.
- position : Vector2
- The position this component is drawn at.
- screen_to_view : Transform
- Internal use - used to transform raw mouse positions into screen coordinates.
- active : Logical
- When "true" this component receives messages (including calls to update() and draw()) normally.
- components : Component[]
- A list of child components contained in this Panel.
- input_listeners : InputListener[]
- List of key listeners receiving events from this dispatcher.
- mouse_position : Vector2
- The current mouse position relative to this view.
- METHODS
- init_object()
- init()
- orient_up().Screen
- Sets the screen transformation so that the top of the screen is at the top of your display at its standard orientation.
- orient_down().Screen
- Sets the screen transformation so that the top of the screen is at the bottom of your display at its standard orientation.
- orient_right().Screen
- Sets the screen transformation so that the top of the screen is at the right side of your display at its standard orientation.
- orient_left().Screen
- Sets the screen transformation so that the top of the screen is at the left side of your display at its standard orientation.
- push_transform()
- pop_transform()
- hash_code().Int32
- create_duplicate().Object
- to_String().String
- op==(Object other).Logical {multimethod}
- op<>(Object other).Logical {multimethod}
- type_name().String : native
- runtime_type().RuntimeType : native
- runtime_properties().RuntimeProperties
- runtime_methods().RuntimeMethods
- handle(Vector2 new_handle)
- handle(Handle h)
- angle(Radians new_angle)
- angle(Degrees deg)
- scale(Vector2 new_scale)
- scale(Real64 uniform_scale)
- point_filter(Logical setting)
- point_filter().Logical
- fixed_color(Logical setting)
- fixed_color().Logical
- texture_wrap(Logical setting)
- texture_wrap().Logical
- alpha().Int32
- alpha(Int32 new_alpha)
- bounding_box().Box
- bounding_circle().Circle
- draw(Real64 x,Real64 y)
- clear([Color c])
- release()
- on(KeyEvent event)
- on(MouseEvent event)
- on(JoystickEvent event)
- on(AccelerationEvent event)
- on(SystemEvent event)
- listen_to(DispatcherType dispatcher)
- stop_listening_to(DispatcherType dispatcher)
- init(Panel init:parent)
- draw(Vector2 init:position)
- draw()
- update()
- fill(Color c)
- bring_to_front()
- draw-inner()
- dispatch(KeyEvent event)
- dispatch(MouseEvent event)
- dispatch(JoystickEvent event)
- dispatch(AccelerationEvent event)
- dispatch(SystemEvent event)
- input_listeners().InputListener[]
- input_listeners(InputListener[] input_listeners.1232)
- active_input_listeners().InputListener[]
- active_input_listeners(InputListener[] active_input_listeners.1233)
|