summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/core/graphics/gui/button.pngbin768 -> 374 bytes
-rw-r--r--data/core/graphics/gui/button_disabled.pngbin834 -> 313 bytes
-rw-r--r--data/core/graphics/gui/buttonhi.pngbin787 -> 374 bytes
-rw-r--r--data/core/graphics/gui/buttonpress.pngbin785 -> 461 bytes
-rw-r--r--data/core/graphics/gui/checkbox.pngbin851 -> 696 bytes
-rw-r--r--data/core/graphics/gui/radioin.pngbin399 -> 454 bytes
-rw-r--r--data/core/graphics/gui/radioout.pngbin339 -> 380 bytes
-rw-r--r--src/gui/window.cpp9
-rw-r--r--src/gui/window.h15
-rw-r--r--src/resources/mapreader.cpp13
10 files changed, 16 insertions, 21 deletions
diff --git a/data/core/graphics/gui/button.png b/data/core/graphics/gui/button.png
index 6979f1b4..9ebbea63 100644
--- a/data/core/graphics/gui/button.png
+++ b/data/core/graphics/gui/button.png
Binary files differ
diff --git a/data/core/graphics/gui/button_disabled.png b/data/core/graphics/gui/button_disabled.png
index 95ba338f..0ce3aa6f 100644
--- a/data/core/graphics/gui/button_disabled.png
+++ b/data/core/graphics/gui/button_disabled.png
Binary files differ
diff --git a/data/core/graphics/gui/buttonhi.png b/data/core/graphics/gui/buttonhi.png
index d9167820..c4772634 100644
--- a/data/core/graphics/gui/buttonhi.png
+++ b/data/core/graphics/gui/buttonhi.png
Binary files differ
diff --git a/data/core/graphics/gui/buttonpress.png b/data/core/graphics/gui/buttonpress.png
index 9ece102e..8c18181d 100644
--- a/data/core/graphics/gui/buttonpress.png
+++ b/data/core/graphics/gui/buttonpress.png
Binary files differ
diff --git a/data/core/graphics/gui/checkbox.png b/data/core/graphics/gui/checkbox.png
index 0feb6938..669ecf03 100644
--- a/data/core/graphics/gui/checkbox.png
+++ b/data/core/graphics/gui/checkbox.png
Binary files differ
diff --git a/data/core/graphics/gui/radioin.png b/data/core/graphics/gui/radioin.png
index f56e3b4e..12e027fe 100644
--- a/data/core/graphics/gui/radioin.png
+++ b/data/core/graphics/gui/radioin.png
Binary files differ
diff --git a/data/core/graphics/gui/radioout.png b/data/core/graphics/gui/radioout.png
index fd73a353..5eb67bd8 100644
--- a/data/core/graphics/gui/radioout.png
+++ b/data/core/graphics/gui/radioout.png
Binary files differ
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 310da823..83a0b283 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -35,7 +35,8 @@ Window::Window(const std::string& text, bool modal, Window *parent):
snapSize(8),
mouseDown(false),
modal(modal),
- titlebarHeight(20)
+ titlebarHeight(20),
+ padding(3)
{
log("Window::Window(\"%s\")", caption.c_str());
@@ -68,7 +69,7 @@ Window::Window(const std::string& text, bool modal, Window *parent):
// Add chrome
chrome = new gcn::Container();
chrome->setOpaque(false);
- chrome->setY(titlebarHeight);
+ chrome->setPosition(padding, titlebarHeight + padding);
gcn::Container::add(chrome);
// Add this window to the window container
@@ -145,13 +146,13 @@ void Window::setDimension(const gcn::Rectangle &dimension)
void Window::setWidth(int width)
{
- gcn::Container::setWidth(width);
+ gcn::Container::setWidth(width + 2 * padding);
chrome->setWidth(width);
}
void Window::setHeight(int height)
{
- gcn::Container::setHeight(height + titlebarHeight);
+ gcn::Container::setHeight(height + titlebarHeight + 2 * padding);
chrome->setHeight(height);
}
diff --git a/src/gui/window.h b/src/gui/window.h
index 3657eb1d..25403851 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -48,13 +48,14 @@ class Window : public gcn::Container, public gcn::MouseListener
bool modal; /**< Window is modal */
gcn::Color titlebarColor; /**< Title bar color */
int titlebarHeight; /**< Height of title bar */
-
- Image *dBackground; /**< Left side of title bar */
- Image *dBorders; /**< Middle of title bar */
- Image *dUpperBorder; /**< Upper border */
- Image *dLowerBorder; /**< Lower Border */
- Image *dLeftBorder; /**< Left Border */
- Image *dRightBorder; /**< Right Border */
+ int padding; /**< Space between contents and border */
+
+ Image *dBackground; /**< Left side of title bar */
+ Image *dBorders; /**< Middle of title bar */
+ Image *dUpperBorder; /**< Upper border */
+ Image *dLowerBorder; /**< Lower Border */
+ Image *dLeftBorder; /**< Left Border */
+ Image *dRightBorder; /**< Right Border */
/** The window container windows add themselves to. */
static WindowContainer* windowContainer;
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index ccf38ac3..c86f7fe4 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -117,24 +117,18 @@ void MapReader::readLayer(xmlNodePtr node, Map *map, int layer)
//xmlChar *name = xmlGetProp(node, BAD_CAST "name");
node = node->xmlChildrenNode;
+ int h = map->getHeight();
+ int w = map->getWidth();
int x = 0;
int y = 0;
// Load the tile data
- /*
while (node != NULL)
{
if (xmlStrEqual(node->name, BAD_CAST "tile") && y < h)
{
- xmlChar *name = xmlGetProp(node, BAD_CAST "name");
int gid = getProperty(node, "gid", -1);
-
- if (gid > -1) {
- layer->setTile(Point(x, y), map->getTile(gid));
- }
- else {
- layer->setTile(Point(x, y), NULL);
- }
+ map->setTile(x, y, layer, (gid > -1) ? gid : 0);
x++;
if (x == w) {x = 0; y++;}
@@ -146,7 +140,6 @@ void MapReader::readLayer(xmlNodePtr node, Map *map, int layer)
node = node->next;
}
}
- */
}
/*