mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
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
This commit is contained in:
parent
b86c4627ab
commit
b602a3f8dc
@ -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();
|
||||
}
|
||||
|
@ -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()));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user