diff options
Diffstat (limited to 'src/gui/widgets/popup.h')
-rw-r--r-- | src/gui/widgets/popup.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h index a77ec2c8..449c2f7b 100644 --- a/src/gui/widgets/popup.h +++ b/src/gui/widgets/popup.h @@ -152,6 +152,14 @@ class Popup : public Container virtual gcn::Rectangle getChildrenArea(); + /** + * Sets the location to display the popup. Tries to horizontally center + * the popup and provide a vertical buffer between the given point and + * the popup. Prevents the popup from extending off-screen, if + * possible. + */ + void position(int x, int y); + private: std::string mPopupName; /**< Name of the popup */ std::string mDefaultSkinPath; /**< Default skin path for this popup */ |