diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-02-22 00:02:09 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-02-22 00:02:09 -0700 |
commit | 4406b2fd90a5d4656bc923bf5c751e4c5250a0d2 (patch) | |
tree | bf25813b8711fb1dd51a77104a63a9c9647a60df /src/gui/widgets/popup.h | |
parent | 7c925545419eeda0b0b26b290a9ec0412960fbd8 (diff) | |
download | mana-4406b2fd90a5d4656bc923bf5c751e4c5250a0d2.tar.gz mana-4406b2fd90a5d4656bc923bf5c751e4c5250a0d2.tar.bz2 mana-4406b2fd90a5d4656bc923bf5c751e4c5250a0d2.tar.xz mana-4406b2fd90a5d4656bc923bf5c751e4c5250a0d2.zip |
Cleanup some popup-related code and make sure BeingPopup is included
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 */ |