From 756a399909a913364de00742afce6b91441646b9 Mon Sep 17 00:00:00 2001 From: Vittorio Romeo Date: Thu, 9 Dec 2021 00:48:24 +0000 Subject: [PATCH] Remove deprecated 'Keyboard::Key' enumerators and adjust usages --- examples/island/Island.cpp | 10 +++++----- include/SFML/Window/Keyboard.hpp | 10 +--------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/examples/island/Island.cpp b/examples/island/Island.cpp index ab70f621..f79bafe3 100644 --- a/examples/island/Island.cpp +++ b/examples/island/Island.cpp @@ -189,11 +189,11 @@ int main() { switch (event.key.code) { - case sf::Keyboard::Return: generateTerrain(terrainStagingBuffer.data()); break; - case sf::Keyboard::Down: currentSetting = (currentSetting + 1) % settingCount; break; - case sf::Keyboard::Up: currentSetting = (currentSetting + settingCount - 1) % settingCount; break; - case sf::Keyboard::Left: *(settings[currentSetting].value) -= 0.1f; break; - case sf::Keyboard::Right: *(settings[currentSetting].value) += 0.1f; break; + case sf::Keyboard::Enter: generateTerrain(terrainStagingBuffer.data()); break; + case sf::Keyboard::Down: currentSetting = (currentSetting + 1) % settingCount; break; + case sf::Keyboard::Up: currentSetting = (currentSetting + settingCount - 1) % settingCount; break; + case sf::Keyboard::Left: *(settings[currentSetting].value) -= 0.1f; break; + case sf::Keyboard::Right: *(settings[currentSetting].value) += 0.1f; break; default: break; } } diff --git a/include/SFML/Window/Keyboard.hpp b/include/SFML/Window/Keyboard.hpp index 2fb320e3..41b6b587 100644 --- a/include/SFML/Window/Keyboard.hpp +++ b/include/SFML/Window/Keyboard.hpp @@ -150,15 +150,7 @@ public: F15, //!< The F15 key Pause, //!< The Pause key - KeyCount, //!< Keep last -- the total number of keyboard keys - - // Deprecated values: - - Dash = Hyphen, //!< \deprecated Use Hyphen instead - BackSpace = Backspace, //!< \deprecated Use Backspace instead - BackSlash = Backslash, //!< \deprecated Use Backslash instead - SemiColon = Semicolon, //!< \deprecated Use Semicolon instead - Return = Enter //!< \deprecated Use Enter instead + KeyCount //!< Keep last -- the total number of keyboard keys }; ////////////////////////////////////////////////////////////