summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-15 14:36:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-15 14:36:01 +0000
commita4fa7ae6f3f0966b6fe45c65b1a0fe78f59994ed (patch)
tree7576a27b5f135164fcbe9d1ad957f9cefc5575dc /src/gui/gui.cpp
parent21c6ab4d1f7f5cecd5c1720c6949b4bfe28132ad (diff)
downloadmana-client-a4fa7ae6f3f0966b6fe45c65b1a0fe78f59994ed.tar.gz
mana-client-a4fa7ae6f3f0966b6fe45c65b1a0fe78f59994ed.tar.bz2
mana-client-a4fa7ae6f3f0966b6fe45c65b1a0fe78f59994ed.tar.xz
mana-client-a4fa7ae6f3f0966b6fe45c65b1a0fe78f59994ed.zip
Good old Aqua buttons back but now using Guichan
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 6b574b45..2a3631c2 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -404,7 +404,6 @@ void loadDialogSkin() {
}
void draw_skinned_rect(BITMAP*dst, LexSkinnedRect *skin, int x, int y,int w, int h) {
-
BITMAP **grid = skin->grid;
int w0 = grid[0]->w;
@@ -509,7 +508,25 @@ void gui_shutdown(void) {
}
}
-/** Draw text for gui widgets */
+/*
+ * Find out the screen area of a Guichan widget
+ */
+gcn::Rectangle getScreenDimension(gcn::Widget *widget) {
+ gcn::Rectangle rect = gcn::Rectangle(widget->getDimension());
+ gcn::BasicContainer *parent = widget->getParent();
+
+ while (parent != NULL) {
+ rect.x += parent->getX();
+ rect.y += parent->getY();
+ parent = parent->getParent();
+ }
+
+ return rect;
+}
+
+/*
+ * Draw text for gui widgets
+ */
int gui_text(BITMAP *bmp, AL_CONST char *s, int x, int y, int color, int centre) {
char tmp[1024];
int hline_pos = -1;