Skip to content

Commit

Permalink
Mouse button XButton1 was renamed to Extra1 in SFML 3
Browse files Browse the repository at this point in the history
  • Loading branch information
texus committed Dec 17, 2023
1 parent b89892c commit a3d49fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/BackendEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,11 @@ TEST_CASE("[Backend events]")
REQUIRE(eventTGUI.mouseButton.button == tgui::Event::MouseButton::Middle);

// Only left, middle and right mouse buttons are handled
#if SFML_VERSION_MAJOR >= 3
eventSFML.mouseButton.button = sf::Mouse::Button::Extra1;
#else
eventSFML.mouseButton.button = sf::Mouse::Button::XButton1;
#endif
REQUIRE(!backendGuiSFML->convertEvent(eventSFML, eventTGUI));
}

Expand Down Expand Up @@ -368,7 +372,11 @@ TEST_CASE("[Backend events]")
REQUIRE(eventTGUI.mouseButton.button == tgui::Event::MouseButton::Middle);

// Only left, middle and right mouse buttons are handled
#if SFML_VERSION_MAJOR >= 3
eventSFML.mouseButton.button = sf::Mouse::Button::Extra1;
#else
eventSFML.mouseButton.button = sf::Mouse::Button::XButton1;
#endif
REQUIRE(!backendGuiSFML->convertEvent(eventSFML, eventTGUI));
}

Expand Down

0 comments on commit a3d49fe

Please sign in to comment.