mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #112604 from bruvzg/pop_center_rec
Update rect after `_pre_popup` in `popup_centered_*`.
This commit is contained in:
commit
5afc01c46d
10 changed files with 60 additions and 18 deletions
|
|
@ -259,6 +259,7 @@ private:
|
|||
static int root_layout_direction;
|
||||
|
||||
protected:
|
||||
virtual void _popup_base(const Rect2i &p_screen_rect = Rect2i());
|
||||
virtual void _pre_popup() {} // Called after "about_to_popup", but before window is shown.
|
||||
virtual Rect2i _popup_adjust_rect() const { return Rect2i(); }
|
||||
virtual void _post_popup() {}
|
||||
|
|
@ -407,7 +408,7 @@ public:
|
|||
Window *get_non_popup_window() const;
|
||||
Viewport *get_parent_viewport() const;
|
||||
|
||||
virtual void popup(const Rect2i &p_screen_rect = Rect2i());
|
||||
void popup(const Rect2i &p_screen_rect = Rect2i());
|
||||
void popup_on_parent(const Rect2i &p_parent_rect);
|
||||
void popup_centered(const Size2i &p_minsize = Size2i());
|
||||
void popup_centered_ratio(float p_ratio = 0.8);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue