diff --git a/bindings/dotnet/src/Graphics/RenderImage.cs b/bindings/dotnet/src/Graphics/RenderImage.cs
index 6dac3f4a..d53c87db 100644
--- a/bindings/dotnet/src/Graphics/RenderImage.cs
+++ b/bindings/dotnet/src/Graphics/RenderImage.cs
@@ -43,7 +43,6 @@ namespace SFML
{
myDefaultView = new View(sfRenderImage_GetDefaultView(This));
myImage = new Image(sfRenderImage_GetImage(This));
- myCurrentView = myDefaultView;
GC.SuppressFinalize(myDefaultView);
GC.SuppressFinalize(myImage);
}
@@ -93,13 +92,24 @@ namespace SFML
////////////////////////////////////////////////////////////
///
- /// Current view active in the render image
+ /// Return the current active view
///
+ /// The current view
////////////////////////////////////////////////////////////
- public View CurrentView
+ public View GetView()
{
- get {return myCurrentView;}
- set {myCurrentView = value; sfRenderImage_SetView(This, value.This);}
+ return new View(sfRenderImage_GetView(This));
+ }
+
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Change the current active view
+ ///
+ /// New view
+ ////////////////////////////////////////////////////////////
+ public void SetView(View view)
+ {
+ sfRenderImage_SetView(This, view.This);
}
////////////////////////////////////////////////////////////
@@ -126,7 +136,7 @@ namespace SFML
////////////////////////////////////////////////////////////
public Vector2 ConvertCoords(uint x, uint y)
{
- return ConvertCoords(x, y, CurrentView);
+ return ConvertCoords(x, y, GetView());
}
////////////////////////////////////////////////////////////
@@ -255,7 +265,7 @@ namespace SFML
" Height(" + Height + ")" +
" Image(" + Image + ")" +
" DefaultView(" + DefaultView + ")" +
- " CurrentView(" + CurrentView + ")";
+ " View(" + GetView() + ")";
}
////////////////////////////////////////////////////////////
@@ -281,7 +291,6 @@ namespace SFML
Context.Global.SetActive(false);
}
- private View myCurrentView = null;
private View myDefaultView = null;
private Image myImage = null;
diff --git a/bindings/dotnet/src/Graphics/RenderTarget.cs b/bindings/dotnet/src/Graphics/RenderTarget.cs
index bcbfa489..0961e4cc 100644
--- a/bindings/dotnet/src/Graphics/RenderTarget.cs
+++ b/bindings/dotnet/src/Graphics/RenderTarget.cs
@@ -37,10 +37,19 @@ namespace SFML
////////////////////////////////////////////////////////////
///
- /// Current view active in the window
+ /// Return the current active view
///
+ /// The current view
////////////////////////////////////////////////////////////
- View CurrentView {get;}
+ View GetView();
+
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Change the current active view
+ ///
+ /// New view
+ ////////////////////////////////////////////////////////////
+ void SetView(View view);
////////////////////////////////////////////////////////////
///
diff --git a/bindings/dotnet/src/Graphics/RenderWindow.cs b/bindings/dotnet/src/Graphics/RenderWindow.cs
index 7251c685..114d7897 100644
--- a/bindings/dotnet/src/Graphics/RenderWindow.cs
+++ b/bindings/dotnet/src/Graphics/RenderWindow.cs
@@ -316,13 +316,24 @@ namespace SFML
////////////////////////////////////////////////////////////
///
- /// Current view active in the window
+ /// Return the current active view
///
+ /// The current view
////////////////////////////////////////////////////////////
- public View CurrentView
+ public View GetView()
{
- get {return myCurrentView;}
- set {myCurrentView = value; sfRenderWindow_SetView(This, value.This);}
+ return new View(sfRenderWindow_GetView(This));
+ }
+
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Change the current active view
+ ///
+ /// New view
+ ////////////////////////////////////////////////////////////
+ public void SetView(View view)
+ {
+ sfRenderWindow_SetView(This, view.This);
}
////////////////////////////////////////////////////////////
@@ -349,7 +360,7 @@ namespace SFML
////////////////////////////////////////////////////////////
public Vector2 ConvertCoords(uint x, uint y)
{
- return ConvertCoords(x, y, CurrentView);
+ return ConvertCoords(x, y, GetView());
}
////////////////////////////////////////////////////////////
@@ -448,7 +459,7 @@ namespace SFML
" Height(" + Height + ")" +
" Settings(" + Settings + ")" +
" DefaultView(" + DefaultView + ")" +
- " CurrentView(" + CurrentView + ")";
+ " View(" + GetView() + ")";
}
////////////////////////////////////////////////////////////
@@ -498,11 +509,9 @@ namespace SFML
{
myInput = new Input(sfRenderWindow_GetInput(This));
myDefaultView = new View(sfRenderWindow_GetDefaultView(This));
- myCurrentView = myDefaultView;
GC.SuppressFinalize(myDefaultView);
}
- private View myCurrentView = null;
private View myDefaultView = null;
#region Imports