You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Fix Embedded Game Size
This commit is contained in:
@@ -324,6 +324,14 @@ void WindowWrapper::set_margins_enabled(bool p_enabled) {
|
||||
}
|
||||
}
|
||||
|
||||
Size2 WindowWrapper::get_margins_size() {
|
||||
if (!margins) {
|
||||
return Size2();
|
||||
}
|
||||
|
||||
return Size2(margins->get_margin_size(SIDE_LEFT) + margins->get_margin_size(SIDE_RIGHT), margins->get_margin_size(SIDE_TOP) + margins->get_margin_size(SIDE_RIGHT));
|
||||
}
|
||||
|
||||
void WindowWrapper::grab_window_focus() {
|
||||
if (get_window_enabled() && is_visible()) {
|
||||
window->grab_focus();
|
||||
|
||||
Reference in New Issue
Block a user