diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-06 08:58:58 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-06 08:58:58 -0700 |
commit | f0d6cd5a97593003fcca3c800ede409f6c55344c (patch) | |
tree | 8162344e43b140abd08c3b7113cf48d37c699a37 /src/gui/browserbox.cpp | |
parent | d4ff6679427caad730b4caee51f2ddad083cb818 (diff) | |
download | mana-f0d6cd5a97593003fcca3c800ede409f6c55344c.tar.gz mana-f0d6cd5a97593003fcca3c800ede409f6c55344c.tar.bz2 mana-f0d6cd5a97593003fcca3c800ede409f6c55344c.tar.xz mana-f0d6cd5a97593003fcca3c800ede409f6c55344c.zip |
While this is not the ideal solution to the link problem, this commit at
least ensures that the link will be in the correct location. Should work
to fix things until a proper rewrite is figured out.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/browserbox.cpp')
-rw-r--r-- | src/gui/browserbox.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index c51852bb..ecc22e5f 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -276,6 +276,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) int x = 0, y = 0; int wrappedLines = 0; + int link = 0; TrueTypeFont *font = static_cast<TrueTypeFont*>(getFont()); graphics->setColor(BLACK); @@ -333,6 +334,12 @@ void BrowserBox::draw(gcn::Graphics *graphics) int rgb = textColour->getColour(c, valid); if (c == '<') { + const int size = mLinks[link].x2 - mLinks[link].x1; + mLinks[link].x1 = x; + mLinks[link].y1 = y; + mLinks[link].x2 = mLinks[link].x1 + size; + mLinks[link].y2 = y + font->getHeight(); + link++; prevColor = selColor; } if (valid) |