mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Add support for set/get window opacity
This commit is contained in:
parent
7822544701
commit
d450ce8636
@ -1156,7 +1156,7 @@ namespace MiniEngine
|
||||
_wnd.reset();
|
||||
}
|
||||
|
||||
SDL_Window* Window::_get()
|
||||
SDL_Window* Window::_get() const
|
||||
{
|
||||
return _wnd.get();
|
||||
}
|
||||
@ -1254,6 +1254,18 @@ namespace MiniEngine
|
||||
return (SDL_GetWindowGrab(_get())==SDL_TRUE)?true:false;
|
||||
}
|
||||
|
||||
int Window::setOpacity(float opacity)
|
||||
{
|
||||
return SDL_SetWindowOpacity(_get(),opacity);
|
||||
}
|
||||
|
||||
float Window::getOpacity() const
|
||||
{
|
||||
float op=-1;
|
||||
SDL_GetWindowOpacity(_get(),&op);
|
||||
return op;
|
||||
}
|
||||
|
||||
void Window::setResizable(bool resizable)
|
||||
{
|
||||
//SDL_SetWindowResizable(_get(), resizable?SDL_TRUE:SDL_FALSE);
|
||||
|
@ -328,6 +328,9 @@ namespace MiniEngine
|
||||
void setGrab(bool);
|
||||
bool getGrab();
|
||||
|
||||
int setOpacity(float opacity);
|
||||
float getOpacity() const;
|
||||
|
||||
void setResizable(bool resizable);
|
||||
|
||||
/// Use UTF8 in Title and Message please.
|
||||
@ -365,7 +368,7 @@ namespace MiniEngine
|
||||
std::shared_ptr<SDL_Window> _wnd;
|
||||
void _set(SDL_Window*);
|
||||
void _clear();
|
||||
SDL_Window* _get();
|
||||
SDL_Window* _get() const;
|
||||
|
||||
Renderer winrnd;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user