summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/Makefile.am3
-rw-r--r--src/graphic/imagerect.h50
-rw-r--r--src/graphics.cpp2
-rw-r--r--src/graphics.h21
-rw-r--r--src/gui/button.cpp2
-rw-r--r--src/gui/playerbox.cpp2
-rw-r--r--src/gui/progressbar.cpp2
-rw-r--r--src/gui/scrollarea.cpp2
-rw-r--r--src/gui/textfield.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp24
-rw-r--r--src/gui/window.cpp2
13 files changed, 39 insertions, 80 deletions
diff --git a/ChangeLog b/ChangeLog
index 16171bd1..531a8c25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,12 @@
wallpaper.
* src/resources/resourcemanager.cpp: More useful logging about
resources that are being loaded (including source).
+ * src/graphics.cpp, src/gui/window.cpp, src/gui/button.cpp,
+ src/gui/widgets/dropdown.cpp, src/gui/textfield.cpp,
+ src/gui/playerbox.cpp, src/gui/progressbar.cpp,
+ src/gui/scrollarea.cpp, src/graphics.h, src/CMakeLists.txt,
+ src/Makefile.am, src/graphic, src/graphic/imagerect.h: Merged the
+ definition of ImageRect into graphics.h.
2006-11-05 Yohann Ferreira <bertram@cegetel.net>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8523b066..4fd8d880 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -36,7 +36,6 @@ INCLUDE_DIRECTORIES(
)
SET(SRCS
- graphic/imagerect.h
gui/box.cpp
gui/box.h
gui/browserbox.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 5c8d77a0..09348700 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,7 @@
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = tmw
-tmw_SOURCES = graphic/imagerect.h \
- gui/widgets/dropdown.cpp \
+tmw_SOURCES = gui/widgets/dropdown.cpp \
gui/widgets/dropdown.h \
gui/browserbox.cpp \
gui/browserbox.h \
diff --git a/src/graphic/imagerect.h b/src/graphic/imagerect.h
deleted file mode 100644
index be63d4ac..00000000
--- a/src/graphic/imagerect.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * The Mana World
- * Copyright 2004 The Mana World Development Team
- *
- * This file is part of The Mana World.
- *
- * The Mana World is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * The Mana World is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with The Mana World; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * $Id$
- */
-
-#ifndef _TMW_IMAGERECT_H
-#define _TMW_IMAGERECT_H
-
-class Image;
-
-/**
- * 9 images defining a rectangle. 4 corners, 4 sides and a middle area. The
- * topology is as follows:
- *
- * <pre>
- * !-----!-----------------!-----!
- * ! 0 ! 1 ! 2 !
- * !-----!-----------------!-----!
- * ! 3 ! 4 ! 5 !
- * !-----!-----------------!-----!
- * ! 6 ! 7 ! 8 !
- * !-----!-----------------!-----!
- * </pre>
- *
- * Sections 0, 2, 6 and 8 will remain as is. 1, 3, 4, 5 and 7 will be
- * repeated to fit the size of the widget.
- */
-struct ImageRect {
- Image *grid[9];
-};
-
-#endif
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 2757214a..065c0a46 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -25,8 +25,6 @@
#include "log.h"
-#include "graphic/imagerect.h"
-
#include "resources/image.h"
Graphics::Graphics():
diff --git a/src/graphics.h b/src/graphics.h
index 3c060e97..b3d36653 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -32,6 +32,27 @@ class ImageRect;
class SDL_Surface;
/**
+ * 9 images defining a rectangle. 4 corners, 4 sides and a middle area. The
+ * topology is as follows:
+ *
+ * <pre>
+ * !-----!-----------------!-----!
+ * ! 0 ! 1 ! 2 !
+ * !-----!-----------------!-----!
+ * ! 3 ! 4 ! 5 !
+ * !-----!-----------------!-----!
+ * ! 6 ! 7 ! 8 !
+ * !-----!-----------------!-----!
+ * </pre>
+ *
+ * Sections 0, 2, 6 and 8 will remain as is. 1, 3, 4, 5 and 7 will be
+ * repeated to fit the size of the widget.
+ */
+struct ImageRect {
+ Image *grid[9];
+};
+
+/**
* A central point of control for graphics.
*/
class Graphics : public gcn::SDLGraphics {
diff --git a/src/gui/button.cpp b/src/gui/button.cpp
index 9d01095b..31f38593 100644
--- a/src/gui/button.cpp
+++ b/src/gui/button.cpp
@@ -29,8 +29,6 @@
#include "../graphics.h"
-#include "../graphic/imagerect.h"
-
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index 46cd7e85..568c3350 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -26,8 +26,6 @@
#include "../being.h"
#include "../graphics.h"
-#include "../graphic/imagerect.h"
-
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
#include "../resources/spriteset.h"
diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp
index 5f047c6a..2bdfc856 100644
--- a/src/gui/progressbar.cpp
+++ b/src/gui/progressbar.cpp
@@ -25,8 +25,6 @@
#include "../graphics.h"
-#include "../graphic/imagerect.h"
-
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp
index 18a1dfb4..903ec95d 100644
--- a/src/gui/scrollarea.cpp
+++ b/src/gui/scrollarea.cpp
@@ -25,8 +25,6 @@
#include "../graphics.h"
-#include "../graphic/imagerect.h"
-
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
diff --git a/src/gui/textfield.cpp b/src/gui/textfield.cpp
index 2e083d5a..adf41a9a 100644
--- a/src/gui/textfield.cpp
+++ b/src/gui/textfield.cpp
@@ -27,8 +27,6 @@
#include "../graphics.h"
-#include "../graphic/imagerect.h"
-
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 34c6b93a..0bf0e673 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -25,8 +25,6 @@
#include "../../graphics.h"
-#include "../../graphic/imagerect.h"
-
#include "../../resources/image.h"
#include "../../resources/resourcemanager.h"
@@ -138,17 +136,17 @@ void DropDown::draw(gcn::Graphics* graphics)
drawButton(graphics);
- if (mDroppedDown)
- {
- drawChildren(graphics);
-
- // Draw two lines separating the ListBox with se selected
- // element view.
- graphics->setColor(highlightColor);
- graphics->drawLine(0, h, getWidth(), h);
- graphics->setColor(shadowColor);
- graphics->drawLine(0, h + 1,getWidth(),h + 1);
- }
+ if (mDroppedDown)
+ {
+ drawChildren(graphics);
+
+ // Draw two lines separating the ListBox with se selected
+ // element view.
+ graphics->setColor(highlightColor);
+ graphics->drawLine(0, h, getWidth(), h);
+ graphics->setColor(shadowColor);
+ graphics->drawLine(0, h + 1,getWidth(),h + 1);
+ }
}
void DropDown::drawBorder(gcn::Graphics *graphics)
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index c7860021..13d42c78 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -33,8 +33,6 @@
#include "../graphics.h"
#include "../log.h"
-#include "../graphic/imagerect.h"
-
#include "../resources/image.h"
#include "../resources/resourcemanager.h"