Skip to content

Commit

Permalink
sf::Keyboard::Key is now a scoped enum in SFML 3
Browse files Browse the repository at this point in the history
  • Loading branch information
texus committed Dec 22, 2023
1 parent 59bc2ae commit da50167
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Backend/Window/SFML/BackendSFML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ namespace tgui
switch (modifierKey)
{
case Event::KeyModifier::System:
return sf::Keyboard::isKeyPressed(sf::Keyboard::LSystem) || sf::Keyboard::isKeyPressed(sf::Keyboard::RSystem);
return sf::Keyboard::isKeyPressed(sf::Keyboard::Key::LSystem) || sf::Keyboard::isKeyPressed(sf::Keyboard::Key::RSystem);
case Event::KeyModifier::Control:
return sf::Keyboard::isKeyPressed(sf::Keyboard::LControl) || sf::Keyboard::isKeyPressed(sf::Keyboard::RControl);
return sf::Keyboard::isKeyPressed(sf::Keyboard::Key::LControl) || sf::Keyboard::isKeyPressed(sf::Keyboard::Key::RControl);
case Event::KeyModifier::Shift:
return sf::Keyboard::isKeyPressed(sf::Keyboard::LShift) || sf::Keyboard::isKeyPressed(sf::Keyboard::RShift);
return sf::Keyboard::isKeyPressed(sf::Keyboard::Key::LShift) || sf::Keyboard::isKeyPressed(sf::Keyboard::Key::RShift);
case Event::KeyModifier::Alt:
return sf::Keyboard::isKeyPressed(sf::Keyboard::LAlt) || sf::Keyboard::isKeyPressed(sf::Keyboard::RAlt);
return sf::Keyboard::isKeyPressed(sf::Keyboard::Key::LAlt) || sf::Keyboard::isKeyPressed(sf::Keyboard::Key::RAlt);
}

TGUI_ASSERT(false, "BackendSFML::isKeyboardModifierPressed called with an invalid value");
Expand Down

0 comments on commit da50167

Please sign in to comment.