diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-15 14:36:01 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-15 14:36:01 +0000 |
commit | a4fa7ae6f3f0966b6fe45c65b1a0fe78f59994ed (patch) | |
tree | 7576a27b5f135164fcbe9d1ad957f9cefc5575dc /src/gui/gui.cpp | |
parent | 21c6ab4d1f7f5cecd5c1720c6949b4bfe28132ad (diff) | |
download | mana-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.cpp | 21 |
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; |