summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-15 23:23:12 -0700
committerIra Rice <irarice@gmail.com>2009-01-15 23:23:12 -0700
commit29a65dd896255e6e173201dcc0d50bfc273afb61 (patch)
treeff86af90bf6fa447964ba6bf008f1d3efbaa1035 /src
parentecc18d3a2ed44d4b4e6ccfe879771686b2616bb4 (diff)
downloadmana-29a65dd896255e6e173201dcc0d50bfc273afb61.tar.gz
mana-29a65dd896255e6e173201dcc0d50bfc273afb61.tar.bz2
mana-29a65dd896255e6e173201dcc0d50bfc273afb61.tar.xz
mana-29a65dd896255e6e173201dcc0d50bfc273afb61.zip
Fixed Item Popup window transparency (double setting of the skin)
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/inventorywindow.cpp2
-rw-r--r--src/gui/itemcontainer.cpp2
-rw-r--r--src/gui/itemcontainer.h4
-rw-r--r--src/gui/itempopup.cpp4
-rw-r--r--src/gui/window.cpp9
5 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 8c5edec4..4f7c4ae7 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -44,7 +44,7 @@
InventoryWindow::InventoryWindow():
Window(_("Inventory"))
{
- setWindowName("Inventory");
+ setWindowName(_("Inventory"));
setResizable(true);
setCloseButton(true);
setMinWidth(240);
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 2cc0bef3..7d9b3f70 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -255,7 +255,7 @@ void ItemContainer::mouseMoved(gcn::MouseEvent &event)
getParent()->getParent()->getY());
mItemPopup->setItem(item->getInfo());
-
+ mItemPopup->setOpaque(false);
mItemPopup->setVisible(true);
}
else
diff --git a/src/gui/itemcontainer.h b/src/gui/itemcontainer.h
index 7f0e5386..223a3677 100644
--- a/src/gui/itemcontainer.h
+++ b/src/gui/itemcontainer.h
@@ -108,8 +108,6 @@ class ItemContainer : public gcn::Widget,
mListeners.remove(listener);
}
- ItemPopup *mItemPopup;
-
private:
void mouseExited(gcn::MouseEvent &event);
void mouseMoved(gcn::MouseEvent &event);
@@ -152,6 +150,8 @@ class ItemContainer : public gcn::Widget,
int mMaxItems;
int mOffset;
+ ItemPopup *mItemPopup;
+
std::list<gcn::SelectionListener*> mListeners;
static const int gridWidth;
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index a0df3eed..5f7dc736 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -34,12 +34,12 @@
#include "../utils/gettext.h"
#include "../utils/strprintf.h"
-ItemPopup::ItemPopup()
+ItemPopup::ItemPopup():
+ Window()
{
setResizable(false);
setShowTitle(false);
setTitleBarHeight(0);
- loadSkin("graphics/gui/gui.xml");
// Item Name
mItemName = new gcn::Label("Label");
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index e82a370e..f6f5f4b8 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -82,7 +82,8 @@ Window::Window(const std::string& caption, bool modal, Window *parent, const std
{
logger->log("Window::Window(\"%s\")", caption.c_str());
- if (!windowContainer) {
+ if (!windowContainer)
+ {
throw GCN_EXCEPTION("Window::Window(): no windowContainer set");
}
@@ -126,12 +127,14 @@ Window::~Window()
const std::string &name = mWindowName;
// Saving X, Y and Width and Height for resizables in the config
- if (!name.empty()) {
+ if (!name.empty())
+ {
config.setValue(name + "WinX", getX());
config.setValue(name + "WinY", getY());
config.setValue(name + "Visible", isVisible());
- if (mGrip) {
+ if (mGrip)
+ {
config.setValue(name + "WinWidth", getWidth());
config.setValue(name + "WinHeight", getHeight());
}