summaryrefslogtreecommitdiff
path: root/src/gui/table.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 21:59:21 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 22:00:09 +0100
commit99e8a3fd77b63a029fe02dcf771b6af1aad252ed (patch)
tree03c296d1f89859aae35336dfe2f58df09d256fd3 /src/gui/table.cpp
parentfa8a4bf49100c0a1d5b96e00803f43bbbb861100 (diff)
parent347452b9b69ef3af29c577b7751082822e900c01 (diff)
downloadmana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.gz
mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.bz2
mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.xz
mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.zip
Merge branch 'aethyra/master'
Conflicts: Many files.
Diffstat (limited to 'src/gui/table.cpp')
-rw-r--r--src/gui/table.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/table.cpp b/src/gui/table.cpp
index 5fc96dbd..ec5b0480 100644
--- a/src/gui/table.cpp
+++ b/src/gui/table.cpp
@@ -319,11 +319,19 @@ 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);
@@ -334,14 +342,6 @@ void GuiTable::draw(gcn::Graphics* graphics)
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;
}