From b602a3f8dca5620d2eed8c485dc036863ba07b8a Mon Sep 17 00:00:00 2001 From: laurentgom Date: Sat, 13 Jun 2009 22:16:08 +0000 Subject: [PATCH] Fixed minor issue in Qt and wxWidgets samples. git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1139 4e206d99-4929-0410-ac5d-dfc041789085 --- samples/qt/Main.cpp | 5 ++--- samples/wxwidgets/Main.cpp | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/samples/qt/Main.cpp b/samples/qt/Main.cpp index 50b0c83b0..6bb9fa0d4 100644 --- a/samples/qt/Main.cpp +++ b/samples/qt/Main.cpp @@ -54,8 +54,7 @@ private : // Stick the sprite to the mouse cursor if (Event.Type == sf::Event::MouseMoved) { - mySprite.SetX(Event.MouseMove.X); - mySprite.SetY(Event.MouseMove.Y); + mySprite.SetPosition(ConvertCoords(Event.MouseMove.X, Event.MouseMove.Y)); } } @@ -102,6 +101,6 @@ int main(int argc, char **argv) // Create a SFML view inside the main frame MyCanvas* SFMLView = new MyCanvas(MainFrame, QPoint(20, 60), QSize(360, 320)); SFMLView->show(); - + return App.exec(); } diff --git a/samples/wxwidgets/Main.cpp b/samples/wxwidgets/Main.cpp index 46b3aa1ed..ee883209a 100644 --- a/samples/wxwidgets/Main.cpp +++ b/samples/wxwidgets/Main.cpp @@ -55,8 +55,7 @@ private : void OnMouseMove(wxMouseEvent& Event) { // Make the sprite follow the mouse cursor - mySprite.SetX(Event.GetX()); - mySprite.SetY(Event.GetY()); + mySprite.SetPosition(ConvertCoords(Event.GetX(), Event.GetY())); } ////////////////////////////////////////////////////////////