mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
Added Window::SetModal (issue #84)
This commit is contained in:
parent
6556d7a2ee
commit
b1f4de7446
@ -265,6 +265,14 @@ Window& Window::SetResizable(bool resizable) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
Window& Window::SetModal(Window& parent) {
|
||||
if (SDL_SetWindowModalFor(window_, parent.window_) != 0) {
|
||||
throw SDL2pp::Exception("SDL_SetWindowModalFor");
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Window::Borders Window::GetBordersSize() const {
|
||||
int top = 0, left = 0, bottom = 0, right = 0;
|
||||
|
||||
|
@ -578,6 +578,20 @@ public:
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
Window& SetResizable(bool resizable = true);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Sets the modal to the parent window
|
||||
///
|
||||
/// \param[in] parent The window that should be the parent
|
||||
///
|
||||
/// \returns Reference to self
|
||||
///
|
||||
/// \throws SDL2pp::Exception
|
||||
///
|
||||
/// \see https://wiki.libsdl.org/SDL_SetWindowModalFor
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
Window &SetModal(Window& parent);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Read only data structure to represent the size borders of a window
|
||||
|
Loading…
x
Reference in New Issue
Block a user