Added Window::SetTitle to CSFML and SFML.Net

This commit is contained in:
Laurent Gomila 2011-04-10 09:48:33 +02:00
parent b8ddbb6dcc
commit 4892866905
12 changed files with 64 additions and 0 deletions

View File

@ -183,6 +183,15 @@ CSFML_API void sfRenderWindow_SetPosition(sfRenderWindow* renderWindow, int left
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_SetSize(sfRenderWindow* renderWindow, unsigned int width, unsigned int height);
////////////////////////////////////////////////////////////
/// Change the title of a window
///
/// \param renderWindow : Renderwindow object
/// \param title : New title
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_SetTitle(sfRenderWindow* renderWindow, const char* title);
////////////////////////////////////////////////////////////
/// Show or hide a window
///

View File

@ -208,6 +208,15 @@ CSFML_API void sfWindow_SetPosition(sfWindow* window, int left, int top);
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_SetSize(sfWindow* window, unsigned int width, unsigned int height);
////////////////////////////////////////////////////////////
/// Change the title of a window
///
/// \param window : Window object
/// \param title : New title
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_SetTitle(sfWindow* window, const char* title);
////////////////////////////////////////////////////////////
/// Show or hide a window
///

View File

@ -247,6 +247,15 @@ void sfRenderWindow_SetSize(sfRenderWindow* renderWindow, unsigned int width, un
}
////////////////////////////////////////////////////////////
/// Change the title of a window
////////////////////////////////////////////////////////////
void sfRenderWindow_SetTitle(sfRenderWindow* renderWindow, const char* title)
{
CSFML_CALL(renderWindow, SetTitle(title))
}
////////////////////////////////////////////////////////////
/// Show or hide a window
////////////////////////////////////////////////////////////

View File

@ -239,6 +239,15 @@ void sfWindow_SetSize(sfWindow* window, unsigned int width, unsigned int height)
}
////////////////////////////////////////////////////////////
/// Change the title of a window
////////////////////////////////////////////////////////////
void sfWindow_SetTitle(sfWindow* window, const char* title)
{
CSFML_CALL(window, SetTitle(title))
}
////////////////////////////////////////////////////////////
/// Show or hide a window
////////////////////////////////////////////////////////////

View File

@ -205,6 +205,17 @@ namespace SFML
sfRenderWindow_SetSize(This, width, height);
}
////////////////////////////////////////////////////////////
/// <summary>
/// Change the title of the window
/// </summary>
/// <param name="title">New title</param>
////////////////////////////////////////////////////////////
public override void SetTitle(string title)
{
sfRenderWindow_SetTitle(This, title);
}
////////////////////////////////////////////////////////////
/// <summary>
/// Show or hide the window
@ -569,6 +580,9 @@ namespace SFML
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_SetSize(IntPtr This, uint Width, uint Height);
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_SetTitle(IntPtr This, string title);
[DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_Show(IntPtr This, bool Show);

View File

@ -240,6 +240,17 @@ namespace SFML
sfWindow_SetSize(This, width, height);
}
////////////////////////////////////////////////////////////
/// <summary>
/// Change the title of the window
/// </summary>
/// <param name="title">New title</param>
////////////////////////////////////////////////////////////
public virtual void SetTitle(string title)
{
sfWindow_SetTitle(This, title);
}
////////////////////////////////////////////////////////////
/// <summary>
/// Show or hide the window
@ -632,6 +643,9 @@ namespace SFML
[DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfWindow_SetSize(IntPtr This, uint Width, uint Height);
[DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfWindow_SetTitle(IntPtr This, string title);
[DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfWindow_Show(IntPtr This, bool Show);