Skip to content

Latest commit

 

History

History
77 lines (40 loc) · 1.09 KB

group___input.md

File metadata and controls

77 lines (40 loc) · 1.09 KB
title
Input

Input

Functions

Name
std::string toString(sf::Keyboard::Key key)
sf::Keyboard::Key toKey(std::string string)

Functions Documentation

function toString

std::string toString(
    sf::Keyboard::Key key
)

Exceptions:

  • std::out_of_range if key is not a valid key

Returns the string associated with the key

The returned string is identical to the enum identifier. For example:

utils::toString(sf::Keyboard::A) == "A"

function toKey

sf::Keyboard::Key toKey(
    std::string string
)

Parameters:

  • string

Exceptions:

  • std::out_of_range if string is not a valid key

Return the key interpretation of string

The passed string must be identical to the enum identifier. For example:

utils::toKey("A") == sf::Keyboard::A

Updated on 2022-11-13 at 17:21:37 +0100