mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
Add love.window.getSafeArea (resolves issue #1437). Returns a rectangle (x, y, w, h) inside the window which is known to be unobstructed by a system title bar, the iPhone X notch, etc. Useful for making sure UI elements can be seen by the user.
Currently it only has a proper implementation on iOS and will return the window's full size otherwise.
This commit is contained in:
@@ -66,6 +66,8 @@ public:
|
||||
void setPosition(int x, int y, int displayindex) override;
|
||||
void getPosition(int &x, int &y, int &displayindex) override;
|
||||
|
||||
Rect getSafeArea() const override;
|
||||
|
||||
bool isOpen() const override;
|
||||
|
||||
void setWindowTitle(const std::string &title) override;
|
||||
|
||||
Reference in New Issue
Block a user