class

RenderLoop::Window(Key, MouseButton)

Inherits Reference / Object

Produces an abstraction around a window object so you can use any window context you want. The generics Key and MouseButton are enums that define the available values. TODO: maybe pass in the cursor as a generic as well so we we can reduce boilerplate.

Instance methods

cursor_position
Source
cursor_position=(position : RenderLoop::Position)
Source
cursor_visible=(visible : Bool)

abstract def cursor_visible? : Bool

Source
destroy
Source
key_pressed?(k : Key) : Bool
Source
keys
Source
mouse_button_pressed?(b : MouseButton) : Bool
Source
mouse_buttons
Source
render

This gives the window an opportunity to paint to the screen

Source
should_close?
Source
size
Source
startup
Source