mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Add Grab setter and getter to class Window
Grab: When input is grabbed the mouse is confined to the window. If the caller enables a grab while another window is currently grabbed, the other window loses its grab in favor of the caller's window.
This commit is contained in:
parent
9090acdc0f
commit
9786aea48a
|
@ -829,6 +829,16 @@ namespace MiniEngine
|
||||||
return std::string(SDL_GetWindowTitle(_get()));
|
return std::string(SDL_GetWindowTitle(_get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::setGrab(bool isGrab)
|
||||||
|
{
|
||||||
|
SDL_SetWindowGrab(_get(),isGrab?SDL_TRUE:SDL_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Window::getGrab()
|
||||||
|
{
|
||||||
|
return (SDL_GetWindowGrab(_get())==SDL_TRUE)?true:false;
|
||||||
|
}
|
||||||
|
|
||||||
void Window::setResizable(bool resizable)
|
void Window::setResizable(bool resizable)
|
||||||
{
|
{
|
||||||
//SDL_SetWindowResizable(_get(), resizable?SDL_TRUE:SDL_FALSE);
|
//SDL_SetWindowResizable(_get(), resizable?SDL_TRUE:SDL_FALSE);
|
||||||
|
|
|
@ -268,6 +268,9 @@ namespace MiniEngine
|
||||||
void setTitle(std::string Title);
|
void setTitle(std::string Title);
|
||||||
std::string getTitle();
|
std::string getTitle();
|
||||||
|
|
||||||
|
void setGrab(bool);
|
||||||
|
bool getGrab();
|
||||||
|
|
||||||
void setResizable(bool resizable);
|
void setResizable(bool resizable);
|
||||||
|
|
||||||
/// Use UTF8 in Title and Message please.
|
/// Use UTF8 in Title and Message please.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user