SFML community forums
Bindings - other languages => DotNet => Topic started by: felipehenrique on January 24, 2011, 04:23:31 am
-
Hello
I am creating a tile-based RPG and I have a doubt about scrolling the map. If I use the default view of the window, objects as hud go to scroll along. Is there any way to use multiple views to do this?
Thanks.
-
Of course, you can use as many views as you want.
-
It's because I'ma beginner and I'm not much on the subject. It has a tutorial on the website but it just work with the view of the app: S
What I not know do is to define the content of view.
If I could give me an example code as follows:
I have two sprites I want everyone to stay in one view:
sprite1 => view1
sprite2 => view2
Thank you.
(sorry for the bad tradution. is google tradutor :P)
-
Everything is there, you just have to translate to the .Net syntax:
http://www.sfml-dev.org/tutorials/1.6/graphics-views.php
I have two sprites I want everyone to stay in one view:
sprite1 => view1
sprite2 => view2
window.SetView(view1);
window.Draw(sprite1);
window.SetView(view2);
window.Draw(sprite2);
-
There's no posible to translate this to the .Net syntax, because the RenderWindow class on the .Net bindings not have some methods, in this case for example, there's no exists a method named "SetView", so... sadly... (for now, I hope...) there are a lot of things that are not capable to do with .net version.
-
This is exactly the same API, nothing's missing. The only difference is that a lot of Get/Set functions have been turned to properties in SFML.Net. So "SetView(v)" is just "View = v".