1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Make buttons that trigger popups have the same scale

This commit is contained in:
Michael Alexsander Silva Dias
2019-04-22 22:28:38 -03:00
parent f5cc29f9f3
commit b8e09f98c4
8 changed files with 30 additions and 24 deletions

View File

@@ -56,6 +56,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
if (b->is_pressed() && b->get_button_index() == BUTTON_RIGHT && context_menu_enabled) {
menu->set_position(get_global_transform().xform(get_local_mouse_position()));
menu->set_size(Vector2(1, 1));
menu->set_scale(get_global_transform().get_scale());
menu->popup();
grab_focus();
return;