Use Rect2's get_end().
This commit is contained in:
parent
c1e6c2c49a
commit
c63d51408f
4 changed files with 7 additions and 7 deletions
|
|
@ -176,7 +176,7 @@ void EditorPropertyArray::_change_type(Object *p_button, int p_index) {
|
|||
changing_type_index = p_index;
|
||||
Rect2 rect = button->get_screen_rect();
|
||||
change_type->set_as_minsize();
|
||||
change_type->set_position(rect.position + rect.size - Vector2(change_type->get_contents_minimum_size().x, 0));
|
||||
change_type->set_position(rect.get_end() - Vector2(change_type->get_contents_minimum_size().x, 0));
|
||||
change_type->popup();
|
||||
}
|
||||
|
||||
|
|
@ -726,7 +726,7 @@ void EditorPropertyDictionary::_change_type(Object *p_button, int p_index) {
|
|||
|
||||
Rect2 rect = button->get_screen_rect();
|
||||
change_type->set_as_minsize();
|
||||
change_type->set_position(rect.position + rect.size - Vector2(change_type->get_contents_minimum_size().x, 0));
|
||||
change_type->set_position(rect.get_end() - Vector2(change_type->get_contents_minimum_size().x, 0));
|
||||
change_type->popup();
|
||||
changing_type_index = p_index;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue