raylib_impl 0.1.0
Vendor raylib 5.5 : IGraphic2Module / IGraphic3Module / IAudioModule
Loading...
Searching...
No Matches
RayKeyboard Class Reference

raylib keyboard, read straight off the native state queries. More...

#include <RayKeyboard.hpp>

Inheritance diagram for RayKeyboard:
Collaboration diagram for RayKeyboard:

Public Member Functions

 RayKeyboard ()=default
 
 ~RayKeyboard () override=default
 
std::vector< Keys > whichKeyDown () const override
 
bool isKeyPressed (Keys key) const override
 
bool isKeyDown (Keys key) const override
 
bool isKeyReleased (Keys key) const override
 
bool isKeyUp (Keys key) const override
 

Detailed Description

raylib keyboard, read straight off the native state queries.

IsKeyPressed() compares currentKeyState and previousKeyState, two array lookups : nothing is consumed, so any number of readers get the same answer anywhere in the frame. raylib swaps the two arrays inside EndDrawing(), which is why the frame boundary is endDraw().

This is the behaviour the contract asks for, and the one the other vendors are aligned on.

Constructor & Destructor Documentation

◆ RayKeyboard()

RayKeyboard::RayKeyboard ( )
default

◆ ~RayKeyboard()

RayKeyboard::~RayKeyboard ( )
overridedefault

Member Function Documentation

◆ isKeyDown()

bool RayKeyboard::isKeyDown ( Keys  key) const
inlineoverride

◆ isKeyPressed()

bool RayKeyboard::isKeyPressed ( Keys  key) const
inlineoverride

◆ isKeyReleased()

bool RayKeyboard::isKeyReleased ( Keys  key) const
inlineoverride

◆ isKeyUp()

bool RayKeyboard::isKeyUp ( Keys  key) const
inlineoverride

◆ whichKeyDown()

std::vector< Keys > RayKeyboard::whichKeyDown ( ) const
inlineoverride

The documentation for this class was generated from the following file: