Class Display

A display that handles collecting events and drawing to the activity and handling window stuff Will handle the main loop and send events to where they need to be handled

class Display ;

Constructors

NameDescription
this Constructs a display given a width, height, window flags, renderer flags, a title, and a path for an image icon (or null) Disregarding width and height, constructor asks for flags first because once set, those cannot be changed

Fields

NameTypeDescription
activity ActivityThe activity that the display is displaying right now
eventHandlers EventHandler[]All event handlers of the display; define specific behaviours for events; events pass to handlers from first to last
frameSleep intHow long to wait between frames in milliseconds; will be ignored in case of VSync
isRunning boolWhether the display is running; will stop running if set to false

Properties

NameTypeDescription
framerate[set] intSets the window's framerate
framerate[get] intGets the window's framerate
frames[get] ulongGets how many frames have passed since the window started
keyboard[get] KeyboardGets the keyboard of the display
mouse[get] MouseGets the mouse of the display
renderer[get] RendererGets the contained window's renderer
window[get] WindowGets the window of the display

Methods

NameDescription
run Actually runs the display and handles event collection and framerate and most other things