mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 13:36:12 +01:00
Merge pull request #120 from crumblingstatue/master
Add setVirtualKeyboardVisible
This commit is contained in:
commit
b5facb85d1
2 files changed
+19
No files matched your search
@@ -154,5 +154,18 @@ typedef enum
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
CSFML_WINDOW_API sfBool sfKeyboard_isKeyPressed(sfKeyCode key);
|
CSFML_WINDOW_API sfBool sfKeyboard_isKeyPressed(sfKeyCode key);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
/// \brief Show or hide the virtual keyboard.
|
||||||
|
///
|
||||||
|
/// Warning: the virtual keyboard is not supported on all systems.
|
||||||
|
/// It will typically be implemented on mobile OSes (Android, iOS)
|
||||||
|
/// but not on desktop OSes (Windows, Linux, ...).
|
||||||
|
///
|
||||||
|
/// If the virtual keyboard is not available, this function does nothing.
|
||||||
|
///
|
||||||
|
/// \param visible True to show, false to hide
|
||||||
|
///
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
CSFML_WINDOW_API void sfKeyboard_setVirtualKeyboardVisible(sfBool visible);
|
||||||
|
|
||||||
#endif // SFML_KEYBOARD_H
|
#endif // SFML_KEYBOARD_H
|
||||||
@@ -35,3 +35,9 @@ sfBool sfKeyboard_isKeyPressed(sfKeyCode key)
|
|||||||
{
|
{
|
||||||
return sf::Keyboard::isKeyPressed(static_cast<sf::Keyboard::Key>(key));
|
return sf::Keyboard::isKeyPressed(static_cast<sf::Keyboard::Key>(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
void sfKeyboard_setVirtualKeyboardVisible(sfBool visible)
|
||||||
|
{
|
||||||
|
sf::Keyboard::setVirtualKeyboardVisible(visible == sfTrue);
|
||||||
|
}
|
||||||
Reference in new issue
Block a user