summaryrefslogtreecommitdiff
path: root/src/gui/widgets/popup.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-01 15:47:15 -0700
committerJared Adams <jaxad0127@gmail.com>2010-03-01 17:26:24 -0700
commit67e678094b9fddd21fb3c690130e772937ab2746 (patch)
tree75b2ee140dcdc1e5be24f47f38ec724a47df7103 /src/gui/widgets/popup.cpp
parent3acb148b6d5fe3b342e4397e2c7de020de6005ff (diff)
downloadmana-67e678094b9fddd21fb3c690130e772937ab2746.tar.gz
mana-67e678094b9fddd21fb3c690130e772937ab2746.tar.bz2
mana-67e678094b9fddd21fb3c690130e772937ab2746.tar.xz
mana-67e678094b9fddd21fb3c690130e772937ab2746.zip
Merge WindowContainer into Viewport and remove extra members
Reviewed-by: Chuck Miller
Diffstat (limited to 'src/gui/widgets/popup.cpp')
-rw-r--r--src/gui/widgets/popup.cpp23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 970b21ec..1bfd7fd2 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -29,8 +29,6 @@
#include "gui/skin.h"
#include "gui/viewport.h"
-#include "gui/widgets/windowcontainer.h"
-
#include "resources/image.h"
#include <guichan/exception.hpp>
@@ -45,16 +43,16 @@ Popup::Popup(const std::string &name, const std::string &skin):
{
logger->log("Popup::Popup(\"%s\")", name.c_str());
- if (!windowContainer)
- throw GCN_EXCEPTION("Popup::Popup(): no windowContainer set");
+ if (!viewport)
+ throw GCN_EXCEPTION("Popup::Popup(): no viewport set");
setPadding(3);
// Loads the skin
mSkin = SkinLoader::instance()->load(skin, mDefaultSkinPath);
- // Add this window to the window container
- windowContainer->add(this);
+ // Add this window to the viewport
+ viewport->add(this);
// Popups are invisible by default
setVisible(false);
@@ -69,11 +67,6 @@ Popup::~Popup()
mSkin->instances--;
}
-void Popup::setWindowContainer(WindowContainer *wc)
-{
- windowContainer = wc;
-}
-
void Popup::loadPopupConfiguration()
{
if (mPopupName.empty())
@@ -168,7 +161,7 @@ void Popup::setMaxHeight(int height)
void Popup::scheduleDelete()
{
- windowContainer->scheduleDelete(this);
+ viewport->scheduleDelete(this);
}
void Popup::position(int x, int y)
@@ -187,9 +180,3 @@ void Popup::position(int x, int y)
setVisible(true);
requestMoveToTop();
}
-
-void Popup::mouseMoved(gcn::MouseEvent &event)
-{
- if (viewport)
- viewport->hideBeingPopup();
-}