summaryrefslogtreecommitdiff
path: root/src/gui/scrollarea.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
commit8bde9095c5840b8d62ebafe11beaed98877d6ac2 (patch)
tree537f717a339d1247cae222eb7a354ea5dbe8babf /src/gui/scrollarea.cpp
parenta246c08cef5e4d598fc07a681eb971bfbcf01519 (diff)
downloadmana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.gz
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.bz2
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.xz
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.zip
* Made Sprite into an interface implemented by both FloorItem and Being, which
hook themselves into the map on construction. The improved fringe layer is working as expected now. * Made sure TMW compiles without warnings even when using "-Wconversion -Wshadow -Wcast-qual -Wwrite-strings -ansi -pedantic", lots of cleanups. * Added two new small tilesets that contain the desert tiles that are twice and three times the height of a normal tile. One well in new_3-1 has been converted to use the new double tiles for testing purposes.
Diffstat (limited to 'src/gui/scrollarea.cpp')
-rw-r--r--src/gui/scrollarea.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp
index ec8a7946..246e2ffa 100644
--- a/src/gui/scrollarea.cpp
+++ b/src/gui/scrollarea.cpp
@@ -216,21 +216,21 @@ void ScrollArea::draw(gcn::Graphics *graphics)
void ScrollArea::drawBorder(gcn::Graphics *graphics)
{
- int w, h, bs;
- bs = getBorderSize();
- w = getWidth() + bs * 2;
- h = getHeight() + bs * 2;
+ int bs = getBorderSize();
+ int w = getWidth() + bs * 2;
+ int h = getHeight() + bs * 2;
- if (isOpaque()) {
- dynamic_cast<Graphics*>(graphics)->drawImageRect(0, 0, w, h, background);
+ if (mOpaque) {
+ dynamic_cast<Graphics*>(graphics)->drawImageRect(0, 0, w, h,
+ background);
}
}
void ScrollArea::setOpaque(bool opaque)
{
- this->opaque = opaque;
+ mOpaque = opaque;
- if (opaque) {
+ if (mOpaque) {
setBorderSize(2);
}
else {
@@ -238,11 +238,6 @@ void ScrollArea::setOpaque(bool opaque)
}
}
-bool ScrollArea::isOpaque()
-{
- return opaque;
-}
-
void ScrollArea::drawButton(gcn::Graphics *graphics, BUTTON_DIR dir)
{
int state = 0;