SFML community forums
Bindings - other languages => DotNet => Topic started by: SymegPL on January 27, 2013, 06:10:17 pm
-
Hello! Sorry for my bad english.
I have problem with View class. When i apply new position, rotation etc. to view it works, but nothing changes on screen. It was only change when i use SetView method.
Exapmle:
window
.GetView().Move(new Vector2f
(5,
5));//nothing changes on the screenwindow
.SetView(window
.GetView().Move(new Vector2f
(5,
5)));//only now view was applied to the screen
It is bug or not?
Thanks for replies.
Utermiko
-
Yes, you need to call SetView to change the view. The fact that you can modify GetView() directly is just a limitation of the C# language (there's no const type).
-
But classes are passed by reference, not value.
@EDIT I saw on the source. GetView always create new "View" object.
Thank you.