1
0
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:
Hilderin
2025-01-20 18:33:12 -05:00
parent 1b7b009674
commit ae0b7ff42d
11 changed files with 343 additions and 151 deletions

View File

@@ -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();