summaryrefslogtreecommitdiff
path: root/src/gui/table.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-19 17:31:47 -0600
committerIra Rice <irarice@gmail.com>2009-03-19 17:31:47 -0600
commita7a8ec7961fd7b1c8f83b92905f85c5a6e0358c0 (patch)
treeaf896d4eb3f6e48b8bf2c2a4a597331b5fc31cd0 /src/gui/table.cpp
parent0221ab5dc5236e9e35fe6c832a52020551dafa85 (diff)
downloadMana-a7a8ec7961fd7b1c8f83b92905f85c5a6e0358c0.tar.gz
Mana-a7a8ec7961fd7b1c8f83b92905f85c5a6e0358c0.tar.bz2
Mana-a7a8ec7961fd7b1c8f83b92905f85c5a6e0358c0.tar.xz
Mana-a7a8ec7961fd7b1c8f83b92905f85c5a6e0358c0.zip
Some minor cleanups in a few windows and build scripts, as well as
fixing tables to correct the highlights to draw where they're supposed to, as well as at the opacity they're supposed to. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/table.cpp')
-rw-r--r--src/gui/table.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gui/table.cpp b/src/gui/table.cpp
index fa801865..17d8bfbf 100644
--- a/src/gui/table.cpp
+++ b/src/gui/table.cpp
@@ -320,29 +320,30 @@ void GuiTable::draw(gcn::Graphics* graphics)
widget->setDimension(bounds);
- if (!mLinewiseMode && c == mSelectedColumn && r == mSelectedRow)
+ graphics->setColor(guiPalette->getColor(Palette::HIGHLIGHT,
+ (int)(mAlpha * 255.0f)));
+
+ if (mLinewiseMode && r == mSelectedRow && c == 0)
+ {
+ graphics->fillRectangle(gcn::Rectangle(0, y_offset,
+ getWidth(), height));
+ }
+ else if (!mLinewiseMode &&
+ c == mSelectedColumn && r == mSelectedRow)
{
- graphics->setColor(guiPalette->getColor(Palette::HIGHLIGHT,
- (int)(mAlpha * 127.0f)));
- graphics->fillRectangle(bounds);
+ graphics->fillRectangle(gcn::Rectangle(x_offset, y_offset,
+ width, height));
}
graphics->pushClipArea(bounds);
widget->draw(graphics);
graphics->popClipArea();
+
}
x_offset += width;
}
- if (mLinewiseMode && r == mSelectedRow)
- {
- graphics->setColor(guiPalette->getColor(Palette::HIGHLIGHT,
- (int)(mAlpha * 127.0f)));
- graphics->fillRectangle(gcn::Rectangle(0, y_offset,
- x_offset, height));
- }
-
y_offset += height;
}