summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Kaduk <mateusz.kaduk@gmail.com>2005-04-10 12:11:49 +0000
committerMateusz Kaduk <mateusz.kaduk@gmail.com>2005-04-10 12:11:49 +0000
commit7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4 (patch)
tree22d584cba391e68058c6a182fad94c8b87b99339
parent74c3b49c1242ef7449fe17198270e1b99b9289e2 (diff)
downloadmana-client-7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4.tar.gz
mana-client-7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4.tar.bz2
mana-client-7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4.tar.xz
mana-client-7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4.zip
Added inventory transparency
-rwxr-xr-xautogen.sh4
-rw-r--r--docs/mapdev.txt1
-rw-r--r--src/gui/inventory.cpp3
-rw-r--r--src/gui/inventory.h3
-rw-r--r--src/gui/scrollarea.cpp7
-rw-r--r--src/gui/scrollarea.h2
6 files changed, 16 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh
index 8f047c99..21ae79e8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,9 +4,9 @@ echo "Generating build information using aclocal, autoheader, automake and autoc
echo
# Regerate configuration files
-aclocal
+aclocal-1.7
autoheader
-automake --gnu --add-missing --copy
+automake-1.7 --gnu --add-missing --copy
autoconf
echo
diff --git a/docs/mapdev.txt b/docs/mapdev.txt
index 72afc2dc..a9a9b0e2 100644
--- a/docs/mapdev.txt
+++ b/docs/mapdev.txt
@@ -8,3 +8,4 @@ Errors:
Suggestions:
- The large empty area at 44,34 in new_3-1 is reserved for the city's "palace"
- Place some more rock ridges in new_1-1
+
diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp
index 7bf5971f..d6851347 100644
--- a/src/gui/inventory.cpp
+++ b/src/gui/inventory.cpp
@@ -26,6 +26,7 @@
#include "../resources/resourcemanager.h"
#include "../resources/image.h"
#include "button.h"
+#include "scrollarea.h"
#include "../being.h"
#include "../engine.h"
#include "item_amount.h"
@@ -43,7 +44,7 @@ InventoryWindow::InventoryWindow():
items = new ItemContainer();
items->setPosition(2, 2);
- invenScroll = new gcn::ScrollArea(items);
+ invenScroll = new ScrollArea(items);
invenScroll->setPosition(4, 4);
useButton->setEventId("use");
diff --git a/src/gui/inventory.h b/src/gui/inventory.h
index ab65c122..f4e814f0 100644
--- a/src/gui/inventory.h
+++ b/src/gui/inventory.h
@@ -30,6 +30,7 @@
#include "itemcontainer.h"
#include "gui.h"
#include "window.h"
+#include "scrollarea.h"
/**
* Inventory dialog.
@@ -93,7 +94,7 @@ class InventoryWindow : public Window, gcn::ActionListener {
private:
gcn::Button *useButton, *dropButton;
- gcn::ScrollArea *invenScroll;
+ ScrollArea *invenScroll;
int useItem(int index, int id);
void updateWidgets();
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp
index ffeb9a1d..d652c94c 100644
--- a/src/gui/scrollarea.cpp
+++ b/src/gui/scrollarea.cpp
@@ -24,6 +24,7 @@
#include "scrollarea.h"
#include "gui.h"
#include "../resources/resourcemanager.h"
+#include "../main.h"
ScrollArea::ScrollArea():
gcn::ScrollArea()
@@ -48,6 +49,12 @@ void ScrollArea::init()
int bggridy[4] = {0, 4, 19, 24};
int a = 0, x, y;
+ // Load GUI alpha setting
+ guiAlpha = config.getValue("guialpha", 0.8f);
+
+ // Set GUI alpha level
+ textbox->setAlpha(guiAlpha);
+
for (y = 0; y < 3; y++) {
for (x = 0; x < 3; x++) {
background.grid[a] = textbox->getSubImage(
diff --git a/src/gui/scrollarea.h b/src/gui/scrollarea.h
index 304e5b89..27f14372 100644
--- a/src/gui/scrollarea.h
+++ b/src/gui/scrollarea.h
@@ -26,6 +26,7 @@
#include <guichan.hpp>
#include "../graphics.h"
+#include "../configuration.h"
/**
* A scroll area.
@@ -71,6 +72,7 @@ class ScrollArea : public gcn::ScrollArea {
ImageRect background;
ImageRect vMarker;
+ float guiAlpha;
};
#endif