abstract class RenderLoop::Window(Key, MouseButton)
- RenderLoop::Window(Key, MouseButton)
- Reference
- Object
Overview
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.
Defined in:
render_loop/window.crInstance Method Summary
- #cursor_position : RenderLoop::Position
- #cursor_position=(position : RenderLoop::Position)
-
#cursor_visible=(visible : Bool)
abstract def cursor_visible? : Bool
- #destroy
- #key_pressed?(k : Key) : Bool
- #keys : Array(Key)
- #mouse_button_pressed?(b : MouseButton) : Bool
- #mouse_buttons : Array(MouseButton)
-
#render
This gives the window an opportunity to paint to the screen
- #should_close? : Bool
- #size(s : RenderLoop::Size)
- #size : RenderLoop::Size
- #startup