class RenderLoop::Input(Key, MouseButton)
- RenderLoop::Input(Key, MouseButton)
- Reference
- Object
Overview
Provides a helpful wrapper over window input.
Defined in:
render_loop/input.crConstructors
Instance Method Summary
- 
        #get_center : RenderLoop::Position
        
          Returns the center of the window 
- 
        #get_key(key_code : Key) : Bool
        
          Checks if the key is currently down 
- 
        #get_key_pressed(key_code : Key) : Bool
        
          Checks if the key was pressed in this frame 
- 
        #get_key_released(key_code : Key) : Bool
        
          Checks if the key was released in this frame 
- 
        #get_keys : Array(Key)
        
          Returns an array of keys that are currently pressed 
- 
        #get_mouse(mouse_button : MouseButton) : Bool
        
          Check if the mouse button is currently down 
- 
        #get_mouse_position : RenderLoop::Position
        
          Returns the position of the mouse 
- 
        #get_mouse_pressed(mouse_button : MouseButton) : Bool
        
          Checks if the mouse button was pressed in this frame 
- 
        #get_mouse_released(mouse_button : MouseButton) : Bool
        
          Checks if the mouse button was released in this frame 
- 
        #set_cursor(enabled : Bool)
        
          Controls the cursor visibility within the window 
- 
        #set_mouse_position(position : RenderLoop::Position)
        
          Sets the mouse position within the window 
- 
        #tick
        
          Processes the window input during each update tick 
- 
        #window_size : NamedTuple(height: Int32, width: Int32)
        
          Returns the size of the window 
Constructor Detail
Instance Method Detail
        
        def get_mouse_pressed(mouse_button : MouseButton) : Bool
        #
      
      
        Checks if the mouse button was pressed in this frame
        
        def get_mouse_released(mouse_button : MouseButton) : Bool
        #
      
      
        Checks if the mouse button was released in this frame